wx.richtext.TextAttrDimensionConverter¶A class to make it easier to convert dimensions.
See also
wx.richtext.RichTextAttr, wx.richtext.RichTextCtrl, wx.richtext.TextAttrDimension
Class Hierarchy¶
Inheritance diagram for class TextAttrDimensionConverter:
Methods Summary¶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. |
Properties Summary¶A public C++ attribute of type |
|
A public C++ attribute of type |
|
A public C++ attribute of type |
Class API¶wx.richtext.TextAttrDimensionConverter(object)¶Possible constructors:
TextAttrDimensionConverter(dc : DC, scale: float=1.0, parentSize:
Size=DefaultSize) -> None
TextAttrDimensionConverter(ppi : int, scale: float=1.0, parentSize:
Size=DefaultSize) -> None
A class to make it easier to convert dimensions.
__init__(self, *args, **kw)¶Constructor.
__init__ (self, dc : DC, scale: float=1.0, parentSize: Size=DefaultSize)
__init__ (self, ppi : int, scale: float=1.0, parentSize: Size=DefaultSize)
ppi (int) –
scale (float) –
parentSize (wx.Size) –
None
ConvertPixelsToTenthsMM(self, pixels : int)¶Converts pixels to tenths of a mm.
pixels (int) –
int
ConvertTenthsMMToPixels(self, units : int)¶Converts tenths of a mm to pixels.
units (int) –
int
GetPixels(self, dim : TextAttrDimension, direction: int=HORIZONTAL)¶Gets the pixel size for the given dimension.
dim (wx.richtext.TextAttrDimension) –
direction (int) –
int
GetTenthsMM(self, dim : TextAttrDimension)¶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.