Also return display DPI from wxScreenDC in wxGTK3
This is similar to the previous commit and is done for the same reasons: screen DC needs to use the same DPI as the screen itself, instead of the default Cairo 72 DPI.
This commit is contained in:
@@ -76,6 +76,8 @@ class wxScreenDCImpl: public wxGTKCairoDCImpl
|
|||||||
public:
|
public:
|
||||||
wxScreenDCImpl(wxScreenDC* owner);
|
wxScreenDCImpl(wxScreenDC* owner);
|
||||||
|
|
||||||
|
virtual wxSize GetPPI() const wxOVERRIDE;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
|
wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
|
||||||
};
|
};
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -364,6 +364,12 @@ wxScreenDCImpl::wxScreenDCImpl(wxScreenDC* owner)
|
|||||||
gc->EnableOffset(m_contentScaleFactor <= 1);
|
gc->EnableOffset(m_contentScaleFactor <= 1);
|
||||||
SetGraphicsContext(gc);
|
SetGraphicsContext(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxSize wxScreenDCImpl::GetPPI() const
|
||||||
|
{
|
||||||
|
return wxGetDisplayPPI();
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC* owner)
|
wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC* owner)
|
||||||
|
Reference in New Issue
Block a user