| Home
| Previous
| Next
| Up

DrawPattEllipseList

Draws a list of monochrome patterned scanlines for a filled ellipse engine back end.

Declaration

void NAPI GA_2DRenderFuncs::DrawPattEllipseList(
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 monochrome patterned scanlines starting at the specified location in the currently active colors, mix and monochrome pattern. 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.

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) {
PattScan(i,scans[0],scans[1]);
PattScan(j,scans[0],scans[1]);
}
if (!(height & 1))
PattScan(i,scans[0],scans[0]);

See Also

DrawEllipseList, GA_2DRenderFuncs_DrawColorPattEllipseList, DrawFatEllipseList, DrawPattFatEllipseList, GA_2DRenderFuncs_DrawColorPattFatEllipseList

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