[cairo] Re: new clipping change patch
otaylor at redhat.com
Wed May 25 11:59:51 PDT 2005
On Wed, 2005-05-25 at 10:56 -0700, Keith Packard wrote:
> On Wed, 2005-05-25 at 09:49 -0400, Owen Taylor wrote:
> > What the function does is gets the extents of the mask operation.
> > (mask in the name is a verb, not a noun.) The mask argument isn't
> > currently used, but would be needed for the useful optimization:
> > - If the mask is a surface pattern, with extend=NONE and the
> > operator does nothing for transparent source (OVER, say)
> > then the size of the intermediate surface is bounded by the
> > size of the (transformed mask)
> Ok, so the function is just incomplete.
> > (This optimization can be done for the source as well)
> > Yes, your patch doesn't change the end result of the function, my
> > comment was that with the patch we end up doing:
> I think the patch just demonstrates how silly the original code was. If
> you have a suggestion for what it should look like, I'd love to see it.
> Otherwise, I'll attempt to figure out the intended algorithm and
> implemen that.
There's nothing fancy about the intended algorithm ... leaving aside
the optimization mentioned above, what it is supposed to do is return
a rectangle which is the bounding box of the intersection of:
- The surface extents
- The clip region
- The extents of the clip surface, if any. (surface->clip.rect)
(Careful, you can have *both* a clip region and a clip surface)
_cairo_gstate_clip_extents() could do all of that itself. It didn't
before and still doesn't.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050525/99d65f36/attachment.pgp
More information about the cairo