[cairo] obtaining last operation extents

Bill Spitzak spitzak at thefoundry.co.uk
Tue Mar 31 15:32:35 PDT 2009

Vladimir Vukicevic wrote:
> On 3/31/09 11:59 AM, Bill Spitzak wrote:
>> If you call extents() *after* the fill/stroke, then a backend *could*
>> remember the box if it is cheap to do so and then return it on that
>> call. If it is not cheap then it would calculate the box during the call.
> Right, except that when you call fill(), the path gets reset, so there's 
> nothing to do the calculation with...

You are right. I meant to say something about that but got confused.

I think it might be possible to make all the calls such as fill() not 
actually destroy the path, but instead they set a flag so that the next 
moveto/lineto/curveto is what destroys the path. This would remove the 
need to save/restore to do a fill & stroke, and would allow you to do a 
sequence of operations to a path.

Don't know how incompatible this would be, however.

Bill Spitzak, Senior Software Engineer
The Foundry, 618 Hampton Drive, Venice, CA, 90291, USA
Tel: +1 310 399-4555 * Fax: +1 310 450-4516 * Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027

More information about the cairo mailing list