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. You can also try using wxDC::SetUserScale() IIRC. Regards, John ------------------------------------------------------------------------------ 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