Sorry for not having answered about this sooner. Thank you very much Chris, now it's easy to change quality settings !
One last thing about this subject : when you resize, you can see that (but it goes very fast): * all items are rescaled and repositionned "one by one" (producing sometimes little "jumps" for little elements that "jump" from 4 to 5 pixels, and their neighboor don't "jump" at the same time) Would it possible (or did you try this in an older version of FloatCanvas?) to have : 1) there is a "full size Bitmap buffer" (for example 1000x800), and all elements are only put here *once* when Added to the canvas 2) When you resize the canvas or ZoomToBB(), this *whole Bitmap* buffer would be rescaled, and redrawed. This would prevent to rescale / reposition all items *one by one*. Have you already tried this ? All the best, J 2014-02-05 18:41 GMT+01:00 Chris Barker <chris.bar...@noaa.gov>: > On Tue, Feb 4, 2014 at 9:03 AM, Nouvelle Collection < > nouvellecollect...@gmail.com> wrote: > >> Thanks for your solution, it works now ! >> I still keep the CallLater(1, self.Canvas.ZoomToBB) because it's >> better to wait before zooming, you're right. >> (By the way would you use CallLater or CallAfter ? It seems that I >> used both without even thinking I was using 2 different things!) >> > > > CallAfter() puts an event on the event stack right away, that will be > executed as soon as the existing events are processed -- i.e. as soon as > possible. > > CallLater() allows you to specify a time delay before the event is > processed. I suppose CallLater with a very short time is essentially the > same, but may produce a tiny bit of overhead setting up a timer. But the > real reson to use CallAfter() rather than CallLater() is so that the intent > is clear. > > Another thing : is it possible to have a better image rendering with > >> "AddScaledBitmap" ? >> >> I don't exactly remember where, but I have once used something like >> wx.IMAGE_QUALITY_HIGH in StaticBitmap or DrawBitmap, and the quality >> of the resizing was greatly improved (the image was smoother, less >> aliasing). >> >> Is this possible in FloatCanvas ? >> > > It wasn't but it is now. The quality setting was hard-coded in. I"ve > enclsoed an updated version (also in SVN that allows you to set the Quality > flag: > > img1 = self.Canvas.AddScaledBitmap(bmp1, (0, 0), Height = > bmp1.GetHeight(), Position = 'tl', Quality='normal') > img2 = self.Canvas.AddScaledBitmap2(bmp2, (100, -100), Height = > bmp2.GetHeight(), Position = 'tl', Quality='high') > > you can also set it after the fact: > > img2.Quality = 'high' > > -Chris > > > > -- > > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > chris.bar...@noaa.gov > > _______________________________________________ > FloatCanvas mailing list > FloatCanvas@paulmcnett.com > http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas > >
_______________________________________________ FloatCanvas mailing list FloatCanvas@paulmcnett.com http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas