Supported Browsers Home   
DrawPattEllipseList Previous   
DrawPattRect Next   
GA_2DRenderFuncs Up   

DrawPattFatEllipseList

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

Declaration

void NAPI GA_2DRenderFuncs::DrawPattFatEllipseList(
    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 + pen height adjustment

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 fat pen 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 in mutiples of 4 coordinates for a single scanline list. The first coordinate is the LEFTL coordinate, the second is the LEFTR, the third is the RIGHTL and the fourth is the RIGHTR coordinate. For each scanline in the list (each list defines two scanlines at the same Y coordinate), 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:

for (i = 0,j = height; i < length; i++,j--,scans += 4) {
    if (scans[LEFTR] < scans[RIGHTL]) {
        PattScan(i,scans[LEFTL],scans[LEFTR]);
        PattScan(i,scans[RIGHTL],scans[RIGHTR]);
        PattScan(j,scans[LEFTL],scans[LEFTR]);
        PattScan(j,scans[RIGHTL],scans[RIGHTR]);
        }
    else {
        PattScan(i,scans[LEFTL],scans[RIGHTR]);
        PattScan(j,scans[LEFTL],scans[RIGHTR]);
        }
    }
if ((height+1) & 1) {
    if (scans[LEFTR] < scans[RIGHTL]) {
        PattScan(i,scans[LEFTL],scans[LEFTR]);
        PattScan(i,scans[RIGHTL],scans[RIGHTR]);
        }
    else {
        PattScan(i,scans[LEFTL],scans[RIGHTR]);
        }
    }

See Also

DrawEllipseList, DrawPattEllipseList, GA_2DRenderFuncs_DrawColorPattEllipseList, DrawFatEllipseList, GA_2DRenderFuncs_DrawColorPattFatEllipseList

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