Supported Browsers Home   
MGL_rgnLineCoord Previous   
MGL_rgnPolygonCnvx Next   
External Functions Up   

MGL_rgnPolygon

Generates a solid complex polygonal region.

Declaration

region_t * MGLAPI MGL_rgnPolygon(
    int count,
    point_t *vArray,
    int vinc,
    int xOffset,
    int yOffset)

Prototype In

mgraph.h

Parameters

count

Number of vertices to draw

vArray

Array of vertices

vinc

Increment to get to next vertex

xOffset

Offset of X coordinates

yOffset

Offset of Y coordinates

 

Description

This function generates a complex region that represents a convex polygon. A “convex” polygon is defined as a polygon such that every horizontal line drawn through the polygon would cross exactly two active edges (neither horizontal lines nor zero-length edges count as active edges; both are acceptable anywhere in the polygon). Right and left edges may cross (polygons may be nonsimple). Attempting to scan convert a polygon that does non fit this description will produce unpredictable results.

Note:    All vertices are offset by (xOffset,yOffset) and are in regular integer format.

See Also

MGL_rgnPolygonCnvxFX, MGL_rgnPolygonFX

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com