[perl-cairo] Add bindings for cairo_tag_begin and cairo_tag_end
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-cairo] Add bindings for cairo_tag_begin and cairo_tag_end
- Date: Wed, 11 Sep 2019 19:39:13 +0000 (UTC)
commit 4c225159244395c7e10eee27139b99d62db4f159
Author: Johan Vromans <jv cpan org>
Date: Wed Sep 11 21:30:38 2019 +0200
Add bindings for cairo_tag_begin and cairo_tag_end
Cairo.xs | 8 ++++++++
lib/Cairo.pm | 18 ++++++++++++++++++
t/Cairo.t | 12 +++++++++++-
3 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/Cairo.xs b/Cairo.xs
index e940348..d3d4509 100644
--- a/Cairo.xs
+++ b/Cairo.xs
@@ -898,6 +898,14 @@ void cairo_append_path (cairo_t *cr, cairo_path_t *path);
cairo_status_t cairo_status (cairo_t *cr);
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 16, 0)
+
+void cairo_tag_begin (cairo_t * cr, const char_utf8 * tag_name, const char_utf8 * attributes);
+
+void cairo_tag_end (cairo_t * cr, const char_utf8 * tag_name);
+
+#endif
+
# --------------------------------------------------------------------------- #
MODULE = Cairo PACKAGE = Cairo PREFIX = cairo_
diff --git a/lib/Cairo.pm b/lib/Cairo.pm
index 42abc92..c96be8d 100644
--- a/lib/Cairo.pm
+++ b/lib/Cairo.pm
@@ -340,6 +340,24 @@ C<$cr-E<gt>restore> to restore to the saved state.
=back
+=item $cr->tag_begin($name, $atts) [1.16]
+
+=over
+
+=item $name: string
+
+=item $atts: string
+
+=back
+
+=item $cr->tag_end($name) [1.16]
+
+=over
+
+=item $name: string
+
+=back
+
=item $cr->copy_page
=item $cr->show_page
diff --git a/t/Cairo.t b/t/Cairo.t
index 2dc376f..5f6a37c 100644
--- a/t/Cairo.t
+++ b/t/Cairo.t
@@ -10,7 +10,7 @@
use strict;
use warnings;
-use Test::More tests => 70;
+use Test::More tests => 72;
unless (eval 'use Test::Number::Delta; 1;') {
my $reason = 'Test::Number::Delta not available';
@@ -286,3 +286,13 @@ isa_ok ($path, 'ARRAY');
$cr->append_path ($path);
is ($cr->status, 'success');
+
+SKIP: {
+ skip 'new stuff', 2
+ unless Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 16, 0);
+
+ $cr->tag_begin("Link","https://www.perl.org");
+ is ($cr->status, 'success');
+ $cr->tag_end("Link");
+ is ($cr->status, 'success');
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]