[cairo] Question about extents and transformations
Uli Schlachter
psychon at znc.in
Thu Dec 12 15:25:24 UTC 2019
Hi,
On 09.12.19 11:04, kooda at upyum.com wrote:
[...]
> The documentation for cairo_path_extents() states: “Computes a bounding
> box in user-space coordinates”, that’s why I expect the extents of a
> given path to always be the same, whichever transformation might be
> applied.
What the implementation actually does: It computes a (tight?) bounding
box in device space and then transforms that to user-space coordinates.
This explains the behaviour that you get, I think.
> It appears to be the case for scaling and translations, but rotation gives
> me different extents. Am I missing something or is this a bug?
Well, the documentation only says that you get "a" bounding box, not
"the tightest possible" bounding box. So, I would say that this is not a
bug and then I would go ahead and bury my head in the sand...
Cheers,
Uli
--
99 little bugs in the code
99 little bugs in the code
Take one down, patch it around
117 little bugs in the code
-- @irqed
More information about the cairo
mailing list