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:
parent
bec80f4f4a
commit
8995db52f3
@ -372,11 +372,8 @@ public:
|
|||||||
class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter
|
class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize)
|
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);
|
||||||
|
|
||||||
wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize)
|
|
||||||
{ m_ppi = ppi; m_scale = scale; m_parentSize = parentSize; }
|
|
||||||
|
|
||||||
int GetPixels(const wxTextAttrDimension& dim, int direction = wxHORIZONTAL) const;
|
int GetPixels(const wxTextAttrDimension& dim, int direction = wxHORIZONTAL) const;
|
||||||
int GetTenthsMM(const wxTextAttrDimension& dim) const;
|
int GetTenthsMM(const wxTextAttrDimension& dim) const;
|
||||||
|
@ -8656,6 +8656,16 @@ void wxTextAttrDimension::CollectCommonAttributes(const wxTextAttrDimension& att
|
|||||||
absentAttr.SetPresent(true);
|
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
|
int wxTextAttrDimensionConverter::ConvertTenthsMMToPixels(int units) const
|
||||||
{
|
{
|
||||||
return wxRichTextObject::ConvertTenthsMMToPixels(m_ppi, units, m_scale);
|
return wxRichTextObject::ConvertTenthsMMToPixels(m_ppi, units, m_scale);
|
||||||
|
Loading…
Reference in New Issue
Block a user