[cairo] Handling clipping in cairo_arc API

Uli Schlachter psychon at znc.in
Wed Nov 4 15:58:13 UTC 2020


Hi,

Am 04.11.20 um 10:35 schrieb Sneha Shailesh:
[...]
> We had a doubt about the cairo_arc () API which is used to draw circles. If a circle is out of boundaries of the frame, is the clipping of the circle handled within the cairo source code? We wanted to know if the object is not drawn outside the frame memory bounds as that will lead to a memory corruption.
[...]

I assume you are talking about an image surface. All drawing to an image
surface respects the size of the image surface. Cairo does not draw
outside of the memory of the surface. The only way to get out of bounds
accesses should be to pass incorrect values to
cairo_image_surface_create_for_data().

Cheers,
Uli
-- 
“Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold. Cold.” – Anna


More information about the cairo mailing list