[cairo-commit] cairo-perl Cairo.pm, 1.14, 1.15 Cairo.xs, 1.12, 1.13 CairoPattern.xs, 1.9, 1.10 CairoSurface.xs, 1.12, 1.13 ChangeLog, 1.25, 1.26 Makefile.PL, 1.16, 1.17 cairo-perl-private.h, 1.2, 1.3 cairo-perl.h, 1.9, 1.10

Torsten Schoenfeld commit at pdx.freedesktop.org
Sat Jul 15 07:41:14 PDT 2006


Committed by: tsch

Update of /cvs/cairo/cairo-perl
In directory kemper:/tmp/cvs-serv7412

Modified Files:
	Cairo.pm Cairo.xs CairoPattern.xs CairoSurface.xs ChangeLog 
	Makefile.PL cairo-perl-private.h cairo-perl.h 
Log Message:
	* Cairo.pm, Cairo.xs, CairoPattern.xs, CairoSurface.xs,
	cairo-perl-private.h: Add cairo_perl_set_isa and use it for
	surfaces and patterns.

	* CairoSurface.xs, Makefile.PL, cairo-perl.h, t/CairoSurface.t:
	Add support for svg surfaces if available.

	* t/CairoSurface.t: Remove TODO block and revert workaround
	related to the weird unknown surface types.  It's been fixed
	upstream: https://bugs.freedesktop.org/show_bug.cgi?id=7322


Index: Cairo.pm
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Cairo.pm	2 Jul 2006 13:10:44 -0000	1.14
+++ Cairo.pm	15 Jul 2006 14:41:11 -0000	1.15
@@ -22,42 +22,6 @@
 
 # --------------------------------------------------------------------------- #
 
-package Cairo::ImageSurface;
-
-our @ISA = qw/Cairo::Surface/;
-
-package Cairo::PdfSurface;
-
-our @ISA = qw/Cairo::Surface/;
-
-package Cairo::PsSurface;
-
-our @ISA = qw/Cairo::Surface/;
-
-# --------------------------------------------------------------------------- #
-
-package Cairo::SolidPattern;
-
-our @ISA = qw/Cairo::Pattern/;
-
-package Cairo::SurfacePattern;
-
-our @ISA = qw/Cairo::Pattern/;
-
-package Cairo::Gradient;
-
-our @ISA = qw/Cairo::Pattern/;
-
-package Cairo::LinearGradient;
-
-our @ISA = qw/Cairo::Gradient/;
-
-package Cairo::RadialGradient;
-
-our @ISA = qw/Cairo::Gradient/;
-
-# --------------------------------------------------------------------------- #
-
 package Cairo;
 
 1;

Index: Cairo.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.xs,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Cairo.xs	2 Jul 2006 13:10:44 -0000	1.12
+++ Cairo.xs	15 Jul 2006 14:41:11 -0000	1.13
@@ -29,8 +29,6 @@
 
 /* ------------------------------------------------------------------------- */
 
-/* XXX: these need extensive testing */
-
 #define DOUBLES_DECLARE	\
 	int i, n; double * pts;
 #define DOUBLES_SLURP_FROM_STACK(first)				\
@@ -48,6 +46,25 @@
 
 /* ------------------------------------------------------------------------- */
 
