Use wxWindow instead of wxDisplay for wxGraphicsContext::GetDPI
This commit is contained in:
@@ -29,10 +29,9 @@
|
|||||||
#include "wx/pen.h"
|
#include "wx/pen.h"
|
||||||
#include "wx/region.h"
|
#include "wx/region.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
#include "wx/window.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/display.h"
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#include "wx/msw/enhmeta.h"
|
#include "wx/msw/enhmeta.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -624,7 +623,7 @@ void wxGraphicsContext::GetDPI( wxDouble* dpiX, wxDouble* dpiY)
|
|||||||
{
|
{
|
||||||
if ( m_window )
|
if ( m_window )
|
||||||
{
|
{
|
||||||
const wxSize ppi = wxDisplay(m_window).GetPPI();
|
const wxSize ppi = m_window->GetDPI();
|
||||||
*dpiX = ppi.x;
|
*dpiX = ppi.x;
|
||||||
*dpiY = ppi.y;
|
*dpiY = ppi.y;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user