Bruno a �crit : > "Luc Le Blanc" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > > I have the same problem and I already considered this offscreen window > > trick. > > But panning once would require to redraw the vectors in the offscreen > window > > in > > order to be ready for the next pan (unless you're able to draw the whole > map > > of > > vectors into an big offscreen window - but even then, a mere zoom would > > require > > a new redraw). > > > > One trick to speed things up (on OS5+ PDAs) is to make your drawing > routine > > a > > PACE Native Object (PNO, previously called ARMlet). > > unfortunately, I have to support OS4.0
So do I. But I was told at the PalmSource dev con that you could link this PNO so that your program could choose which version of the routine to run (68K or PNO); indeed, only OS 5 PDAs would gain. Another suggestion I had there regarding this problem is doing the screen clipping myself: if you draw vectors that exceed the screen boundaries, leaving it up to the OS to do the clipping, it may end up less efficient that if you pre-process your vectors to only supply in-screen co-ordinates to WinDrawLine. All you need is an algorithm that finds the intersection(s) of a vector with a rectangle (the screen), something common in maths (and on the Internet via Google). I have yet to try if to see if it is actually faster - I can keep you posted on that. -- Luc Le Blanc > > Bruno a ecrit : > > > > > "Elvin Ng" <[EMAIL PROTECTED]> |b?l?o news:[EMAIL PROTECTED] > > ?????g > > > ... > > > > Are you redrawing the whole map while panning? > > > > IMO, you should draw the map on an offscreen windows, and this map is > > > bigger > > > > than your display window (like one more window on each sides plus > > > > diagonals). When you pan, you just copy the correct region from the > > > > offscreen to display window without requiring to redraw the whole map > > > again. > > > > > > Yes I am redrawing while panning > > > I do draw the map on an offscreen windows, but don't know how to > > > "just copy the correct region from the offscreen to display window > without > > > requiring to redraw the whole map again." > > > > > > > elv > > > > "Bruno" <[EMAIL PROTECTED]> wrote in message > > > > news:[EMAIL PROTECTED] > > > > > hi all, > > > > > > > > > > I am working on a program that display vector map, > > > > > however I found that when I draw (or redraw the map when panning and > > > > > zooming) the map, > > > > > it is very very slow (the size of one record in a file is about 10 ~ > > > 20KB) > > > > > any suggestion to fasten the speed? > > > > > thx! > > -- Luc Le Blanc -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
