# wxTextAttrDimensionConverter Class Reference
[Rich Text]

`#include <wx/richtext/richtextbuffer.h>`

## Detailed Description

A class to make it easier to convert dimensions.

##

Library: wxRichText

Category: Rich Text

See also:
  wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimension

## Public Member Functions
| wxTextAttrDimensionConverter (wxDC &dc, double scale=1.0, const wxSize &parentSize=wxDefaultSize)
| Constructor.
| wxTextAttrDimensionConverter (int ppi, double scale=1.0, const wxSize &parentSize=wxDefaultSize)
| Constructor.
int | GetPixels (const wxTextAttrDimension &dim, int direction=wxHORIZONTAL) const
| Gets the pixel size for the given dimension.
int | GetTenthsMM (const wxTextAttrDimension &dim) const
| Gets the mm size for the given dimension.
int | ConvertTenthsMMToPixels (int units) const
| Converts tenths of a mm to pixels.
int | ConvertPixelsToTenthsMM (int pixels) const
| Converts pixels to tenths of a mm.
## Public Attributes
int | m_ppi
double | m_scale
wxSize | m_parentSize

List of all members.

## Constructor & Destructor Documentation

wxTextAttrDimensionConverter::wxTextAttrDimensionConverter | ( | wxDC & | dc,
|  | double | scale = `1.0`,
|  | const wxSize & | parentSize = `wxDefaultSize` |
| ) |  |  |

Constructor.

wxTextAttrDimensionConverter::wxTextAttrDimensionConverter | ( | int | ppi,
|  | double | scale = `1.0`,
|  | const wxSize & | parentSize = `wxDefaultSize` |
| ) |  |  |

Constructor.

## Member Function Documentation

int wxTextAttrDimensionConverter::ConvertPixelsToTenthsMM | ( | int | pixels | ) | const

Converts pixels to tenths of a mm.

int wxTextAttrDimensionConverter::ConvertTenthsMMToPixels | ( | int | units | ) | const

Converts tenths of a mm to pixels.

int wxTextAttrDimensionConverter::GetPixels | ( | const wxTextAttrDimension & | dim,
|  | int | direction = `wxHORIZONTAL` |
| ) |  |  | const

Gets the pixel size for the given dimension.

int wxTextAttrDimensionConverter::GetTenthsMM | ( | const wxTextAttrDimension & | dim | ) | const

Gets the mm size for the given dimension.

## Member Data Documentation

wxSize wxTextAttrDimensionConverter::m_parentSize

int wxTextAttrDimensionConverter::m_ppi

double wxTextAttrDimensionConverter::m_scale

|  | [ top ]