Hello, I add bitmaps to a FloatCanvas with :
self.Canvas.AddScaledBitmap(image, (0,0), Height=image.GetHeight(), Position = 'tl') When I use a PNG of size (x,y) with x <= 100 or y <=100, I have a crash with the following traceback when I do ZoomToBB() : Traceback (most recent call last): >>> File "D:\Documents\test.py", line 471, in Draw >>> self.Canvas.ZoomToBB() >>> File "D:\Documents\floatcanvas\FloatCanvas.py", line 3035, in ZoomToBB >>> self.SetToNewScale(DrawFlag=DrawFlag) >>> File "D:\Documents\floatcanvas\FloatCanvas.py", line 3048, in >>> SetToNewScale >>> self.Draw() >>> File "D:\Documents\floatcanvas\FloatCanvas.py", line 2846, in Draw >>> self._DrawObjects(dc, self._DrawList, ScreenDC, self.ViewPortBB, >>> HTdc) >>> File "D:\Documents\floatcanvas\FloatCanvas.py", line 3186, in >>> _DrawObjects >>> Object._Draw(dc, WorldToPixel, ScaleWorldToPixel, HTdc) >>> File "D:\Documents\floatcanvas\FloatCanvas.py", line 1968, in _Draw >>> Img = self.Image.Scale(W, H) >>> File >>> "C:\ProgramData\Anaconda\lib\site-packages\wx-3.0-msw\wx\_core.py", line >>> 2916, in Scale >>> return _core_.Image_Scale(*args, **kwargs) >>> wx._core.PyAssertionError: C++ assertion "(width > 0) && (height > 0)" >>> failed at ..\..\src\common\image.cpp(433) in wxImage::Scale(): invalid new >>> image size >>> >> Do you have any idea for the reason of this error ? Note : if I resize (with MSPaint for example) the PNG to 101x101 pixels, there is no error anymore... Thank you in advance, Jo
_______________________________________________ FloatCanvas mailing list [email protected] http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
