[cairo] add solid/gradient pattern info getters

Carl Worth cworth at cworth.org
Thu Sep 14 10:26:02 PDT 2006

On Thu, 14 Sep 2006 10:13:44 -0700, "Vladimir Vukicevic" wrote:
> >
> > I'd have get_dash follow the same -- get_dash_count() and get_dash()
> Now that I think about it for more than a second, they won't be the
> same; get_dash really wants to fill in a buffer.  I guess I could do
> get_dash (cairo_t *cr, int index, double *dval) for consistency, but
> I'd rather not have two different kinds of getter APIs.  I guess
> that's ok, because getting any of this stuff should be fairly
> uncommon.

Another way to look at this is by making both of these getter APIs
parallel the corresponding setters. With color stops, we set them
one-by-one with add_color_stop while with the dash setting that's all
at once with set_dash.

So maybe it's not even that inconsistent to have one-by-one
get_color_stop and all-at-once get_dash?

-------------- 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/20060914/867c94bb/attachment.pgp

More information about the cairo mailing list