A class to make it easier to convert dimensions.
See also
wx.richtext.RichTextAttr, wx.richtext.RichTextCtrl, wx.richtext.TextAttrDimension
Constructor. |
|
Converts pixels to tenths of a mm. |
|
Converts tenths of a mm to pixels. |
|
Gets the pixel size for the given dimension. |
|
Gets the mm size for the given dimension. |
A public C++ attribute of type |
|
A public C++ attribute of type |
|
A public C++ attribute of type |
wx.richtext.
TextAttrDimensionConverter
(object)¶Possible constructors:
TextAttrDimensionConverter(dc, scale=1.0, parentSize=DefaultSize)
TextAttrDimensionConverter(ppi, scale=1.0, parentSize=DefaultSize)
A class to make it easier to convert dimensions.
__init__
(self, *args, **kw)¶Constructor.
__init__ (self, dc, scale=1.0, parentSize=DefaultSize)
__init__ (self, ppi, scale=1.0, parentSize=DefaultSize)
ppi (int) –
scale (float) –
parentSize (wx.Size) –
ConvertPixelsToTenthsMM
(self, pixels)¶Converts pixels to tenths of a mm.
pixels (int) –
int
ConvertTenthsMMToPixels
(self, units)¶Converts tenths of a mm to pixels.
units (int) –
int
GetPixels
(self, dim, direction=HORIZONTAL)¶Gets the pixel size for the given dimension.
dim (wx.richtext.TextAttrDimension) –
direction (int) –
int
GetTenthsMM
(self, dim)¶Gets the mm size for the given dimension.
dim (wx.richtext.TextAttrDimension) –
int
m_ppi
¶A public C++ attribute of type int
.
m_scale
¶A public C++ attribute of type float
.