[cairo] Cut cairo_t out of a cairo_t
Robert Uhl
ruhl at xaipete.org
Wed Jun 8 14:05:32 PDT 2011
Thanks for your answer!
I did it this way:
cairo_surface_t* surface_full = cairo_get_target(cr_full);
cairo_surface_t* surface_cutout =
cairo_surface_create_for_rectangle(surface_full, p_border, p_border,
width_cutout, height_cutout);
cairo_t* cr_cutout = cairo_create(surface_cutout);
cairo_surface_destroy(surface_cutout);
draw(cr_cutout, width_cutout, height_cutout);
cairo_destroy(cr_cutout);
On 08.06.2011 08:27, Andrea Canciani wrote:
> If you want to guarantee that the routine won't be able to escape the
> boundaries you chose nor put B in an invalid status, you can use
> cairo_surface_create_for_rectangle() and create a cairo_t on that
More information about the cairo
mailing list