| Version: 3.2.5

Public Member Functions | Public Attributes | List of all members
wxTextAttrDimensionConverter Class Reference
Class List by Category » 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. More...
| wxTextAttrDimensionConverter (int ppi, double scale=1.0, const wxSize &parentSize=wxDefaultSize)
| Constructor. More...
int | GetPixels (const wxTextAttrDimension &dim, int direction=wxHORIZONTAL) const
| Gets the pixel size for the given dimension. More...
int | GetTenthsMM (const wxTextAttrDimension &dim) const
| Gets the mm size for the given dimension. More...
int | ConvertTenthsMMToPixels (int units) const
| Converts tenths of a mm to pixels. More...
int | ConvertPixelsToTenthsMM (int pixels) const
| Converts pixels to tenths of a mm. More...

## Public Attributes

int | m_ppi
double | m_scale
wxSize | m_parentSize

## Constructor & Destructor Documentation

## ◆ wxTextAttrDimensionConverter() [1/2]

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

Constructor.

## ◆ wxTextAttrDimensionConverter() [2/2]

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

Constructor.

## Member Function Documentation

## ◆ ConvertPixelsToTenthsMM()

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

Converts pixels to tenths of a mm.

## ◆ ConvertTenthsMMToPixels()

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

Converts tenths of a mm to pixels.

## ◆ GetPixels()

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

Gets the pixel size for the given dimension.

## ◆ GetTenthsMM()

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

Gets the mm size for the given dimension.

## Member Data Documentation

## ◆ m_parentSize

wxSize wxTextAttrDimensionConverter::m_parentSize

## ◆ m_ppi

int wxTextAttrDimensionConverter::m_ppi

## ◆ m_scale

double wxTextAttrDimensionConverter::m_scale