DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

FillSpans(D3nfb)


FillSpans -- NFB routine to fill spans

Synopsis

#include "nfbGCStr.h"

void xxxFillSpans ( DrawablePtr pDraw, GCPtr pGC, unsinged int nInit, DDXPointPtr pptInit, unsigned int *pwidthInit, int FSorted);

xxx is the routine's prefix. Valid values are nfb to use the default routine or your driver's prefix if you are rewriting this routine to use the specific capabilities of your hardware.

Description

Arguments

The arguments are:

pDraw
Pointer to a DrawablePtr structure used to access your screen private data. The pDraw->pScreen member points to the ScreenRec(D4nfb) structure; your screen private is connected to the bottom of the ScreenRec structure.

pGC
points to an nfbGCOps(D4nfb) structure. From this structure you can extract the planemask, alu, and color for the spans. See the sample code below for how this is done. All drawing routines that have a pGC pointer passed as the first parameter need to extract this information the same way.

nInit
number of spans to be drawn.

pptInit
points to the first in a series of DDXPointRec(D4nfb) structures that contain the starting x and y coordinates for each solid span.

pwidthInit
points to the first in a series of unsigned ints that contain the width of each consecutive span.

fSorted
Set to a non-zero value if the scanline origins are in ascending order.

Exit codes

None

Usage

Driver writers may supply their own FillSpans( ) routine if their hardware can implement this functionality, or can call the nfbFillSpans( ) function function to use the software implementation.

You will note that this prototype contains no information on alu, planemask or color, but these values are accessible.

Each span is a 1 pixel high rectangle with the following coordinates:


first span:
(ppt[0].x, ppt[0].y) and (ppt[0].x + pwidth[0], ppt[0].y+1).

second span:
(ppt[1].x, ppt[1].y) and (ppt[1].x + pwidth[1], ppt[1].y+1).

last span:
(ppt[npts-1].x, ppt[npts-1].y) and (ppt[npts-1].x + pwidth[npts-1], ppt[npts-1].y+1).

Version applicability

This function is supported for NFB drivers on all releases of SCO OpenServer 5, SVR5, and AIX 5L.

Source files


Routine source
./hw/sco/nfb/nfbFillSp.c

Driver source file
Depends on the driver's naming convention.

References

genSolidFS(D3nfb), genTiledFS(D3nfb), genStippledFS(D3nfb), genOpStippledFS(D3nfb), nfbGCOps(D4nfb)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005