On Tue, Jan 28, 2014 at 3:20 AM, Nouvelle Collection <
[email protected]> wrote:
> I tried by modifying 50ms to 5ms as you suggested but it does not change.
>
odd -- itworks for me if I change that -- are you sure the new code is
what's running?
Also, you could try removing the timer call altogether -- maybe it has a
minimum:
def OnSize(self, event=None):
self.InitializePanel()
#self.SizeTimer.Start(50, oneShot=True)
self.OnSizeTimer()
> In fact, the resizing of the main image *is* fast already, but the
> resizing of the Canvas is not, as you can see on this small GIF animation I
> did (< 2 MB) :
> https://dl.dropboxusercontent.com/u/83031018/slowresize.gif
>
> Sorry it's a bit too fast, but can you see that the resizing of the canvas
> produces a too slow light grey background while I'm resizing ?
>
that is odd, but I can't explain it -- perhaps the Paint event is getting
called mixed in with the Size events.... So you get the image re-drawn on
the not-yet-resized buffer. What platform are you on? that may make a
difference.
-CHB
> The code I used is the code you sent me in the other topic
> (ScaledBitmap2Demo.py ; I just removed the Navigation buttons).
>
> Do you have any idea ?
>
> All the best, Jo
>
>
>
>
>
>
> 2014-01-28 Chris Barker <[email protected]>
>
>> On Mon, Jan 27, 2014 at 4:13 PM, Nouvelle Collection <
>> [email protected]> wrote:
>>
>>> I notice that when I resize the parent wx.Panel of a Canvas, there is a
>>> time moment (approx 0,5 second) during which the Canvas is not refreshed.
>>> After this 0,5 second, the Canvas is redrawn. Is there a way to modify this
>>> "waiting time before redraw" ?
>>>
>>
>> hmm -- there is a time delay built in when re-sizing, so that it wo'nt
>> try to re-draw 100 times qs you re-size the canvas. /but it is set to 50
>> microseconds, which should be 0.05 seconds, not 0.5... Not sure why It's so
>> slow for you.
>>
>> Unfortunately, i didn't make the time delay a class attribute, so you
>> have to dig into the code ot change it. Which is not too hard. Look in
>> wx.lib.floatcanvas.FloatCanvas, for:
>>
>> def OnSize(self, event=None):
>> self.InitializePanel()
>> self.SizeTimer.Start(50, oneShot=True)
>>
>> (around line 2766)
>>
>> Try changing the "50" and see what you get.
>>
>> -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
>>
>> [email protected]
>>
>> _______________________________________________
>> FloatCanvas mailing list
>> [email protected]
>> http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>>
>>
>
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>
>
--
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
[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas