27 #ifndef HIDPI_GL_CANVAS_H 28 #define HIDPI_GL_CANVAS_H 30 #include <wx/glcanvas.h> 42 HIDPI_GL_CANVAS( wxWindow *parent, wxWindowID
id = wxID_ANY,
const int* attribList =
nullptr,
43 const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
44 long style = 0,
const wxString&
name = wxGLCanvasName,
45 const wxPalette& palette = wxNullPalette );
71 #endif // HIDPI_GL_CANVAS_H virtual wxSize GetNativePixelSize() const
wxGLCanvas wrapper for HiDPI/Retina support.
double GetScaleFactor() const
Get the current scale factor.
HIDPI_GL_CANVAS(wxWindow *parent, wxWindowID id=wxID_ANY, const int *attribList=nullptr, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGLCanvasName, const wxPalette &palette=wxNullPalette)
double m_scale_factor
The current scale factor (e.g.
wxPoint GetNativePosition(const wxPoint &aPoint) const
Convert the given point from client coordinates to native pixel coordinates.
void SetScaleFactor(double aFactor)
Set the canvas scale factor, probably for a hi-DPI display.