Hi All,

I need to draw some rectangle part from bitmap resource on screen (or
another) canvas. AFAIK, usual approach is to use
WinCreateOffscreenWindow, draw bitmap on this offscreen window and the
copy rectangle to target canvas.

I would like to avoid overhead with double-copying. Offscreen window
consumes memory from dynamic heap, so there is a limit on size and
number of bitmaps to be "precached". Drawing bitmap right before copying
causes additional delay.

I wonder, why WinCreateBitmapWindow form SDK 3.5 doesn't not allow to
pass as paramater pointer to locked resource. I've made a lot of
experiments and get, that WinCreateBitmapWindow succeeded only with
bitmaps created with BmpCreate :( (they are created in dynamic memory
too).

Another solution is to split bitmap on tiles to draw each of it with
WinDrawBitmap. I don't like this method because of huge numbers of tiles
(a few thousands). It's difficult to manage them, and such a database
requires a very long time to install.

Now, I prefer to use direct drawing. Structure of windows and bitmaps is
documented enough to allow drawing by the memory-to-memory copying. Such
approach, of course, causes a lot of extra problems -- possible
inconsistencies with different OS versions and hardware, extra coding
for working with different screen depths, but minimizes program requires
on memory size and provides apropriate performance.

I would like to get any advice on this problem. 

WBR,
-- 
Alexander Horoshilov

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to