[perl-Cairo] Wrap 1.8 cairo_surface_t API
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Cairo] Wrap 1.8 cairo_surface_t API
- Date: Sun, 16 May 2010 20:52:21 +0000 (UTC)
commit d4bf6d8f5b66cf2245d54f9a553b6d3d16b3a765
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sun May 16 22:41:29 2010 +0200
Wrap 1.8 cairo_surface_t API
Namely, cairo_surface_get_fallback_resolution and
cairo_surface_has_show_text_glyphs.
CairoSurface.xs | 12 ++++++++++++
t/CairoSurface.t | 12 +++++++++++-
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/CairoSurface.xs b/CairoSurface.xs
index 9d8ab71..2a51673 100644
--- a/CairoSurface.xs
+++ b/CairoSurface.xs
@@ -296,6 +296,12 @@ void cairo_surface_set_fallback_resolution (cairo_surface_t *surface, double x_p
#endif
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0)
+
+void cairo_surface_get_fallback_resolution (cairo_surface_t *surface, OUTLIST double x_pixels_per_inch, OUTLIST double y_pixels_per_inch);
+
+#endif
+
##void cairo_surface_get_font_options (cairo_surface_t *surface, cairo_font_options_t *options);
cairo_font_options_t * cairo_surface_get_font_options (cairo_surface_t *surface)
CODE:
@@ -346,6 +352,12 @@ void cairo_surface_show_page (cairo_surface_t *surface);
#endif
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE (1, 8, 0)
+
+cairo_bool_t cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
+
+#endif
+
# --------------------------------------------------------------------------- #
MODULE = Cairo::Surface PACKAGE = Cairo::ImageSurface PREFIX = cairo_image_surface_
diff --git a/t/CairoSurface.t b/t/CairoSurface.t
index 10dfd0d..017eda5 100644
--- a/t/CairoSurface.t
+++ b/t/CairoSurface.t
@@ -12,7 +12,7 @@ use warnings;
use Config; # for byteorder
-use Test::More tests => 72;
+use Test::More tests => 74;
use constant IMG_WIDTH => 256;
use constant IMG_HEIGHT => 256;
@@ -115,6 +115,16 @@ SKIP: {
like (Cairo::Format::stride_for_width ('argb32', 23), qr/\A\d+\z/);
}
+SKIP: {
+ skip 'new stuff', 2
+ unless Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 8, 0);
+
+ $surf->set_fallback_resolution (72, 72);
+ is_deeply ([$surf->get_fallback_resolution], [72, 72]);
+
+ ok (defined $surf->has_show_text_glyphs);
+}
+
# --------------------------------------------------------------------------- #
sub clear {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]