+/* Copied from Glib/GType.xs. */
+void
+cair_perl_set_isa (const char *child_package,
+                   const char *parent_package)
+{
+	char *child_isa_full;
+	AV *isa;
+
+	child_isa_full = malloc (strlen (child_package) + 5 + 1);
+	child_isa_full = strcpy (child_isa_full, child_package);
+	child_isa_full = strcat (child_isa_full, "::ISA");
+	isa = get_av (child_isa_full, TRUE); /* create on demand */
+	free (child_isa_full);
+
+	av_push (isa, newSVpv (parent_package, 0));
+}
+
+/* ------------------------------------------------------------------------- */
+
 void *
 cairo_object_from_sv (SV *sv, const char *package)
 {
@@ -564,20 +581,9 @@
 	RETVAL
 
 bool
-HAS_XLIB_SURFACE ()
-    CODE:
-#ifdef CAIRO_HAS_XLIB_SURFACE
-	RETVAL = TRUE;
-#else
-	RETVAL = FALSE;
-#endif
-    OUTPUT:
-	RETVAL
-
-bool
-HAS_FT_FONT ()
+HAS_SVG_SURFACE ()
     CODE:
-#ifdef CAIRO_HAS_FT_FONT
+#ifdef CAIRO_HAS_SVG_SURFACE
 	RETVAL = TRUE;
 #else
 	RETVAL = FALSE;

Index: CairoPattern.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoPattern.xs,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CairoPattern.xs	3 Jun 2006 14:21:09 -0000	1.9
+++ CairoPattern.xs	15 Jul 2006 14:41:11 -0000	1.10
@@ -50,6 +50,8 @@
 	return sv;
 }
 
+/* ------------------------------------------------------------------------- */
+
 MODULE = Cairo::Pattern	PACKAGE = Cairo::Pattern PREFIX = cairo_pattern_
 
 void DESTROY (cairo_pattern_t * pattern);
@@ -76,6 +78,9 @@
 
 MODULE = Cairo::Pattern	PACKAGE = Cairo::SolidPattern	PREFIX = cairo_pattern_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::SolidPattern", "Cairo::Pattern");
+
 # cairo_pattern_t* cairo_pattern_create_rgb (double red, double green, double blue);
 cairo_pattern_t_noinc * cairo_pattern_create_rgb (class, double red, double green, double blue)
     C_ARGS:
@@ -90,6 +95,9 @@
 
 MODULE = Cairo::Pattern	PACKAGE = Cairo::SurfacePattern	PREFIX = cairo_pattern_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::SurfacePattern", "Cairo::Pattern");
+
 cairo_pattern_t_noinc * create (class, cairo_surface_t * surface);
     CODE:
 	RETVAL = cairo_pattern_create_for_surface (surface);
@@ -108,6 +116,9 @@
 
 MODULE = Cairo::Pattern	PACKAGE = Cairo::Gradient	PREFIX = cairo_pattern_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::Gradient", "Cairo::Pattern");
+
 void cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern, double offset, double red, double green, double blue);
 
 void cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha);
@@ -116,6 +127,9 @@
 
 MODULE = Cairo::Pattern	PACKAGE = Cairo::LinearGradient	PREFIX = cairo_pattern_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::LinearGradient", "Cairo::Gradient");
+
 cairo_pattern_t_noinc * create (class, double x0, double y0, double x1, double y1);
     CODE:
 	RETVAL = cairo_pattern_create_linear (x0, y0, x1, y1);
@@ -126,6 +140,9 @@
 
 MODULE = Cairo::Pattern	PACKAGE = Cairo::RadialGradient	PREFIX = cairo_pattern_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::RadialGradient", "Cairo::Gradient");
+
 cairo_pattern_t_noinc * create (class, double cx0, double cy0, double radius0, double cx1, double cy1, double radius1);
     CODE:
 	RETVAL = cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1);

Index: CairoSurface.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/CairoSurface.xs,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- CairoSurface.xs	14 Jun 2006 18:20:23 -0000	1.12
+++ CairoSurface.xs	15 Jul 2006 14:41:11 -0000	1.13
@@ -7,6 +7,7 @@
  */
 
 #include <cairo-perl.h>
+#include <cairo-perl-private.h>
 
 static const char *
 get_package (cairo_surface_t *surface)
@@ -28,6 +29,10 @@
 		package = "Cairo::PsSurface";
 		break;
 
+	    case CAIRO_SURFACE_TYPE_SVG:
+		package = "Cairo::SvgSurface";
+		break;
+
 	    case CAIRO_SURFACE_TYPE_XLIB:
 	    case CAIRO_SURFACE_TYPE_XCB:
 	    case CAIRO_SURFACE_TYPE_GLITZ:
