Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>polygon()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Polygon()
Draw a closed polygon
------------------------------------------------------------------------------

Syntax
Polygon( <hDC>, <aPoints> )   -->   lSuccess

Arguments
<hDC> is a handle to the device context on which to draw.

<aPoints> is an array of points.  Each point is itself an
array giving the x- and y- position of the point.

Returns
If successful, logical TRUE (.T.) is returned, otherwise FALSE
(.F.) is returned.

Description
This function draws a polygon by drawing lines between a
series of points, using the current pen for the lines.  If the
points do not specify a closed figure, the figure is closed by
drawing a line from the last point to the first.  The interior
is filled using the current brush.

Example
aPoints = {  { 100, 100 },  { 200, 100 },  { 200, 200 },  {100, 200 }  }
Polygon( hDC, aPoints )            // a square, closed automatically
// now a triangle
Polygon( hDC, {  { 50, 50 },  { 60, 100 },  { 100, 30 }  } )


See Also: GetDC() PolyLine() Rectangle()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson