[cairo] Re: new clipping change patch

Gustavo J. A. M. Carneiro gjc at inescporto.pt
Wed May 25 06:38:27 PDT 2005


On Wed, 2005-05-25 at 09:10 -0400, Owen Taylor wrote:
> On Wed, 2005-05-25 at 13:57 +0100, Gustavo J. A. M. Carneiro wrote:
> 
> > > Various comments:
> > > 
> > >  * I'm not sure the name change cairo_surface_set_clip_region() =>
> > >    cairo_surface_clip_region() makes sense. It's still a setter...
> > >    there are no plans to make clip_region() intersect with the
> > >    current clip region.
> > 
> >   Do you mean that if I clip to a certain rectangle, then save state and
> > call a function to draw some object, the object is allowed to change the
> > clip region and draw outside the initial rectangle?
> > 
> >   If so, in my opinion this is a terrible idea.  It's analogous to
> > letting a user gain root privileges.  Please, can we not allow this?
> > Setting a new clip region should always intersect with the previous one.
> > Most of the time the new clip region is a rectangle completely inside
> > the old clip region, so this should not be a performance problem...
> 
> We're talking about backend here. Not about changing the frontend API,
> where subsequent clips do intersect.

  Ah, great.

> 
> Note that the frontend API does, like PS, have cairo_reset_clip().

  That's OK.  As long as by default clips intercept, otherwise you are
not able to contain drawing errors in plugins drawing objects, in a
Dia-like program, for example.  But I don't mean that cairo should a
have a security model embedded or anything like it :)

  Sorry for the confusion.  Cairo is great.

  Regards.

-- 
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3086 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050525/2bf38749/smime.bin


More information about the cairo mailing list