[perl-Cairo] Wrap cairo_surface_create_for_rectangle
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Cairo] Wrap cairo_surface_create_for_rectangle
- Date: Sun, 1 May 2011 18:03:22 +0000 (UTC)
commit 0d5148afc228868aa34c165c3915129c8b257e14
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sun May 1 19:05:05 2011 +0200
Wrap cairo_surface_create_for_rectangle
CairoSurface.xs | 10 ++++++++++
t/CairoSurface.t | 10 +++++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/CairoSurface.xs b/CairoSurface.xs
index bdee9bd..eedcdf5 100644
--- a/CairoSurface.xs
+++ b/CairoSurface.xs
@@ -378,6 +378,16 @@ cairo_bool_t cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
#endif
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE (1, 10, 0)
+
+# cairo_surface_t * cairo_surface_create_for_rectangle (cairo_surface_t *target, double x, double y, double width, double height);
+cairo_surface_t_noinc *
+cairo_surface_create_for_rectangle (class, cairo_surface_t *target, double x, double y, double width, double height)
+ C_ARGS:
+ target, x, y, width, height
+
+#endif
+
# --------------------------------------------------------------------------- #
MODULE = Cairo::Surface PACKAGE = Cairo::ImageSurface PREFIX = cairo_image_surface_
diff --git a/t/CairoSurface.t b/t/CairoSurface.t
index 50ea475..af97a2e 100644
--- a/t/CairoSurface.t
+++ b/t/CairoSurface.t
@@ -12,7 +12,7 @@ use warnings;
use Config; # for byteorder
-use Test::More tests => 83;
+use Test::More tests => 84;
use constant IMG_WIDTH => 256;
use constant IMG_HEIGHT => 256;
@@ -128,6 +128,14 @@ SKIP: {
ok (defined $surf->has_show_text_glyphs);
}
+SKIP: {
+ skip 'new stuff', 1
+ unless Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 8, 0);
+
+ my $rect_surf = Cairo::Surface->create_for_rectangle ($surf, 0, 0, 10, 10);
+ isa_ok ($rect_surf, 'Cairo::Surface');
+}
+
$surf->finish;
# --------------------------------------------------------------------------- #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]