DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DrawMonoGlyphs(D3nfb)


DrawMonoGlyphs -- NFB routine to draw glyphs

Synopsis

#include "nfbWinStr.h"
#include "nfbGlyph.h"

void xxxDrawMonoGlyphs ( nfbGlyphInfo *glyph_info, unsigned int nglyphs, unsigned long fg, unsigned char alu, unsigned long planemask, nfbFontPSPtr pPS, 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

DrawMonoGlyphs draws nglyphs glyphs, applying alu and planemask to all writes. The glyph image is color-expanded so that all 1 bits in the source are drawn with the foreground color specified by fg.

Arguments

The arguments are:

glyph_info
pointer to the first of nglyphs count nfbGlyphInfo(D4nfb) structures.

nglyphs
the count of nfbGlyphInfo structures

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.

pPS
pointer to an nfb font-per-screen structure

pDrawable
pointer to an X structure called DrawableRec. This pointer is only used to access your screen private data. The ScreenRec structure is pointed to by pDrawable->pScreen. Your screen private is connected to the bottom of ScreenRec.

Exit codes

None

Usage

This routine differs from DrawMonoImage in that two more pieces of information are passed in. One is a unique font identifier, pPS, and the other is a unique glyph ID within that font, glyph_info->glyph_id. This information can be used to cache glyphs in extra video memory.

The routine pointed to by the ClearFont member of the nfbScrnPriv(D4nfb) structure is called when a font is unrealized (freed) from the server. If the display driver is caching glyphys in the adapter's memory, the glyphys that belong to the private count identified by the fontID member of the nfbScrnPriv structure can be cleared from the cache.

Version applicability

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

Compatibility notes

For older versions of the X server, DrawMonoGlyphs( ) has a slightly different syntax, using unsigned long fontid as the 6th argument instead of nfbFontPSPtr pPS.
   void (* DrawMonoGlyphs) ( struct _nfbGlyphInfo *, unsigned int,
   				unsigned long, unsigned char,
   				unsigned long, unsigned long,
   				struct _Drawable * ) ;

Source files


Routine source
./hw/sco/ports/gen/genGlyph.c

Driver source file
xxxGlyph.c

Defined in
nfbWinOps structure in xxxData.c

Prototyped in
xxxProcs.h

References

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