UInt32 version;
if FtrGet(TRGSysFtrID, TRGVgaFtrNum, &version) == 0)
{
// Extension is present
vgaExists = true;
}
if (vgaExists) VgaSetScreenMode(screenMode1To1, rotateModeNone);
if (vgaExists) VgaFormModify(frm, vgaFormModify160To240);
Here's the part of code I used in J-DOC reader or Date@G... The limitation is that this code allows only drawing. Editting in the field or table is not possible.
Err err; BitmapType *bitmap; BitmapTypeV3 *bitmap3; WindowType *offscreen; WindowType *current; RectangleType rect; current= WinGetDrawWindow(); WinPushDrawState(); WinSetCoordinateSystem( kCoordinatesDouble ); bitmap = BmpCreate( 480,32,1,(ColorTableType *)&mono_clut,&err); bitmap3 = BmpCreateBitmapV3( bitmap, kCoordinatesStandard, BmpGetBits( bitmap), (ColorTableType *)&mono_clut); offscreen = WinCreateBitmapWindow( (BitmapType *)bitmap3, &err); FntSetFont( stdFont ); WinSetDrawWindow(offscreen); WinDrawChars( c, len, 0,0); WinDeleteWindow( offscreen, false); BmpSetDensity( (BitmapType *)bitmap3 , kCoordinatesDouble); offscreen = WinCreateBitmapWindow( (BitmapType *)bitmap3, &err); RctSetRectangle( &rect,0,0,480,( ( FntCharHeight() + 2) / 2 + 1 ) / 2 * 2); WinCopyRectangle( offscreen, current, &rect, x*2,y*2, winPaint); WinDeleteWindow( offscreen, false); BmpDelete( (BitmapType *)bitmap3); BmpDelete( bitmap); WinPopDrawState(); WinSetDrawWindow(current);
At 00:16 02/12/20 -0700, John Gruenenfelder wrote: >On Wed, Dec 18, 2002 at 07:43:39PM -0800, Ron Nicholson wrote: > >Is it possible to copy the bytes (MemMove) from a low density > >bitmap to a high density bitmap of the exact same size in bytes? > > > >Then you could draw low density fonts into a low density bitmap, > >move the raw bytes to a high density bitmap (without pixel doubling), > >and then draw that high density bitmap to the display. > > > >There's also a set of tiny OS 5 font resources somewhere on the > >PalmSource web site. > >If I can find these fonts, and if they are accessible to all, then I think >this would be my preferred solution for now. I honestly don't know how many >people will want tiny text, but if I can point them to downloadable fonts, >they could use them if they want. Weasel Reader has support for user supplied >fonts. > >Barring that, though, your suggestion does sound like a good idea for >implementing the drawing. Not too hard. I was also just thinking that the >only real difference between high and low density bitmaps is the bit which >specifies density. If this is the case, then I should be able to simply >switch the bitmap to low density when I want to write text, then switch it >back when I'm done. Does this sound like a reasonable idea?
만일 위의 방법이 아니라면, HALDrawChars 나 HALDraw_Chars 를 패치한다는 말이 되는데, 해당 함수들은 documentation 이 없기 때문에, 소스를 보지 않고는 어렵겠죠. HALDrawChars 의 인수만도 6개인지 7개인지 헛갈려 하고 있으니까요.