mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Fixed bug with image getting rescaled to zero width and height.
This commit is contained in:
@@ -2333,7 +2333,7 @@ class ScaledBitmap2(TextObjectMixin, DrawObject, ):
|
||||
Hb = BBbitmap[1,1] - Yb
|
||||
|
||||
FullHeight = ScaleWorldToPixel(self.Height)[0]
|
||||
scale = FullHeight / self.bmpWH[1]
|
||||
scale = float(FullHeight) / float(self.bmpWH[1])
|
||||
Ws = int(scale * Wb + 0.5) # add the 0.5 to round
|
||||
Hs = int(scale * Hb + 0.5)
|
||||
if (self.ScaledBitmap is None) or (self.ScaledBitmap[0] != (Xb, Yb, Wb, Hb, Ws, Ws) ):
|
||||
|
||||
Reference in New Issue
Block a user