Note:
linewin is an offscreen window which is font height tall and 320 pixels wide (in hires).
void
Main::DrawText (Coord x,
Coord y,
Char* str)
{
BitmapPtr bmp;
RectangleType r;
bmp = draw.GetWindowBitmap(lineWin);
WinSetDrawWindow(lineWin);
r.topLeft.x = 0;
r.topLeft.y = 0;
r.extent.x = 320;
r.extent.y = FntCharHeight();
WinEraseRectangle(&r, 0);
WinDrawChars(buffer, StrLen(buffer), 0, 0);
BmpSetDensity(bmp, kDensityDouble);
WinCopyRectangle(lineWin, WinGetDisplayWindow(), &r, x, y, winPaint); BmpSetDensity(bmp, kDensityLow);
WinSetDrawWindow(WinGetDisplayWindow()); } // DrawText
Chris Olson
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/