[cairo-commit] cairo-perl/t CairoSurface.t,1.7,1.8
Torsten Schoenfeld
commit at pdx.freedesktop.org
Wed Jun 14 11:20:25 PDT 2006
Committed by: tsch
Update of /cvs/cairo/cairo-perl/t
In directory kemper:/tmp/cvs-serv2257/t
Modified Files:
CairoSurface.t
Log Message:
* Makefile.PL: Require cairo >= 1.1.8.
* CairoSurface.xs, t/CairoSurface.t: Wrap and test
cairo_surface_set_fallback_resolution,
cairo_image_surface_get_data, cairo_image_surface_get_format, and
cairo_image_surface_get_stride. Remove the wrappers and tests for
cairo_pdf_surface_set_dpi and cairo_ps_surface_set_dpi.
* t/CairoSurface.t: Test Cairo::ImageSurface::get_width and
get_height.
Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CairoSurface.t 3 Jun 2006 14:21:10 -0000 1.7
+++ CairoSurface.t 14 Jun 2006 18:20:23 -0000 1.8
@@ -9,7 +9,7 @@
use strict;
use warnings;
-use Test::More tests => 43;
+use Test::More tests => 48;
use constant {
IMG_WIDTH => 256,
@@ -23,11 +23,18 @@
isa_ok ($surf, 'Cairo::Surface');
is ($surf->get_content, 'color');
+is ($surf->get_format, 'rgb24');
+is ($surf->get_width, IMG_WIDTH);
+is ($surf->get_height, IMG_HEIGHT);
+
$surf = Cairo::ImageSurface->create_for_data ('Urgs!', 'rgb24',
IMG_WIDTH, IMG_HEIGHT, 23);
isa_ok ($surf, 'Cairo::ImageSurface');
isa_ok ($surf, 'Cairo::Surface');
+is ($surf->get_data, 'Urgs!');
+is ($surf->get_stride, 23);
+
$surf = $surf->create_similar ('color', IMG_WIDTH, IMG_HEIGHT);
isa_ok ($surf, 'Cairo::ImageSurface');
isa_ok ($surf, 'Cairo::Surface');
@@ -35,6 +42,8 @@
$surf->set_device_offset (23, 42);
is_deeply ([$surf->get_device_offset], [23, 42]);
+$surf->set_fallback_resolution (72, 72);
+
is ($surf->status, 'success');
is ($surf->get_type, 'image');
@@ -105,7 +114,6 @@
isa_ok ($surf, 'Cairo::PdfSurface');
isa_ok ($surf, 'Cairo::Surface');
- $surf->set_dpi (72, 72);
$surf->set_size (23, 42);
$surf = $surf->create_similar ('alpha', IMG_WIDTH, IMG_HEIGHT);
@@ -133,7 +141,6 @@
isa_ok ($surf, 'Cairo::PsSurface');
isa_ok ($surf, 'Cairo::Surface');
- $surf->set_dpi (72, 72);
$surf->set_size (23, 42);
$surf->dsc_comment("Bla?");
More information about the cairo-commit
mailing list