[cairo] Question about extents and transformations

kooda at upyum.com kooda at upyum.com
Mon Dec 9 10:04:37 UTC 2019


Hi.

I’m trying to use the cairo_path_extents procedure to get a rough
bounding box of shapes drawn by cairo, and I found this surprising
behaviour:

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.

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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotation-extents.c
Type: text/plain:
Size: 857 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20191209/9a972847/attachment.bin>


More information about the cairo mailing list