[cairo] RGB and RGBA patterns

Jonathon Jongsma jonathon.jongsma at gmail.com
Sat Jan 14 12:10:35 PST 2006


Just for reference, in the C++ wrapper, currently they're implemented
as two different constructors for Cairo::SolidPattern.  There's really
no difference between them once they're created, so there doesn't seem
to be any advantage to creating two different child classes.

Jonner

On 1/14/06, Torsten Schoenfeld <kaffeetisch at gmx.de> wrote:
> Aloha,
>
> how should language bindings wrap cairo_pattern_create_rgb and
> cairo_pattern_create_rgba?  I suppose they both create a
> cairo_solid_pattern_t.  Should they be considered just two variants of a
> cairo_solid_pattern_t constructor or should they be wrapped as
> constructors for two separate child classes of cairo_solid_pattern_t?
>
> Speaking in Perl:
>
> +-------------------------------+--------------------------------+
> | cairo_pattern_create_rgb      | cairo_pattern_create_rgba      |
> +-------------------------------+--------------------------------+
> | Cairo::SolidPattern->new_rgb  | Cairo::SolidPattern->new_rgba  |
> | Cairo::SolidPattern::RGB->new | Cairo::SolidPattern::RGBA->new |
> | Cairo::SolidRGBPattern->new   | Cairo::SolidRGBAPattern->new   |
> +----------------------------------------------------------------+
>
> --
> Bye,
> -Torsten
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>


More information about the cairo mailing list