[cairo] API request: obtain the trapezoids that are outside ofthe surface

Turner, David DTurner at nds.com
Wed Aug 25 02:22:38 PDT 2004


> BTW: I assumed that RENDER keeps the trapezoids that cairo 
> sends to it,
> so that it can scale the picture upon request:
> 
> cairo_save(cr);
>  cairo_set_target_surface(cr, parent);
>  cairo_scale(cr, 10, 10);
>  cairo_surface_show(cr, surface);
> cairo_restore(cr);
> 
> It seems that RENDER only keeps the image of surface, but not the
> trapezoids.  Is that a bug?
> 

This is a design feature, not a bug (at least for the moment). The
trapezoids that Cairo sends to _all_ its backends are the result of
tesselation, which is essentially a device-specific operation.

You typically don't want to scale these later, unless you want to
exhibit subtle bugs, like the ones seen when scaling hinted text.

That's also why the RENDER protocol doesn't support scaling of
trapezoids. At least that's my understanding of the whole scheme :-)

Notice also that changing the current transform matrix _after_
a path element has been defined has strictly no influence on the
resulting path trapezoids (be it for filling or stroking). That's
because when you use something like cairo_move_to(), the function
uses the ctm to _immediately_ transform the coordinate, then
record it in the state's path.

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)

> 
> Jost
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
> 



More information about the cairo mailing list