@@ -35,7 +40,6 @@
 	    case CAIRO_SURFACE_TYPE_WIN32:
 	    case CAIRO_SURFACE_TYPE_BEOS:
 	    case CAIRO_SURFACE_TYPE_DIRECTFB:
-	    case CAIRO_SURFACE_TYPE_SVG:
 		package = "Cairo::Surface";
 		break;
 
@@ -253,6 +257,9 @@
 
 MODULE = Cairo::Surface	PACKAGE = Cairo::ImageSurface	PREFIX = cairo_image_surface_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::ImageSurface", "Cairo::Surface");
+
 ##cairo_surface_t * cairo_image_surface_create (cairo_format_t format, int width, int height);
 cairo_surface_t_noinc * cairo_image_surface_create (class, cairo_format_t format, int width, int height)
     C_ARGS:
@@ -310,6 +317,9 @@
 
 MODULE = Cairo::Surface	PACKAGE = Cairo::PdfSurface	PREFIX = cairo_pdf_surface_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::PdfSurface", "Cairo::Surface");
+
 ##cairo_surface_t * cairo_pdf_surface_create (const char *filename, double width_in_points, double height_in_points);
 cairo_surface_t_noinc * cairo_pdf_surface_create (class, const char *filename, double width_in_points, double height_in_points)
     C_ARGS:
@@ -342,6 +352,9 @@
 
 MODULE = Cairo::Surface	PACKAGE = Cairo::PsSurface	PREFIX = cairo_ps_surface_
 
+BOOT:
+	cair_perl_set_isa ("Cairo::PsSurface", "Cairo::Surface");
+
 ##cairo_surface_t * cairo_ps_surface_create (const char *filename, double width_in_points, double height_in_points);
 cairo_surface_t_noinc * cairo_ps_surface_create (class, const char *filename, double width_in_points, double height_in_points)
     C_ARGS:
@@ -373,3 +386,67 @@
 void cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface);
 
 #endif
