[cairo] problems showing text and lines since I migrated my program

Lauener Adrian adrian.lauener at id.ethz.ch
Wed Jun 4 00:05:43 PDT 2008


 
Hi

I have the job to migrate a graphic-program from a redhat-
linux server, which is using cairo-version 1.4.6 to a
solaris9 server, which is using cairo-verion 1.4.10. The
programm is written in perl.

Now I migrated the program and it doesn't crashed. But
it doesn't shows all text and lines neither. So I tried
to isolate my problem in a small example. This program
works on my linux-server and doesn't shows the text and
the line on my solaris-machine.

Now, I have no clue how to further and any ideas are
really appreciated.


best regards
Adrian


--------------------------------------------------------------------

#!/usr/local/bin/perl

require "ctime.pl";
use strict;
use Cairo;

print "Cairo-Test\n";

my $cairoVer = Cairo->version_string;
print "Cario-Version: $cairoVer\n";

my $surface = Cairo::ImageSurface->create ('argb32', 200, 200);
my $car = Cairo::Context->create ($surface);

$car->rectangle (0, 0, 200, 200);
$car->set_source_rgb (1, 0.5, 0.5 );
$car->fill;

$car->rectangle (10, 10, 40, 40);
$car->set_source_rgb (1, 1, 1);
$car->fill;

$car->rectangle (50, 50, 40, 40);
$car->set_source_rgb (0, 0, 0);
$car->fill;

$car->move_to(100,100);
$car->set_source_rgb (1, 1, 0.5);
$car->select_font_face('serif','normal', 'bold');
$car->set_font_size (12);
$car->show_text('Read My Lips');    # doesn't work

$car->move_to(80,110);
$car->line_to(120,110);
$car->set_line_width (4);
$car->stroke;                       # doesn't work

$car->rectangle (150, 150, 40, 40);
$car->set_source_rgb (1, 1, 1);
$car->fill;

$surface->write_to_png ('cairoFoo.png');

exit;

 

_____________________________________
Adrian Lauener
ETH Zürich


More information about the cairo mailing list