wxWidgets: wxTextAttrDimensionConverter Class Reference

| Version: 3.0.2

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
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

## 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