+
+# --------------------------------------------------------------------------- #
+
+#ifdef CAIRO_HAS_SVG_SURFACE
+
+MODULE = Cairo::Surface	PACKAGE = Cairo::SvgSurface	PREFIX = cairo_svg_surface_
+
+BOOT:
+	cair_perl_set_isa ("Cairo::SvgSurface", "Cairo::Surface");
+
+# cairo_surface_t * cairo_svg_surface_create (const char *filename, double width_in_points, double height_in_points);
+cairo_surface_t_noinc *
+cairo_svg_surface_create (class, const char *filename, double width_in_points, double height_in_points)
+    C_ARGS:
+	filename, width_in_points, height_in_points
+
+# cairo_surface_t * cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points);
+cairo_surface_t_noinc *
+cairo_svg_surface_create_for_stream (class, SV *func, SV *data, double width_in_points, double height_in_points)
+    PREINIT:
+	CairoPerlCallback *callback;
+    CODE:
+	callback = cairo_perl_callback_new (func, data);
+	RETVAL = cairo_svg_surface_create_for_stream (write_func_marshaller,
+						      callback,
+						      width_in_points,
+						      height_in_points);
+	cairo_surface_set_user_data (
+		RETVAL, (const cairo_user_data_key_t *) &callback, callback,
+		(cairo_destroy_func_t) cairo_perl_callback_free);
+    OUTPUT:
+	RETVAL
+
+void cairo_svg_surface_restrict_to_version (cairo_surface_t *surface, cairo_svg_version_t version);
+
+# void cairo_svg_get_versions (cairo_svg_version_t const **versions, int *num_versions);
+void
+cairo_svg_surface_get_versions (class=NULL)
+    PREINIT:
+	cairo_svg_version_t const *versions = NULL;
+	int num_versions = 0, i;
+    PPCODE:
+	PERL_UNUSED_VAR (ax);
+	cairo_svg_get_versions (&versions, &num_versions);
+	EXTEND (sp, num_versions);
+	for (i = 0; i < num_versions; i++)
+		PUSHs (sv_2mortal (newSVCairoSvgVersion (versions[i])));
+
+# const char * cairo_svg_version_to_string (cairo_svg_version_t version);
+const char *
+cairo_svg_surface_version_to_string (...)
+    CODE:
+	if (items == 1) {
+		RETVAL = cairo_svg_version_to_string (SvCairoSvgVersion (ST (0)));
+	} else if (items == 2) {
+		RETVAL = cairo_svg_version_to_string (SvCairoSvgVersion (ST (1)));
+	} else {
+		RETVAL = NULL;
+		croak ("Usage: Cairo::SvgSurface::version_to_string (version) or Cairo::SvgSurface->version_to_string (version)");
+	}
+    OUTPUT:
+	RETVAL
+
+#endif

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- ChangeLog	2 Jul 2006 13:10:44 -0000	1.25
+++ ChangeLog	15 Jul 2006 14:41:11 -0000	1.26
@@ -1,3 +1,16 @@
+2006-07-15	tsch
+
+	* Cairo.pm, Cairo.xs, CairoPattern.xs, CairoSurface.xs,
+	cairo-perl-private.h: Add cairo_perl_set_isa and use it for
+	surfaces and patterns.
+
+	* CairoSurface.xs, Makefile.PL, cairo-perl.h, t/CairoSurface.t:
+	Add support for svg surfaces if available.
+
+	* t/CairoSurface.t: Remove TODO block and revert workaround
+	related to the weird unknown surface types.  It's been fixed
+	upstream: https://bugs.freedesktop.org/show_bug.cgi?id=7322
+
 2006/07/02	tsch
 
 	* Makefile.PL: Require cairo 1.2.0.  Add CAIRO_FORMAT_RGB16_565.

