[cairo] How can I scale a calro surface
jonathon.jongsma at gmail.com
Tue Jan 24 08:57:40 PST 2006
cairo_scale() does not scale the surface. It only scales the
userspace-to-devicespace coordinate mapping. If you had called
cairo_scale(), drawn something, and then saved it to a png, you'd have
noticed that the thickness and length of the lines that you drew were
scaled. But it won't scale the size of the surface.
On 1/24/06, Meryl Silverburgh <silverburgh.meryl at gmail.com> wrote:
> How can I scale a calro surface?
> I have the following code, but it does not work (does not scale):
> cairo_t* cr = cairo_create(tmpSurf);
> double scale = 0.5;
> cairo_scale (cr, scale, scale);
> cairo_surface_write_to_png(tmpSurf, "tmpSurf.png");
> Can you please tell me why it does not work?
> Thank you.
> cairo mailing list
> cairo at cairographics.org
More information about the cairo