Avoid wxGraphicsContext offsetting on HiDPI displays

For a typical scale factor of 2, there won't be any odd-width lines,
and for any factor greater than 1.0, it won't be doing what was intended,
so just don't do it. See #17375
This commit is contained in:
Paul Cornett
2016-02-22 10:25:16 -08:00
parent 6674ca57da
commit 371ee79f88
5 changed files with 14 additions and 14 deletions

View File

@@ -1724,7 +1724,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
m_width = width;
m_height = height;
m_enableOffset = true;
m_enableOffset = dc.GetContentScaleFactor() <= 1;
#ifdef __WXMSW__
m_mswSurface = cairo_win32_surface_create((HDC)dc.GetHDC());
@@ -1789,7 +1789,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
m_width = width;
m_height = height;
m_enableOffset = true;
m_enableOffset = dc.GetContentScaleFactor() <= 1;
#ifdef __WXMSW__
@@ -1919,7 +1919,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window)
, m_mswWindowHDC(GetHwndOf(window))
#endif
{
m_enableOffset = true;
m_enableOffset = window->GetContentScaleFactor() <= 1;
#ifdef __WXGTK__
// something along these lines (copied from dcclient)