[cairo-commit] cairo-perl Cairo.xs, 1.15, 1.16 ChangeLog, 1.46,
1.47 cairo-perl.h, 1.10, 1.11
Torsten Schoenfeld
commit at pdx.freedesktop.org
Thu Dec 28 10:53:14 PST 2006
- Previous message: [cairo-commit] cairo-perl/t Cairo.t,1.10,1.11
- Next message: [cairo-commit] cairo-perl Cairo.pm, 1.22, 1.23 ChangeLog, 1.47,
1.48 NEWS, 1.10, 1.11 README, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: tsch
Update of /cvs/cairo/cairo-perl
In directory kemper:/tmp/cvs-serv27197
Modified Files:
Cairo.xs ChangeLog cairo-perl.h
Log Message:
* Cairo.xs, cairo-perl.h, t/Cairo.t: Wrap and test
cairo_copy_clip_rectangles and cairo_clip_extents.
Index: Cairo.xs
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.xs,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Cairo.xs 9 Nov 2006 19:43:43 -0000 1.15
+++ Cairo.xs 28 Dec 2006 18:53:09 -0000 1.16
@@ -87,7 +87,7 @@
/* ------------------------------------------------------------------------- */
SV *
-newSVCairoFontExtents (cairo_font_extents_t * extents)
+newSVCairoFontExtents (cairo_font_extents_t *extents)
{
HV *hv;
double value;
@@ -118,7 +118,7 @@
/* ------------------------------------------------------------------------- */
SV *
-newSVCairoTextExtents (cairo_text_extents_t * extents)
+newSVCairoTextExtents (cairo_text_extents_t *extents)
{
HV *hv;
double value;
@@ -166,7 +166,7 @@
}
SV *
-newSVCairoGlyph (cairo_glyph_t * glyph)
+newSVCairoGlyph (cairo_glyph_t *glyph)
{
HV *hv;
unsigned long index;
@@ -190,7 +190,7 @@
}
cairo_glyph_t *
-SvCairoGlyph (SV * sv)
+SvCairoGlyph (SV *sv)
{
HV *hv;
SV **value;
@@ -219,6 +219,30 @@
/* ------------------------------------------------------------------------- */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 3, 0) /* FIXME: 1.4 */
+
+SV *
+newSVCairoRectangle (cairo_rectangle_t *rectangle)
+{
+ HV *hv;
+
+ if (!rectangle)
+ return &PL_sv_undef;
+
+ hv = newHV ();
+
+ hv_store (hv, "x", 1, newSVnv (rectangle->x), 0);
+ hv_store (hv, "y", 1, newSVnv (rectangle->y), 0);
+ hv_store (hv, "width", 5, newSVnv (rectangle->width), 0);
+ hv_store (hv, "height", 6, newSVnv (rectangle->height), 0);
+
+ return newRV_noinc ((SV *) hv);
+}
+
+#endif
+
+/* ------------------------------------------------------------------------- */
+
MODULE = Cairo PACKAGE = Cairo PREFIX = cairo_
int VERSION (class=NULL)
@@ -415,6 +439,25 @@
void cairo_clip_preserve (cairo_t *cr);
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 3, 0) /* FIXME: 1.4 */
+
+##cairo_rectangle_list_t * cairo_copy_clip_rectangles (cairo_t *cr);
+void cairo_copy_clip_rectangles (cairo_t *cr)
+ PREINIT:
+ cairo_rectangle_list_t *list;
+ int i;
+ PPCODE:
+ list = cairo_copy_clip_rectangles (cr);
+ CAIRO_PERL_CHECK_STATUS (list->status);
+ EXTEND (sp, list->num_rectangles);
+ for (i = 0; i < list->num_rectangles; i++)
+ PUSHs (sv_2mortal (newSVCairoRectangle (&(list->rectangles[i]))));
+ cairo_rectangle_list_destroy (list);
+
+void cairo_clip_extents (cairo_t *cr, OUTLIST double x1, OUTLIST double y1, OUTLIST double x2, OUTLIST double y2);
+
+#endif
+
void cairo_reset_clip (cairo_t *cr);
void cairo_select_font_face (cairo_t *cr, const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight);
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- ChangeLog 23 Nov 2006 19:09:12 -0000 1.46
+++ ChangeLog 28 Dec 2006 18:53:09 -0000 1.47
@@ -1,3 +1,8 @@
+2006-12-28 tsch
+
+ * Cairo.xs, cairo-perl.h, t/Cairo.t: Wrap and test
+ cairo_copy_clip_rectangles and cairo_clip_extents.
+
2006-11-23 tsch
* CairoSurface.xs, t/CairoSurface.t: Make
Index: cairo-perl.h
===================================================================
RCS file: /cvs/cairo/cairo-perl/cairo-perl.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cairo-perl.h 15 Jul 2006 14:41:11 -0000 1.10
+++ cairo-perl.h 28 Dec 2006 18:53:09 -0000 1.11
@@ -46,15 +46,21 @@
/*
* custom struct handling
*/
-SV * newSVCairoFontExtents (cairo_font_extents_t * extents);
+SV * newSVCairoFontExtents (cairo_font_extents_t *extents);
-SV * newSVCairoTextExtents (cairo_text_extents_t * extents);
+SV * newSVCairoTextExtents (cairo_text_extents_t *extents);
-SV * newSVCairoGlyph (cairo_glyph_t * glyph);
-cairo_glyph_t * SvCairoGlyph (SV * sv);
+SV * newSVCairoGlyph (cairo_glyph_t *glyph);
+cairo_glyph_t * SvCairoGlyph (SV *sv);
-SV * newSVCairoPath (cairo_path_t * path);
-cairo_path_t * SvCairoPath (SV * sv);
+SV * newSVCairoPath (cairo_path_t *path);
+cairo_path_t * SvCairoPath (SV *sv);
+
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 3, 0) /* FIXME: 1.4 */
+
+SV * newSVCairoRectangle (cairo_rectangle_t *rectangle);
+
+#endif
/*
* special treatment for surfaces
- Previous message: [cairo-commit] cairo-perl/t Cairo.t,1.10,1.11
- Next message: [cairo-commit] cairo-perl Cairo.pm, 1.22, 1.23 ChangeLog, 1.47,
1.48 NEWS, 1.10, 1.11 README, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list