|
|
#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);
pboxpbox 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.
charschars[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.
countpPSfgbgaluplanemasktransparentfg 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.
pDrawpDraw->pScreen.
Your screen private is connected to the bottom of ScreenRec.
For more information, see ``Terminal fonts'' in Developing NFB graphics adapter drivers.
void (* DrawFontText) ( struct _Box *, unsigned char *chars, unsigned int, unsigned short, int, unsigned long, unsigned long, unsigned char, unsigned long, unsigned char, struct _Drawable * ) ;