Version: 3.0.3
wxTextAttrDimensionConverter Class Reference

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