KiCad PCB EDA Suite
Loading...
Searching...
No Matches
HIDPI_GL_CANVAS Class Reference

wxGLCanvas wrapper for HiDPI/Retina support. More...

#include <hidpi_gl_canvas.h>

Inheritance diagram for HIDPI_GL_CANVAS:
EDA_3D_MODEL_VIEWER HIDPI_GL_3D_CANVAS KIGFX::OPENGL_GAL EDA_3D_CANVAS

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HIDPI_GL_CANVAS()

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.

Member Function Documentation

◆ GetNativePixelSize()

wxSize HIDPI_GL_CANVAS::GetNativePixelSize ( ) const
virtual

◆ GetNativePosition()

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().

◆ GetScaleFactor()

◆ SetVcSettings()

void HIDPI_GL_CANVAS::SetVcSettings ( const KIGFX::VC_SETTINGS aVcSettings)
inline

Definition at line 62 of file hidpi_gl_canvas.h.

Referenced by EDA_3D_VIEWER_FRAME::applySettings().

Member Data Documentation

◆ m_settings

KIGFX::VC_SETTINGS HIDPI_GL_CANVAS::m_settings
protected

< Current VIEW_CONTROLS settings.

Definition at line 66 of file hidpi_gl_canvas.h.

Referenced by HIDPI_GL_3D_CANVAS::OnMouseWheelCamera().


The documentation for this class was generated from the following files: