Version: 2.9.4
Public Member Functions | Public Attributes
wxTextAttrDimensionConverter Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/richtext/richtextbuffer.h>


Detailed Description

A class to make it easier to convert dimensions.

Library:  wxRichText
Category:  Rich Text
参照:
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

List of all members.


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

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines