What??! You mean you couldn't understand the crystal-clear Win32::GUI
docs? What's wrong with you?
Just kidding. The Win32::GUI docs are awful.
On that page, [X,Y]+ refers to a set of points (one point for each
vertex of the polygon). You pass the points as X, Y
coordinates in one long list. Here:
$dc->Polygon(10, 10, 10, 200, 200, 200, 10, 10);
This draws a right triangle with its right-angled vertex at (200, 200).
If you like, you can group the arguments:
$dc->Polygon( (10, 10), (10, 200), (200, 200), (10, 10));
They all get flattened out into one list anyhow.
Eric
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Shepherd, Mike
Sent: Thursday, February 22, 2007 2:56 PM
To: [email protected]
Subject: [perl-win32-gui-users] Win32-GUI-DC Polygon
Perl-Win32-GUI users,
I'm looking for an example using Win32-GUI-DC, specifically creating
Polygons (or any of the Poly... objects). The format to create a Polygon
objects is:
$DC -> Polygon([X,Y]+)
What is getting passed to the polygon - I don't understand the [X,Y]+
notation?
Thanks,
Mike