[cairo] RGB and RGBA patterns

Torsten Schoenfeld kaffeetisch at gmx.de
Sat Jan 14 11:08:33 PST 2006


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



More information about the cairo mailing list