John Labenski <jlaben...@gmail.com> wrote: (06/03/2009 03:06) > >On Wed, Mar 4, 2009 at 4:01 AM, lostgallifreyan ><lostgallifre...@gmail.com> wrote: >>> >>>I would load the original as a wxImage and convert it to a wxBitmap >>>for drawing, saving both of these. If the zoom changes, use the >>>wxImage functions to rescale into the same wxBimap and use this to >>>draw into your DC. That way your wxBitmap is ready to go when it comes >>>time to paint. If you plan to zoom way in or the image is huge you may >>>want to crop the wxImage to a temporary wxImage of the size and >>>position of the scrolled window before scaling it, then create the >>>wxBitmap for drawing, but note that you will have to do this in real >>>time for scrolling. >>> >> >> Nice, I'll try it. It's close to what I had in mind too.The bit about >> 'saving' both the wxImage and wxBitmap puzzles me though, you mean to file >> on disk, or to a holding variable at runtime? (I guess latter). Also, if I >> opt for a crude pixel resize, is there a way that doesn't need to use the >> wxImage? (Pixel resize is fast, and adequate for this, probably.) I'll still >> likely use the wxImage though, because the image IS huge, I'll definitely >> want to crop it if it works fast. (1.2 GHz ITX board, running W98 SE). >> > >Both the original unscaled and uncropped wxImage and the >scaled/cropped wxBitmap are in memory.
I still don't understand.. Unless you mean keeping them there, by assigning them to variables as I mentioned before deleting a DC. ('Saving' to most people, means to disk). >You can also try using >wxDC::SetUserScale() IIRC. Nice, but it looked vile at half-scale. :) And moved like crystallised molasses, and wouldn't show at all at 2x. I think I'll crop and do bicubic upscale on small areas, and a bilinear shrink for a 'view all' option. That way I can avoid scrolling and scaling at same time. Unlike the tools used on PDA's, I have 1280x1024 pixels to play with. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users