#include <wx/richtext/richtextbuffer.h>
A class to make it easier to convert dimensions.
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 |
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.
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.
wxSize wxTextAttrDimensionConverter::m_parentSize |
int wxTextAttrDimensionConverter::m_ppi |
double wxTextAttrDimensionConverter::m_scale |