[cairo] group/pattern API

Carl Worth cworth at cworth.org
Mon Dec 5 18:25:50 PST 2005


On Mon, 5 Dec 2005 17:23:32 -0800, Vladimir Vukicevic wrote:
> Does it make sense to set a surface device offset while in the group,
> and then right before returning the cairo_pattern_t* to set the
> offsets back to 0,0, and instead set an appropriate matrix on the
> pattern?

I don't think we can use the pattern matrix here, since the user can
modify that which would lead to surprising results, (see the examples I
gave above).

> > I don't like this. So far, we've been talking about creating a new
> > kind of magic pattern named a "group", (which happens to have its
> > create function split into begin/end_group rather than "group_create",
> > but that's the best we've come up with).
> 
> Ah, I missed that discussion.  I'd suggest not splitting create, and
> instead having:

I meant the discussion that you and I have been having about
begin/end_group or push/pop_group. I see that API as being a split
create function for a pattern that has some unique properties.

> How's that sound?  I think that we can do the group pattern creation
> stuff in a separate patch from the context group API, though.

I agree with the desire to keep the two patches separate. But I still
don't see much of anything in this group pattern creation stuff that
couldn't be implemented just fine within the existing
cairo_surface_create_similar, cairo_pattern_create, and cairo_create.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051205/6d6dfde0/attachment.pgp


More information about the cairo mailing list