As long as you create your offscreen window using nativeFormat, it should work fine. I do this in my app and it renders correctly on both the m130 (OS 4.1) and my Tungsten T (OS 5.0).Okay...I've now asked this three times, but so far there hasn't been a single response. (I'm beginning to think I'm invisible! ;-)
I have an application that I do graphing in. My implementation is such that I create an offscreen window, render the graph to this, and then Copy the offscreen rectangle to the main screen.
This works fine in low-res, but on hi-res screens, it doesn't look that good. My text labels, for example, are rendered low-res instead of smooth like everything else. I haven't been able to figure out how to modify the code to work in hi-res, if available.
I have looked at the Reference document. I determined that I will need to call WinGetSupportedDensity to find out if it supports double density (hi-res). But, what I'm confused about is the drawing itself. If I create an offscreen draw window at the normal size, but first call WinSetScreenCoordinates (or whatever the API is called), will this automatically scale my size...or do I need to double the size of the offscreen window?
Then, when I actually draw to the offscreen, do I simply double all values, or will I need to set the screen coordinates, instead? What about when I call WinDrawChars? How do I get that to draw to the offscreen window in hi-res font? Finally, when it comes time to copy the rectangle to the main screen, I'm not sure how the translation all works.
Can someone PLEASE help? I'm lost on this issue. I'm basically waiting for someone to respond with some advice. Thanks!
Ryan
So, the call should look like:
Uint16 err; WinCreateOffscreenWindow(160, 160, nativeFormat, &err);
Even though you specify 160x160, by using nativeFormat, it'll actually create a 320x320 surface on double-density devices. If you're doing double-buffering using an offscreen surface, you should be using nativeFormat anyway, since that will copy to the display the fastest.
By the way, if you read the Palm OS Companion/Reference docs, available at PalmSource, it would tell you all this.
- Eron
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
