[cairo-commit] cairo-perl Cairo.pm, 1.8, 1.9 CairoPattern.xs, 1.5, 1.6 ChangeLog, 1.15, 1.16 Makefile.PL, 1.11, 1.12 cairo-perl.h, 1.7, 1.8

Torsten Schoenfeld commit at pdx.freedesktop.org
Sun Jan 29 11:27:23 PST 2006


Committed by: tsch

Update of /cvs/cairo/cairo-perl
In directory gabe:/tmp/cvs-serv3227

Modified Files:
	Cairo.pm CairoPattern.xs ChangeLog Makefile.PL cairo-perl.h 
Log Message:
	* Cairo.pm, CairoPattern.xs, Makefile.PL, cairo-perl.h,
	t/CairoPattern.t: Add Cairo::SolidPattern::create_rgb and
	create_rgba.


Index: Cairo.pm
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Cairo.pm	28 Jan 2006 17:36:37 -0000	1.8
+++ Cairo.pm	29 Jan 2006 19:27:21 -0000	1.9
@@ -36,6 +36,10 @@
 
 # --------------------------------------------------------------------------- #
 
+package Cairo::SolidPattern;
+
+our @ISA = qw/Cairo::Pattern/;
+
 package Cairo::SurfacePattern;
 
 our @ISA = qw/Cairo::Pattern/;
@@ -570,6 +574,34 @@
 
 =item $matrix = $pattern->get_matrix
 
+=item $pattern = Cairo::SolidPattern->create_rgb ($red, $green, $blue)
+
+=over
+
+=item $red: double
+
+=item $green: double
+
+=item $blue: double
+
+=back
+
+=item $pattern = Cairo::SolidPattern->create_rgba ($red, $green, $blue, $alpha)
+
+=over
+
+=item $red: double
+
+=item $green: double
+
+=item $blue: double
+
+=item $alpha: double
+
+=back
+
+=item $matrix = $pattern->get_matrix
+
 =item $pattern = Cairo::SurfacePattern->create ($surface)
 
 =over

Index: CairoPattern.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoPattern.xs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CairoPattern.xs	12 Jul 2005 20:29:47 -0000	1.5
+++ CairoPattern.xs	29 Jan 2006 19:27:21 -0000	1.6
@@ -28,6 +28,20 @@
 
 # --------------------------------------------------------------------------- #
 
+MODULE = Cairo::Pattern	PACKAGE = Cairo::SolidPattern	PREFIX = cairo_pattern_
+
+# cairo_pattern_t* cairo_pattern_create_rgb (double red, double green, double blue);
+cairo_solid_pattern_t_noinc * cairo_pattern_create_rgb (class, double red, double green, double blue)
+    C_ARGS:
+	red, green, blue
+
+# cairo_pattern_t* cairo_pattern_create_rgba (double red, double green, double blue, double alpha);
+cairo_solid_pattern_t_noinc * cairo_pattern_create_rgba (class, double red, double green, double blue, double alpha)
+    C_ARGS:
+	red, green, blue, alpha
+
+# --------------------------------------------------------------------------- #
+
 MODULE = Cairo::Pattern	PACKAGE = Cairo::SurfacePattern	PREFIX = cairo_pattern_
 
 cairo_surface_pattern_t_noinc * create (class, cairo_surface_t * surface);

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ChangeLog	28 Jan 2006 17:36:37 -0000	1.15
+++ ChangeLog	29 Jan 2006 19:27:21 -0000	1.16
@@ -1,3 +1,9 @@
+2006/01/29	tsch
+
+	* Cairo.pm, CairoPattern.xs, Makefile.PL, cairo-perl.h,
+	t/CairoPattern.t: Add Cairo::SolidPattern::create_rgb and
+	create_rgba.
+
 2006/01/28	tsch
 
 	* Cairo.pm: Add documentation for Cairo::Context, paths, patterns,

