[cairo-commit] cairo-perl/t Cairo.t, 1.4, 1.5 CairoFont.t, 1.1,
1.2 CairoMatrix.t, 1.2, 1.3 CairoSurface.t, 1.2, 1.3
Torsten Schoenfeld
commit at pdx.freedesktop.org
Fri Jul 29 10:19:57 PDT 2005
- Previous message: [cairo-commit] cairo-perl Cairo.xs, 1.5, 1.6 CairoFont.xs, 1.3,
1.4 CairoSurface.xs, 1.6, 1.7 ChangeLog, 1.7, 1.8 Makefile.PL,
1.5, 1.6 cairo-perl.typemap, 1.2, 1.3
- Next message: [cairo-commit] cairo ChangeLog,1.798,1.799
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: tsch
Update of /cvs/cairo/cairo-perl/t
In directory gabe:/tmp/cvs-serv15134/t
Modified Files:
Cairo.t CairoFont.t CairoMatrix.t CairoSurface.t
Log Message:
* t/Cairo.t, xs/Cairo.xs: Wrap cairo_get_font_options.
* t/CairoFont.t, xs/CairoFont.xs: Wrap cairo_font_face_status,
cairo_scaled_font_status, cairo_font_options_*. Update
cairo_scaled_font_create.
* t/CairoSurface.t, CairoSurface.xs: Wrap cairo_surface_status,
cairo_surface_get_font_options.
* Makefile.PL: Wrap the new cairo_font_options_t stuff.
* Makefile.PL: Require cairo 0.6.0. Add new and update the old
enums. Install all files necessary for other modules to use
Cairo.
* cairo-perl.typemap: Add a cairo_bool_t typemap.
Index: Cairo.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/Cairo.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Cairo.t 12 Jul 2005 20:29:49 -0000 1.4
+++ Cairo.t 29 Jul 2005 17:19:55 -0000 1.5
@@ -9,7 +9,7 @@
use strict;
use warnings;
-use Test::More tests => 48;
+use Test::More tests => 49;
use constant {
IMG_WIDTH => 256,
@@ -119,6 +119,11 @@
$cr->set_font_matrix ($mat);
isa_ok ($cr->get_font_matrix, 'Cairo::Matrix');
+my $opt = Cairo::FontOptions->create;
+
+$cr->set_font_options ($opt);
+ok ($opt->equal ($cr->get_font_options));
+
my @glyphs = ({ index => 1, x => 2, y => 3 },
{ index => 2, x => 3, y => 4 },
{ index => 3, x => 4, y => 5 });
Index: CairoFont.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoFont.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CairoFont.t 12 Jul 2005 20:29:49 -0000 1.1
+++ CairoFont.t 29 Jul 2005 17:19:55 -0000 1.2
@@ -9,7 +9,7 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 13;
use constant {
IMG_WIDTH => 256,
@@ -18,14 +18,42 @@
use Cairo;
+my $options = Cairo::FontOptions->create;
+isa_ok ($options, 'Cairo::FontOptions');
+
+is ($options->status, 'success');
+
+$options->merge (Cairo::FontOptions->create);
+
+ok ($options->equal ($options));
+
+is ($options->hash, 0);
+
+$options->set_antialias ('subpixel');
+is ($options->get_antialias, 'subpixel');
+
+$options->set_subpixel_order ('rgb');
+is ($options->get_subpixel_order, 'rgb');
+
+$options->set_hint_style ('full');
+is ($options->get_hint_style, 'full');
+
+$options->set_hint_metrics ('on');
+is ($options->get_hint_metrics, 'on');
+
+# --------------------------------------------------------------------------- #
+
my $surf = Cairo::ImageSurface->create ('rgb24', IMG_WIDTH, IMG_HEIGHT);
my $cr = Cairo::Context->create ($surf);
my $face = $cr->get_font_face;
+is ($face->status, 'success');
+
my $matrix = Cairo::Matrix->init_identity;
my $ctm = Cairo::Matrix->init_identity;
-my $font = Cairo::ScaledFont->create ($face, $matrix, $ctm);
+my $font = Cairo::ScaledFont->create ($face, $matrix, $ctm, $options);
isa_ok ($font, 'Cairo::ScaledFont');
+is ($font->status, 'success');
isa_ok ($font->extents, 'HASH');
isa_ok ($font->glyph_extents ({ index => 1, x => 2, y => 3 }), 'HASH');
Index: CairoMatrix.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoMatrix.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CairoMatrix.t 12 Jul 2005 20:29:49 -0000 1.2
+++ CairoMatrix.t 29 Jul 2005 17:19:55 -0000 1.3
@@ -34,7 +34,7 @@
$matrix->scale (3, 4);
$matrix->rotate (3.1415);
};
-is ($@, '', 'set_identity, translate, scale, rotate');
+is ($@, '', 'translate, scale, rotate');
is ($matrix->invert, 'success');
Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CairoSurface.t 12 Jul 2005 20:29:49 -0000 1.2
+++ CairoSurface.t 29 Jul 2005 17:19:55 -0000 1.3
@@ -9,7 +9,7 @@
use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 19;
use constant {
IMG_WIDTH => 256,
@@ -33,7 +33,11 @@
$surf->set_device_offset (23, 42);
-is ($surf->finish, 'success');
+is ($surf->status, 'success');
+
+$surf->finish;
+
+isa_ok ($surf->get_font_options, 'Cairo::FontOptions');
SKIP: {
skip 'png surface', 3
- Previous message: [cairo-commit] cairo-perl Cairo.xs, 1.5, 1.6 CairoFont.xs, 1.3,
1.4 CairoSurface.xs, 1.6, 1.7 ChangeLog, 1.7, 1.8 Makefile.PL,
1.5, 1.6 cairo-perl.typemap, 1.2, 1.3
- Next message: [cairo-commit] cairo ChangeLog,1.798,1.799
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list