DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DrawFontText(D3nfb)


DrawFontText -- NFB routine to draw glyphs from fonts

Synopsis

#include "nfbWinStr.h"

void xxxDrawFontText ( BoxPtr pbox, unsigned char *chars, unsigned int count, nfbFontPSPtr pPS, unsigned long fg, unsigned long bg, unsigned char alu, unsigned long planemask, unsigned char transparent, Drawable Ptr pDraw);

Description

DrawFontText draws glyphs from fonts where all glyphs in the font have fixed width and height.

Arguments


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. Your X 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.


chars
points to an array of glyph numbers to be drawn on the screen. chars[0] contains the index value of the first glyph to appear in the line of text, chars[1] is the second, and chars[count - 1 is the last glyph to appear in the line of text on the screen.

count
the number of glyphs in the line of text.

pPS
pointer to an nfb font-per-screen structure

fg
foreground color of text

bg
background color of text. If the characters are to be drawn transparently, this value should be ignored

alu
see ``alu'' in Developing NFB graphics adapter drivers.

planemask
the window planes to be affected.

transparent
A flag that, when set, means that only the fg pixels should be drawn. If this is non-zero, the glyphs should be drawn with a solid foreground and background; if this is zero, the glyphs should be drawn transparently using only the foreground color. This flag is essentially the difference between using DrawMonoImage(D3nfb) when set and DrawOpaqueMonoImage(D3nfb) when clear. If this argument is false, alu and planemask must be ignored.


pDraw
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 pDraw->pScreen. Your screen private is connected to the bottom of ScreenRec.

For more information, see ``Terminal fonts'' in Developing NFB graphics adapter drivers.

Exit codes

None

Porting notes

For older versions of the X server, DrawFontText has a slightly different syntax, using unsigned long fontid as the sixth argument instead of nfbFontPSPtr pPS:
   void (* DrawFontText) ( struct _Box *, unsigned char *chars,
   				unsigned int, unsigned short, int,
   				unsigned long, unsigned long,
   				unsigned char, unsigned long,
   				unsigned char,
   				struct _Drawable * ) ;

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/???

Driver source file
xxxyyy.c

Defined in
nfbWinOps structure in xxxData.c

Prototyped in
xxxProcs.h

References

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