Index: Makefile.PL
===================================================================
RCS file: /cvs/cairo/cairo-perl/Makefile.PL,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile.PL	8 Jan 2006 17:06:29 -0000	1.11
+++ Makefile.PL	29 Jan 2006 19:27:21 -0000	1.12
@@ -26,23 +26,24 @@
 my %cairo_cfg = ExtUtils::PkgConfig->find ('cairo >= 1.0.0');
 
 my %backend_macros = (
-	'cairo_ps_surface_t' => 'CAIRO_HAS_PS_SURFACE',
+	'cairo_ps_surface_t'  => 'CAIRO_HAS_PS_SURFACE',
 	'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE',
 );
 
 my %objects = (
-	'cairo_t *' => 'Cairo::Context',
-	'cairo_surface_t *' => 'Cairo::Surface',
-	'cairo_image_surface_t *' => 'Cairo::ImageSurface',
-	'cairo_pdf_surface_t *' => 'Cairo::PdfSurface',
-	'cairo_ps_surface_t *' => 'Cairo::PsSurface',
-	'cairo_pattern_t *' => 'Cairo::Pattern',
+	'cairo_t *'                 => 'Cairo::Context',
+	'cairo_surface_t *'         => 'Cairo::Surface',
+	'cairo_image_surface_t *'   => 'Cairo::ImageSurface',
+	'cairo_pdf_surface_t *'     => 'Cairo::PdfSurface',
+	'cairo_ps_surface_t *'      => 'Cairo::PsSurface',
+	'cairo_pattern_t *'         => 'Cairo::Pattern',
+	'cairo_solid_pattern_t *'   => 'Cairo::SolidPattern',
 	'cairo_surface_pattern_t *' => 'Cairo::SurfacePattern',
-	'cairo_gradient_t *' => 'Cairo::Gradient',
+	'cairo_gradient_t *'        => 'Cairo::Gradient',
 	'cairo_linear_gradient_t *' => 'Cairo::LinearGradient',
 	'cairo_radial_gradient_t *' => 'Cairo::RadialGradient',
-	'cairo_font_face_t *' => 'Cairo::FontFace',
-	'cairo_scaled_font_t *' => 'Cairo::ScaledFont',
+	'cairo_font_face_t *'       => 'Cairo::FontFace',
+	'cairo_scaled_font_t *'     => 'Cairo::ScaledFont',
 );
 
 my %structs = (

Index: cairo-perl.h
===================================================================
RCS file: /cvs/cairo/cairo-perl/cairo-perl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cairo-perl.h	8 Jan 2006 17:06:29 -0000	1.7
+++ cairo-perl.h	29 Jan 2006 19:27:21 -0000	1.8
@@ -56,11 +56,13 @@
 typedef cairo_surface_t cairo_image_surface_t;
 #define cairo_image_surface_reference cairo_surface_reference
 #define cairo_image_surface_destroy cairo_surface_destroy
+
 #ifdef CAIRO_HAS_PDF_SURFACE
   typedef cairo_surface_t cairo_pdf_surface_t;
 # define cairo_pdf_surface_reference cairo_surface_reference
 # define cairo_pdf_surface_destroy cairo_surface_destroy
 #endif
+
 #ifdef CAIRO_HAS_PS_SURFACE
   typedef cairo_surface_t cairo_ps_surface_t;
 # define cairo_ps_surface_reference cairo_surface_reference
@@ -70,15 +72,22 @@
 /*
  * support for custom pattern types
  */
+typedef cairo_pattern_t cairo_solid_pattern_t;
+#define cairo_solid_pattern_reference cairo_pattern_reference
+#define cairo_solid_pattern_destroy cairo_pattern_destroy
+
 typedef cairo_pattern_t cairo_surface_pattern_t;
 #define cairo_surface_pattern_reference cairo_pattern_reference
 #define cairo_surface_pattern_destroy cairo_pattern_destroy
+
 typedef cairo_pattern_t cairo_gradient_t;
 #define cairo_gradient_reference cairo_pattern_reference
 #define cairo_gradient_destroy cairo_pattern_destroy
+
 typedef cairo_pattern_t cairo_linear_gradient_t;
 #define cairo_linear_gradient_reference cairo_pattern_reference
 #define cairo_linear_gradient_destroy cairo_pattern_destroy
+
 typedef cairo_pattern_t cairo_radial_gradient_t;
 #define cairo_radial_gradient_reference cairo_pattern_reference
 #define cairo_radial_gradient_destroy cairo_pattern_destroy



More information about the cairo-commit mailing list