wxTextAttrDimensionConverter Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
wxTextAttrDimensionConverter Class Reference
Class List by Category » Rich Text

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/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() [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