KiCad PCB EDA Suite
|
wxGLCanvas wrapper for HiDPI/Retina support. More...
#include <hidpi_gl_canvas.h>
Public Member Functions | |
HIDPI_GL_CANVAS (const KIGFX::VC_SETTINGS &aSettings, wxWindow *aParent, const wxGLAttributes &aGLAttribs, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=0, const wxString &aName=wxGLCanvasName, const wxPalette &aPalette=wxNullPalette) | |
virtual wxSize | GetNativePixelSize () const |
wxPoint | GetNativePosition (const wxPoint &aPoint) const |
Convert the given point from client coordinates to native pixel coordinates. | |
double | GetScaleFactor () const |
Get the current scale factor. | |
void | SetVcSettings (const KIGFX::VC_SETTINGS &aVcSettings) |
Protected Attributes | |
KIGFX::VC_SETTINGS | m_settings |
< Current VIEW_CONTROLS settings. | |
wxGLCanvas wrapper for HiDPI/Retina support.
This is a small wrapper class to enable HiDPI/Retina support for wxGLCanvas.
Definition at line 40 of file hidpi_gl_canvas.h.
HIDPI_GL_CANVAS::HIDPI_GL_CANVAS | ( | const KIGFX::VC_SETTINGS & | aSettings, |
wxWindow * | aParent, | ||
const wxGLAttributes & | aGLAttribs, | ||
wxWindowID | aId = wxID_ANY , |
||
const wxPoint & | aPos = wxDefaultPosition , |
||
const wxSize & | aSize = wxDefaultSize , |
||
long | aStyle = 0 , |
||
const wxString & | aName = wxGLCanvasName , |
||
const wxPalette & | aPalette = wxNullPalette |
||
) |
Definition at line 32 of file hidpi_gl_canvas.cpp.
|
virtual |
Definition at line 42 of file hidpi_gl_canvas.cpp.
References GetScaleFactor().
Referenced by EDA_3D_CANVAS::DoRePaint(), EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), EDA_3D_MODEL_VIEWER::OnPaint(), and KIGFX::OPENGL_GAL::OPENGL_GAL().
wxPoint HIDPI_GL_CANVAS::GetNativePosition | ( | const wxPoint & | aPoint | ) | const |
Convert the given point from client coordinates to native pixel coordinates.
Definition at line 54 of file hidpi_gl_canvas.cpp.
References GetScaleFactor().
Referenced by EDA_3D_MODEL_VIEWER::OnMouseMove(), HIDPI_GL_3D_CANVAS::OnMouseMoveCamera(), and HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().
double HIDPI_GL_CANVAS::GetScaleFactor | ( | ) | const |
Get the current scale factor.
Definition at line 66 of file hidpi_gl_canvas.cpp.
Referenced by KIGFX::OPENGL_GAL::BeginDrawing(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::PREVIEW::GetConstantGlyphHeight(), GetNativePixelSize(), GetNativePosition(), KIGFX::OPENGL_GAL::getScreenPixelSize(), and KIGFX::OPENGL_GAL::ResizeScreen().
|
inline |
Definition at line 62 of file hidpi_gl_canvas.h.
Referenced by EDA_3D_VIEWER_FRAME::applySettings().
|
protected |
< Current VIEW_CONTROLS settings.
Definition at line 66 of file hidpi_gl_canvas.h.
Referenced by HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().