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