DrawEllipseList
Draws a list of solid scanlines for a filled ellipse engine back end.
Declaration
void NAPI GA_2DRenderFuncs::DrawEllipseList(
N_int32 y,
N_int32 length,
N_int32 height,
N_int16 *scans)
Prototype In
snap/graphics.h
Parameters
y |
Y coordinate for scanline |
length |
Number of scanlines in the list |
height |
Height of the ellipse minor axis |
scans |
Pointer to an array of scanline data |
Description
This function renders a list of solid scanlines starting at the specified location in the currently active color and mix. This function forms the back end of a fast filled ellipse rendering engine, but does not actually compute the scanlines in the list itself since the the pixelisation rules are usually different for different device driver environments.
The scanline coordinates are passed as an array of 16-bit integer coordinates, packed with the LEFT coordinate followed by the RIGHT coordinate and so on for each scanline. For each scanline in the list, this routine will render a scanline from LEFT to RIGHT (exclusive) at increasing Y coordinates. The calling code must always guarantee that the LEFT coordinates will be less than the RIGHT coordinates, and that they will never be equal for each scanline.
This function will always be provided by accelerated drivers, and will be implemented with whatever hardware rendering function provides the fastest possible method of rendering scanlines with the installed hardware.
The algorithm used internally in the drivers to render the list of scanlines is similar to the following:
maxIndex = length-1;
for (i = 0,j = height; i < maxIndex; i++,j--,scans += 2) {
SolidScan(i,scans[0],scans[1]);
SolidScan(j,scans[0],scans[1]);
}
if (!(height & 1))
SolidScan(i,scans[0],scans[0]);
See Also
DrawPattEllipseList, GA_2DRenderFuncs_DrawColorPattEllipseList, DrawFatEllipseList, DrawPattFatEllipseList, GA_2DRenderFuncs_DrawColorPattFatEllipseList
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com