The Polygon(xpoints,ypoints,npoints) constructor is not for giving it a hint how big to initialise the arrays. It is used when you already have an array of actual data points you want copied into your Polygon to get it started.
Graphics.drawPolygon and Graphics.fillPolygon don’t mind if a polygon is closed or not. They don’t seem to care if you define the points in clockwise or counter-clockwise order. I have written code part of the demonstration Screw package the generates regular polygons. Here is how to generate a regular polygon.
This page is posted |
http://mindprod.com/jgloss/polygon.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\polygon.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[44.220.251.236] |
| |
Feedback |
You are visitor number | |