Phoenix Logo

phoenix_title wx.richtext.TextAttrDimensionConverter

A class to make it easier to convert dimensions.


class_hierarchy Class Hierarchy

Inheritance diagram for class TextAttrDimensionConverter:


method_summary Methods Summary

__init__ Constructor.
ConvertPixelsToTenthsMM Converts pixels to tenths of a mm.
ConvertTenthsMMToPixels Converts tenths of a mm to pixels.
GetPixels Gets the pixel size for the given dimension.
GetTenthsMM Gets the mm size for the given dimension.

property_summary Properties Summary

m_parentSize A public C++ attribute of type Size .
m_ppi A public C++ attribute of type int.
m_scale A public C++ attribute of type float.

api Class API



class 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.


Methods



__init__(self, *args, **kw)

Constructor.

overload Overloaded Implementations:



__init__ (self, dc, scale=1.0, parentSize=DefaultSize)

Parameters:



__init__ (self, ppi, scale=1.0, parentSize=DefaultSize)

Parameters:
  • ppi (int) –
  • scale (float) –
  • parentSize (wx.Size) –





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:
Return type:

int



GetTenthsMM(self, dim)

Gets the mm size for the given dimension.

Parameters:dim (wx.richtext.TextAttrDimension) –
Return type:int

Properties



m_parentSize

A public C++ attribute of type Size .



m_ppi

A public C++ attribute of type int.



m_scale

A public C++ attribute of type float.