Purpose |
Draw a polygon in the selected graphic target. | ||||||||||||||
Syntax |
GRAPHIC POLYGON points [,[rgbColor&] [, [fillcolor&] [,[fillstyle&] [, fillmode&]]]] | ||||||||||||||
Remarks |
The graphic target must first be selected with GRAPHIC ATTACH. The Coordinates are specified in the same terms (pixels or dialog units) as the parent dialog (or world coordinates, if those were chosen with GRAPHIC SCALE). Line width can be set using GRAPHIC WIDTH. If line width is set to 1 (the default), the line style can be set with GRAPHIC STYLE. GRAPHIC POLYGON neither uses, nor updates, the last point referenced (POS). | ||||||||||||||
points |
User-defined type that defines the number of vertices and the location of each. There must be at least two, and no more than 1024 vertices. The first member is a long integer point count, followed directly by the appropriate number of single precision floats to specify the actual coordinates. Floating point coordinates are required, because of the possibility of their use as world coordinates with SCALE. You can use a type with a scalar list, like this: TYPE PolyPoints count as long x1 as single y1 as single x2 as single y2 as single x3 as single y3 as single END TYPE Or, you can create an array using point types, like this: TYPE PolyPoint x as single y as single END TYPE
TYPE PolyArray count as long xy(1 TO 3) as PolyPoint END TYPE | ||||||||||||||
rgbColor& |
Optional RGB color of the polygon edge. If omitted (or -1), the edge color defaults to the current foreground color. | ||||||||||||||
fillcolor& |
Optional RGB color of the polygon interior. If fillcolor& is omitted (or -2), the interior of the ellipse is not filled, allowing the background to show through. If fillcolor& is -1, the interior is painted with the same color as the edge. Otherwise, fillcolor& specifies the RGB color to be used. | ||||||||||||||
fillstyle& |
Optional fill style (pattern) to be used. If fillstyle& is omitted, the default fill style is solid (0). If a hatch pattern is chosen (1 to 6), the foreground color is specified by the fillcolor&, while the background is specified by the default background color. The optional fillstyle& may be:
| ||||||||||||||
fillmode& |
If fillmode& is missing (or zero), the winding mode is selected. This fills any region with a non-zero winding value. If fillmode& is non-zero, the alternate mode is selected. This fills the area between odd-numbered and even-numbered polygon sides on each scan line. That is, it fills the area between the first side and the second side, between the third side and fourth side, etc. | ||||||||||||||
See also |
GRAPHIC ARC, GRAPHIC ATTACH, GRAPHIC BOX, GRAPHIC COLOR, GRAPHIC ELLIPSE, GRAPHIC LINE, GRAPHIC POLYLINE, GRAPHIC STYLE, GRAPHIC WIDTH |