Don't use wxDC in header

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2010-10-06 21:27:07 +00:00
parent bec80f4f4a
commit 8995db52f3
2 changed files with 12 additions and 5 deletions

View File

@ -372,11 +372,8 @@ public:
class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter
{
public:
wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize)
{ m_ppi = dc.GetPPI().x; m_scale = scale; m_parentSize = parentSize; }
wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize)
{ m_ppi = ppi; m_scale = scale; m_parentSize = parentSize; }
wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize);
wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize);
int GetPixels(const wxTextAttrDimension& dim, int direction = wxHORIZONTAL) const;
int GetTenthsMM(const wxTextAttrDimension& dim) const;

View File

@ -8656,6 +8656,16 @@ void wxTextAttrDimension::CollectCommonAttributes(const wxTextAttrDimension& att
absentAttr.SetPresent(true);
}
wxTextAttrDimensionConverter::wxTextAttrDimensionConverter(wxDC& dc, double scale, const wxSize& parentSize)
{
m_ppi = dc.GetPPI().x; m_scale = scale; m_parentSize = parentSize;
}
wxTextAttrDimensionConverter::wxTextAttrDimensionConverter(int ppi, double scale, const wxSize& parentSize)
{
m_ppi = ppi; m_scale = scale; m_parentSize = parentSize;
}
int wxTextAttrDimensionConverter::ConvertTenthsMMToPixels(int units) const
{
return wxRichTextObject::ConvertTenthsMMToPixels(m_ppi, units, m_scale);