Index: Makefile.PL
===================================================================
RCS file: /cvs/cairo/cairo-perl/Makefile.PL,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Makefile.PL	2 Jul 2006 13:10:44 -0000	1.16
+++ Makefile.PL	15 Jul 2006 14:41:11 -0000	1.17
@@ -61,6 +61,7 @@
 my %backend_macros = (
 	'cairo_pdf_surface_t' => 'CAIRO_HAS_PDF_SURFACE',
 	'cairo_ps_surface_t'  => 'CAIRO_HAS_PS_SURFACE',
+	'cairo_svg_surface_t' => 'CAIRO_HAS_SVG_SURFACE',
 );
 
 my %objects = (
@@ -78,167 +79,172 @@
 
 my %enums = (
 	cairo_antialias_t => [qw/
-			CAIRO_ANTIALIAS_
-			CAIRO_ANTIALIAS_DEFAULT
-			CAIRO_ANTIALIAS_NONE
-			CAIRO_ANTIALIAS_GRAY
-			CAIRO_ANTIALIAS_SUBPIXEL
+		CAIRO_ANTIALIAS_
+		CAIRO_ANTIALIAS_DEFAULT
+		CAIRO_ANTIALIAS_NONE
+		CAIRO_ANTIALIAS_GRAY
+		CAIRO_ANTIALIAS_SUBPIXEL
 	/],
 	cairo_content_t => [qw/
-			CAIRO_CONTENT_
-			CAIRO_CONTENT_COLOR
-			CAIRO_CONTENT_ALPHA
-			CAIRO_CONTENT_COLOR_ALPHA
+		CAIRO_CONTENT_
+		CAIRO_CONTENT_COLOR
+		CAIRO_CONTENT_ALPHA
+		CAIRO_CONTENT_COLOR_ALPHA
 	/],
 	cairo_extend_t => [qw/
-			CAIRO_EXTEND_
-			CAIRO_EXTEND_NONE
-			CAIRO_EXTEND_REPEAT
-			CAIRO_EXTEND_REFLECT
-			CAIRO_EXTEND_PAD
+		CAIRO_EXTEND_
+		CAIRO_EXTEND_NONE
+		CAIRO_EXTEND_REPEAT
+		CAIRO_EXTEND_REFLECT
+		CAIRO_EXTEND_PAD
 	/],
 	cairo_fill_rule_t => [qw/
-			CAIRO_FILL_RULE_
-			CAIRO_FILL_RULE_WINDING
-			CAIRO_FILL_RULE_EVEN_ODD
+		CAIRO_FILL_RULE_
+		CAIRO_FILL_RULE_WINDING
+		CAIRO_FILL_RULE_EVEN_ODD
 	/],
 	cairo_filter_t => [qw/
-			CAIRO_FILTER_
-			CAIRO_FILTER_FAST
-			CAIRO_FILTER_GOOD
-			CAIRO_FILTER_BEST
-			CAIRO_FILTER_NEAREST
-			CAIRO_FILTER_BILINEAR
-			CAIRO_FILTER_GAUSSIAN
+		CAIRO_FILTER_
+		CAIRO_FILTER_FAST
+		CAIRO_FILTER_GOOD
+		CAIRO_FILTER_BEST
+		CAIRO_FILTER_NEAREST
+		CAIRO_FILTER_BILINEAR
+		CAIRO_FILTER_GAUSSIAN
 	/],
 	cairo_font_slant_t => [qw/
-			CAIRO_FONT_SLANT_
-			CAIRO_FONT_SLANT_NORMAL
-			CAIRO_FONT_SLANT_ITALIC
-			CAIRO_FONT_SLANT_OBLIQUE
+		CAIRO_FONT_SLANT_
+		CAIRO_FONT_SLANT_NORMAL
+		CAIRO_FONT_SLANT_ITALIC
+		CAIRO_FONT_SLANT_OBLIQUE
 	/],
 	cairo_font_type_t => [qw/
-			CAIRO_FONT_TYPE_
-			CAIRO_FONT_TYPE_TOY
-			CAIRO_FONT_TYPE_FT
-			CAIRO_FONT_TYPE_WIN32
-			CAIRO_FONT_TYPE_ATSUI
+		CAIRO_FONT_TYPE_
+		CAIRO_FONT_TYPE_TOY
+		CAIRO_FONT_TYPE_FT
+		CAIRO_FONT_TYPE_WIN32
+		CAIRO_FONT_TYPE_ATSUI
 	/],
 	cairo_font_weight_t => [qw/
-			CAIRO_FONT_WEIGHT_
-			CAIRO_FONT_WEIGHT_NORMAL
-			CAIRO_FONT_WEIGHT_BOLD
+		CAIRO_FONT_WEIGHT_
+		CAIRO_FONT_WEIGHT_NORMAL
+		CAIRO_FONT_WEIGHT_BOLD
 	/],
 	cairo_format_t => [qw/
-			CAIRO_FORMAT_
-			CAIRO_FORMAT_ARGB32
-			CAIRO_FORMAT_RGB24
-			CAIRO_FORMAT_A8
-			CAIRO_FORMAT_A1
-			CAIRO_FORMAT_RGB16_565
+		CAIRO_FORMAT_
+		CAIRO_FORMAT_ARGB32
+		CAIRO_FORMAT_RGB24
+		CAIRO_FORMAT_A8
+		CAIRO_FORMAT_A1
+		CAIRO_FORMAT_RGB16_565
 	/],
 	cairo_hint_metrics_t => [qw/
-			CAIRO_HINT_METRICS_
-			CAIRO_HINT_METRICS_DEFAULT
-			CAIRO_HINT_METRICS_OFF
-			CAIRO_HINT_METRICS_ON
+		CAIRO_HINT_METRICS_
+		CAIRO_HINT_METRICS_DEFAULT
+		CAIRO_HINT_METRICS_OFF
+		CAIRO_HINT_METRICS_ON
 	/],
 	cairo_hint_style_t => [qw/
-			CAIRO_HINT_STYLE_
-			CAIRO_HINT_STYLE_DEFAULT
-			CAIRO_HINT_STYLE_NONE
-			CAIRO_HINT_STYLE_SLIGHT
-			CAIRO_HINT_STYLE_MEDIUM
-			CAIRO_HINT_STYLE_FULL
+		CAIRO_HINT_STYLE_
+		CAIRO_HINT_STYLE_DEFAULT
+		CAIRO_HINT_STYLE_NONE
+		CAIRO_HINT_STYLE_SLIGHT
+		CAIRO_HINT_STYLE_MEDIUM
+		CAIRO_HINT_STYLE_FULL
 	/],
 	cairo_line_cap_t => [qw/
-			CAIRO_LINE_CAP_
-			CAIRO_LINE_CAP_BUTT
-			CAIRO_LINE_CAP_ROUND
-			CAIRO_LINE_CAP_SQUARE
+		CAIRO_LINE_CAP_
+		CAIRO_LINE_CAP_BUTT
+		CAIRO_LINE_CAP_ROUND
+		CAIRO_LINE_CAP_SQUARE
 	/],
 	cairo_line_join_t => [qw/
-			CAIRO_LINE_JOIN_
-			CAIRO_LINE_JOIN_MITER
-			CAIRO_LINE_JOIN_ROUND
-			CAIRO_LINE_JOIN_BEVEL
+		CAIRO_LINE_JOIN_
+		CAIRO_LINE_JOIN_MITER
+		CAIRO_LINE_JOIN_ROUND
+		CAIRO_LINE_JOIN_BEVEL
 	/],
 	cairo_operator_t => [qw/
-			CAIRO_OPERATOR_
-			CAIRO_OPERATOR_CLEAR
-			CAIRO_OPERATOR_SOURCE
-			CAIRO_OPERATOR_OVER
-			CAIRO_OPERATOR_IN
-			CAIRO_OPERATOR_OUT
-			CAIRO_OPERATOR_ATOP
-			CAIRO_OPERATOR_DEST
-			CAIRO_OPERATOR_DEST_OVER
-			CAIRO_OPERATOR_DEST_IN
-			CAIRO_OPERATOR_DEST_OUT
-			CAIRO_OPERATOR_DEST_ATOP
-			CAIRO_OPERATOR_XOR
-			CAIRO_OPERATOR_ADD
-			CAIRO_OPERATOR_SATURATE
+		CAIRO_OPERATOR_
+		CAIRO_OPERATOR_CLEAR
+		CAIRO_OPERATOR_SOURCE
+		CAIRO_OPERATOR_OVER
+		CAIRO_OPERATOR_IN
+		CAIRO_OPERATOR_OUT
+		CAIRO_OPERATOR_ATOP
+		CAIRO_OPERATOR_DEST
+		CAIRO_OPERATOR_DEST_OVER
+		CAIRO_OPERATOR_DEST_IN
+		CAIRO_OPERATOR_DEST_OUT
+		CAIRO_OPERATOR_DEST_ATOP
+		CAIRO_OPERATOR_XOR
+		CAIRO_OPERATOR_ADD
+		CAIRO_OPERATOR_SATURATE
 	/],
 	cairo_path_data_type_t => [qw/
-			CAIRO_PATH_
-			CAIRO_PATH_MOVE_TO
-			CAIRO_PATH_LINE_TO
-			CAIRO_PATH_CURVE_TO
-			CAIRO_PATH_CLOSE_PATH
+		CAIRO_PATH_
+		CAIRO_PATH_MOVE_TO
+		CAIRO_PATH_LINE_TO
+		CAIRO_PATH_CURVE_TO
+		CAIRO_PATH_CLOSE_PATH
 	/],
 	cairo_pattern_type_t => [qw/
-			CAIRO_PATTERN_TYPE_
-			CAIRO_PATTERN_TYPE_SOLID
-			CAIRO_PATTERN_TYPE_SURFACE
-			CAIRO_PATTERN_TYPE_LINEAR
-			CAIRO_PATTERN_TYPE_RADIAL
+		CAIRO_PATTERN_TYPE_
+		CAIRO_PATTERN_TYPE_SOLID
+		CAIRO_PATTERN_TYPE_SURFACE
+		CAIRO_PATTERN_TYPE_LINEAR
+		CAIRO_PATTERN_TYPE_RADIAL
 	/],
 	cairo_status_t => [qw/
-			CAIRO_STATUS_
-			CAIRO_STATUS_SUCCESS
-			CAIRO_STATUS_NO_MEMORY
-			CAIRO_STATUS_INVALID_RESTORE
-			CAIRO_STATUS_INVALID_POP_GROUP
-			CAIRO_STATUS_NO_CURRENT_POINT
-			CAIRO_STATUS_INVALID_MATRIX
-			CAIRO_STATUS_INVALID_STATUS
-			CAIRO_STATUS_NULL_POINTER
-			CAIRO_STATUS_INVALID_STRING
-			CAIRO_STATUS_INVALID_PATH_DATA
-			CAIRO_STATUS_READ_ERROR
-			CAIRO_STATUS_WRITE_ERROR
-			CAIRO_STATUS_SURFACE_FINISHED
-			CAIRO_STATUS_SURFACE_TYPE_MISMATCH
-			CAIRO_STATUS_PATTERN_TYPE_MISMATCH
-			CAIRO_STATUS_INVALID_CONTENT
-			CAIRO_STATUS_INVALID_FORMAT
-			CAIRO_STATUS_INVALID_VISUAL
-			CAIRO_STATUS_FILE_NOT_FOUND
-			CAIRO_STATUS_INVALID_DASH
-			CAIRO_STATUS_INVALID_DSC_COMMENT
+		CAIRO_STATUS_
+		CAIRO_STATUS_SUCCESS
+		CAIRO_STATUS_NO_MEMORY
+		CAIRO_STATUS_INVALID_RESTORE
+		CAIRO_STATUS_INVALID_POP_GROUP
+		CAIRO_STATUS_NO_CURRENT_POINT
+		CAIRO_STATUS_INVALID_MATRIX
+		CAIRO_STATUS_INVALID_STATUS
+		CAIRO_STATUS_NULL_POINTER
+		CAIRO_STATUS_INVALID_STRING
+		CAIRO_STATUS_INVALID_PATH_DATA
+		CAIRO_STATUS_READ_ERROR
+		CAIRO_STATUS_WRITE_ERROR
+		CAIRO_STATUS_SURFACE_FINISHED
+		CAIRO_STATUS_SURFACE_TYPE_MISMATCH
+		CAIRO_STATUS_PATTERN_TYPE_MISMATCH
+		CAIRO_STATUS_INVALID_CONTENT
+		CAIRO_STATUS_INVALID_FORMAT
+		CAIRO_STATUS_INVALID_VISUAL
+		CAIRO_STATUS_FILE_NOT_FOUND
+		CAIRO_STATUS_INVALID_DASH
+		CAIRO_STATUS_INVALID_DSC_COMMENT
 	/],
 	cairo_subpixel_order_t => [qw/
-			CAIRO_SUBPIXEL_ORDER_
-			CAIRO_SUBPIXEL_ORDER_DEFAULT
-			CAIRO_SUBPIXEL_ORDER_RGB
-			CAIRO_SUBPIXEL_ORDER_BGR
-			CAIRO_SUBPIXEL_ORDER_VRGB
-			CAIRO_SUBPIXEL_ORDER_VBGR
+		CAIRO_SUBPIXEL_ORDER_
+		CAIRO_SUBPIXEL_ORDER_DEFAULT
+		CAIRO_SUBPIXEL_ORDER_RGB
+		CAIRO_SUBPIXEL_ORDER_BGR
+		CAIRO_SUBPIXEL_ORDER_VRGB
+		CAIRO_SUBPIXEL_ORDER_VBGR
 	/],
 	cairo_surface_type_t => [qw/
-			CAIRO_SURFACE_TYPE_
-			CAIRO_SURFACE_TYPE_IMAGE
-			CAIRO_SURFACE_TYPE_PDF
-			CAIRO_SURFACE_TYPE_PS
-			CAIRO_SURFACE_TYPE_XLIB
-			CAIRO_SURFACE_TYPE_XCB
-			CAIRO_SURFACE_TYPE_GLITZ
-			CAIRO_SURFACE_TYPE_QUARTZ
-			CAIRO_SURFACE_TYPE_WIN32
-			CAIRO_SURFACE_TYPE_BEOS
-			CAIRO_SURFACE_TYPE_DIRECTFB
-			CAIRO_SURFACE_TYPE_SVG
+		CAIRO_SURFACE_TYPE_
+		CAIRO_SURFACE_TYPE_IMAGE
+		CAIRO_SURFACE_TYPE_PDF
+		CAIRO_SURFACE_TYPE_PS
+		CAIRO_SURFACE_TYPE_XLIB
+		CAIRO_SURFACE_TYPE_XCB
+		CAIRO_SURFACE_TYPE_GLITZ
+		CAIRO_SURFACE_TYPE_QUARTZ
+		CAIRO_SURFACE_TYPE_WIN32
+		CAIRO_SURFACE_TYPE_BEOS
+		CAIRO_SURFACE_TYPE_DIRECTFB
+		CAIRO_SURFACE_TYPE_SVG
+	/],
+	cairo_svg_version_t => [qw/
+		CAIRO_SVG_VERSION_
+		CAIRO_SVG_VERSION_1_1
+		CAIRO_SVG_VERSION_1_2
 	/],
 );
 
@@ -270,11 +276,11 @@
 $dep->save_config ('build/IFiles.pm');
 
 WriteMakefile (
-	NAME => 'Cairo',
-	VERSION_FROM => 'Cairo.pm',
+	NAME          => 'Cairo',
+	VERSION_FROM  => 'Cairo.pm',
 	ABSTRACT_FROM => 'Cairo.pm',
-	PREREQ_PM => \%prereqs,
-	XSPROTOARG => '-noprototypes',
+	PREREQ_PM     => \%prereqs,
+	XSPROTOARG    => '-noprototypes',
 	$dep->get_makefile_vars,
 );
 

Index: cairo-perl-private.h
===================================================================
RCS file: /cvs/cairo/cairo-perl/cairo-perl-private.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cairo-perl-private.h	14 May 2006 13:43:10 -0000	1.2
+++ cairo-perl-private.h	15 Jul 2006 14:41:11 -0000	1.3
@@ -10,6 +10,8 @@
 #ifndef _CAIRO_PERL_PRIVATE_H_
 #define _CAIRO_PERL_PRIVATE_H_
 
+void cair_perl_set_isa (const char * child_package, const char * parent_package);
+
 cairo_matrix_t * cairo_perl_copy_matrix (cairo_matrix_t *matrix);
 
 #endif /* _CAIRO_PERL_PRIVATE_H_ */

Index: cairo-perl.h
===================================================================
RCS file: /cvs/cairo/cairo-perl/cairo-perl.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo-perl.h	7 May 2006 14:17:39 -0000	1.9
+++ cairo-perl.h	15 Jul 2006 14:41:11 -0000	1.10
@@ -28,6 +28,10 @@
 # include <cairo-pdf.h>
 #endif
 
+#ifdef CAIRO_HAS_SVG_SURFACE
+# include <cairo-svg.h>
+#endif
+
 #include <cairo-perl-auto.h>
 
 /*



More information about the cairo-commit mailing list