Supported Browsers Home   
MGL_ellipseCoord Previous   
MGL_emptyRect Next   
External Functions Up   

MGL_ellipseEngine

Declaration

void MGLAPI MGL_ellipseEngine(
    rect_t extentRect,
    void (MGLAPIP setup)(
        int topY,
        int botY,
        int left,
        int right),
    void (MGLAPIP set4pixels)(
        ibool inc_x,
        ibool inc_y,
        ibool region1),
    void (MGLAPIP finished)(void))

Prototype In

mgraph.h

Parameters

extentRect

Bounding rectangle defining the ellipse

setup

Routine called to initialize pixel plotting routines

set4pixels

Routine called repeatedly for each set of 4 pixels

finished

Routine called to complete plotting pixels

 

Description

This routine generates the set of points on a ellipse, and is the same code used to generate ellipses internally in MGL. You can call it to generate the set of points on an ellipse, calling your own user defined plotting routines.

The setup routine is called before any pixels are plotted with the coordinates of the 4 seed points in the four ellipse quadrants.

The set4pixels routine is called repeatedly for each set of 4 pixels to be plotted, and specified whether the coordinates in the x and y directions should be incremented or remain the same. This state of the 4 pixel coordinates will need to be maintained by the user supplied routines.

The finished routine is called to clean up after generating all the points on the ellipse, such as releasing memory and rasterizing the ellipse if the rasterizing was deferred.

See Also

MGL_ellipseArcEngine, MGL_lineEngine

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