DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DrawSolidRects(D3nfb)


DrawSolidRects -- draw rectangles

Synopsis

#include "nfbWinStr.h"

void xxxDrawSolidRects ( BoxPtr pbox, unsigned int nbox, unsigned long fg, unsigned char alu, unsigned long planemask, DrawablePtr pDrawable );

xxx is the routine's prefix. Valid values are gen 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

DrawSolidRects draws nbox rectangles, specified by pbox, with the color specified by fg, while applying alu and planemask.

Arguments

The arguments are:

pbox
describes the rectangular area in which the image should appear in the frame buffer. pbox points to an X structure called a BoxRec(D4nfb) where the last pixel of the image should appear.

This means that the pixel width can be determined by subtracting x1 from x2 and the height by subtracting y1 from y2. This is how the X server deals with rectangular coordinates at the lowest level. Your Link Kit driver will never have to deal with situations where the rectangle's width or height are less than or equal to zero so it is not necessary to add code to check these values.


nbox
number of rectangles.

fg
color to which a set bit must be expanded before the alu and planemask values are applied.

alu
is the raster bit operation that is to be applied when mixing the image with the contents of the frame buffer. See ``alu'' in Developing NFB graphics adapter drivers.

planemask
contains a value that determines which frame buffer planes get modified when drawing this image. If a bit is set, the plane will be modified. If no bits are set, the plane will not be modified. Almost all X drawing operations use a planemask that specifies modification of all planes.

pDrawable
pointer to a DrawableRec X structure that is used to access your screen private data. The ScreenRec(D4nfb) structure is pointed to by pDrawable->pScreen. Your screen private is connected to the bottom of ScreenRec.

Exit codes

None

Usage

DrawSolidRects( ) works for 1, 8, 16, and 32 bits-per-pixel adapters.

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/ports/gen/genRectOps.c

Driver source file
xxxSolid.c

Defined in
nfbWinOps structure in xxxData.c

Prototyped in
xxxProcs.h

References

nfbWinOps(D4nfb)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005