.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.richtext.TextAttrDimensionConverter:
==========================================================================================================================================
|phoenix_title| **wx.richtext.TextAttrDimensionConverter**
==========================================================================================================================================
A class to make it easier to convert dimensions.
.. seealso:: :ref:`wx.richtext.RichTextAttr`, :ref:`wx.richtext.RichTextCtrl`, :ref:`wx.richtext.TextAttrDimension`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
TextAttrDimensionConverter:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.richtext.TextAttrDimensionConverter.__init__` Constructor.
:meth:`~wx.richtext.TextAttrDimensionConverter.ConvertPixelsToTenthsMM` Converts pixels to tenths of a mm.
:meth:`~wx.richtext.TextAttrDimensionConverter.ConvertTenthsMMToPixels` Converts tenths of a mm to pixels.
:meth:`~wx.richtext.TextAttrDimensionConverter.GetPixels` Gets the pixel size for the given dimension.
:meth:`~wx.richtext.TextAttrDimensionConverter.GetTenthsMM` Gets the mm size for the given dimension.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.richtext.TextAttrDimensionConverter.m_parentSize` A public C++ attribute of type `~wx.Size` .
:attr:`~wx.richtext.TextAttrDimensionConverter.m_ppi` A public C++ attribute of type ``int``.
:attr:`~wx.richtext.TextAttrDimensionConverter.m_scale` A public C++ attribute of type ``float``.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: 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.
.. method:: __init__(self, *args, **kw)
Constructor.
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self, dc : DC, scale: float=1.0, parentSize: Size=DefaultSize)`
:param `dc`:
:type `dc`: wx.DC
:param `scale`:
:type `scale`: float
:param `parentSize`:
:type `parentSize`: wx.Size
:rtype: `None`
:html:`
`
**__init__** `(self, ppi : int, scale: float=1.0, parentSize: Size=DefaultSize)`
:param `ppi`:
:type `ppi`: int
:param `scale`:
:type `scale`: float
:param `parentSize`:
:type `parentSize`: wx.Size
:rtype: `None`
:html:`
`
.. method:: ConvertPixelsToTenthsMM(self, pixels : int)
Converts pixels to tenths of a mm.
:param `pixels`:
:type `pixels`: int
:rtype: `int`
.. method:: ConvertTenthsMMToPixels(self, units : int)
Converts tenths of a mm to pixels.
:param `units`:
:type `units`: int
:rtype: `int`
.. method:: GetPixels(self, dim : TextAttrDimension, direction: int=HORIZONTAL)
Gets the pixel size for the given dimension.
:param `dim`:
:type `dim`: wx.richtext.TextAttrDimension
:param `direction`:
:type `direction`: int
:rtype: `int`
.. method:: GetTenthsMM(self, dim : TextAttrDimension)
Gets the mm size for the given dimension.
:param `dim`:
:type `dim`: wx.richtext.TextAttrDimension
:rtype: `int`
.. attribute:: m_parentSize
A public C++ attribute of type `~wx.Size` .
.. attribute:: m_ppi
A public C++ attribute of type ``int``.
.. attribute:: m_scale
A public C++ attribute of type ``float``.