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 );
wxGLCanvas wrapper for HiDPI/Retina support.
void SetScaleFactor(double aFactor)
Set the canvas scale factor, probably for a hi-DPI display.
virtual wxSize GetNativePixelSize() const
wxPoint GetNativePosition(const wxPoint &aPoint) const
Convert the given point from client coordinates to native pixel coordinates.
double m_scale_factor
The current scale factor (e.g.
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)