wx.lib.floatcanvas.FCObjects.ScaledBitmap2¶
Draws a scaled bitmap
An alternative scaled bitmap that only scaled the required amount of the main bitmap when zoomed in: EXPERIMENTAL!
Class Hierarchy¶
Known Superclasses¶
wx.lib.floatcanvas.FCObjects.DrawObject
, wx.lib.floatcanvas.FCObjects.TextObjectMixin
Methods Summary¶
Default class constructor. |
|
Calculate the bounding box. |
|
Computes the bitmap coords from World coords. |
Class API¶
- class ScaledBitmap2(TextObjectMixin, DrawObject)¶
Draws a scaled bitmap
An alternative scaled bitmap that only scaled the required amount of the main bitmap when zoomed in: EXPERIMENTAL!
Methods¶
- __init__(self, Bitmap, XY, Height, Width=None, Position='tl', InForeground=False)¶
Default class constructor.
- Parameters:
Bitmap (wx.Bitmap) – the bitmap to be drawn
XY – the (x, y) coordinate of the corner of the scaled bitmap, or a 2-tuple, or a (2,) NumPy array
Height – height to be used
Width – width to be used, if
None
width is calculated from the aspect ratio of the bitmapPosition (string) –
a two character string indicating where in relation to the coordinates the bitmap should be oriented
1st character
Meaning
t
top
c
center
b
bottom
2nd character
Meaning
l
left
c
center
r
right
InForeground (boolean) – should object be in foreground
- CalcBoundingBox(self)¶
Calculate the bounding box.
- WorldToBitmap(self, Pw)¶
Computes the bitmap coords from World coords.