what i'm usually doing is this (and it works fine):
// these defines are necessary, but depeding on the .h-files you're including, one or more (or, most probably: all) of them might already be defined and you'll get a "re-defined" error at compile time. in that case, simply delete the corresponding line(s).
#define sysTrapHighDensityDispatch
#define HIGH_DENSITY_TRAP(selector
#define HDSelectorWinSetCoordinate
UInt16 WinSetCoordinateSystem(UIn
#define kCoordinatesDouble 144
// this command sets the coord system to 320x320:
WinSetCoordinateSystem( kCoordinatesDouble );
// if you want 8 bits color, you need to do this as well:
UInt32 scd = 8;
Boolean scc = true;
WinScreenMode( winScreenModeSet, NULL, NULL, &scd, &scc );
// that's it. you can use WinDrawPixel etc. now based on the 320x320 coord system. be aware, however, that if you use forms or alerts that were designed for default resolution (160x160), they're probably being displayed incorrectly. switch back to the regular resolution before displaying such a form or alert.
--bluelizard
Main Topics
Browse All Topics





by: irivera2Posted on 2005-02-21 at 06:26:24ID: 13362867
Hi...
eGet, NULL, NULL, &depth, NULL);
ordinatesS tandard); kDensityLow, BmpGetBits(bitmapP), NULL); mapType*)b mpv3, &err);
kColor=bla ck; ame), 0, 0); Len(name), 0, 0, 80);
ordinatesD ouble); )bmpv3, kDensityDouble); ;
*)bmpv3, dx, y * 4);
v3); Coord);
The easy way seems to be:
WinSetCoordinateSystem (parameter) where parameter:
72= low res
144= high res
Take a llok at this code (kCoordinatesStandard= 72, kCoordinatesDouble = 144)
WinScreenMode(winScreenMod
WinPushDrawState();
// get low reso size
preCoord = WinGetCoordinateSystem();
preWinH = WinGetDrawWindow();
WinSetCoordinateSystem(kCo
width = FntCharsWidth(name, StrLen(name));
height = FntCharHeight();
dx=(x*4)+(60-(width/2));
// create low reso window
bitmapP = BmpCreate(width, height, (UInt8)depth, NULL, &err);
bmpv3 = BmpCreateBitmapV3(bitmapP,
offWinH = WinCreateBitmapWindow((Bit
WinSetDrawWindow(offWinH);
if(color==0){//White?
WinSetBackColor(255);//bac
transColor=0xFFFF;//black!
}
else{
WinSetBackColor(0);//white
transColor=0x0000;//white!
}
WinSetTextColor(color);
// draw chars
if (width < 80)
WinDrawChars(name,StrLen(n
else
WinDrawTruncChars(name,Str
// convert to high reso
WinSetCoordinateSystem(kCo
BmpSetDensity((BitmapType*
WinSetDrawWindow(preWinH);
WinSetDrawMode(winOverlay)
BmpSetTransparentValue ((BitmapType *)bmpv3,transColor);
WinPaintBitmap((BitmapType
WinDeleteWindow(offWinH, false);
BmpDelete((BitmapType*)bmp
BmpDelete(bitmapP);
WinSetCoordinateSystem(pre
WinPopDrawState();
Ivan Rivera