[Kde-perl] A neebie problem with Pen and CanvasPolygon
Alain EMPAIN
alain.empain at ulg.ac.be
Sun Apr 25 15:38:08 CEST 2004
Hello,
I am discovering canvas, but up to now, I cannot see any Pen drawing
when I draw a polygon. By the way, filling with the brush is effective.
Any help will be welcome !
--------------------------------
(...)
my $cp; # canvas polygon
my $pa; # point array
my $brush;
my $pen;
# ------------------------------------
(..)
$pen=Qt::Pen( &red, &SolidLine );
$brush=Qt::Brush( &green, &Dense6Pattern );
(..)
$cp=Qt::CanvasPolygon($canvas);
$cp->setBrush($brush);
$cp->setPen($pen);
$cp->setZ(255);
# -- set the point array
$pa=Qt::PointArray(15);
$pa->setPoint(0,0,0);
$pa->setPoint(1,100,100);
$pa->setPoint(2,100,200);
$pa->setPoint(3,1000,200);
$pa->setPoint(4,500,800);
$pa->setPoint(5,0,0);
# --- load the points into the polygon
$cp->setPoints($pa);
$cp->show();
# --------------
$canvas->update();
(..)
No error, nice filling pattern but no border.
Thanks,
Alain
--
------------------------------------------------------------
Dr Alain Empain <alain.empain at ulg.ac.be> <alain at br.fgov.be>
Bioinformatics, Molecular Genetics,
Fac. Med. Vet., University of Liège, Belgium
Bd de Colonster, B43 B-4000 Liège (Sart-Tilman)
WORK: +32 4 366 3821 FAX: +32 4 366 4122
HOME: rue des Martyrs,7 B- 4550 Nandrin
+32 85 51 23 41 GSM: +32 497 70 17 64
More information about the Kde-perl
mailing list