38using namespace std::placeholders;
42 const wxPoint& aPosition,
const wxSize& aSize,
64 cs = frame->GetColorSettings();
87 m_view->UpdateAllLayersColor();
92 std::vector<MSG_PANEL_ITEM>& aList )
104 m_view->RecacheAllItems();
126 if( gerber ==
nullptr )
151 m_view->SetLayerTarget( i, target );
186 m_view->SetTopLayer( aLayer );
195 m_view->UpdateAllLayersOrder();
constexpr EDA_IU_SCALE gerbIUScale
Color settings are a bit different than most of the settings objects in that there can be more than o...
The base class for create windows for drawing purpose.
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
EDA_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
Create a drawing panel that is contained inside aParentWindow.
@ GAL_TYPE_OPENGL
OpenGL implementation.
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
GAL_TYPE m_backend
Currently used GAL.
EDA_DRAW_FRAME * GetParentEDAFrame() const
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
Hold the image data and parameters for one gerber file and layer parameters.
GERBER_DRAW_ITEMS & GetItems()
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
std::unique_ptr< DS_PROXY_VIEW_ITEM > m_drawingSheet
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Set or update the drawing-sheet (borders and title block) used by the draw panel.
void setDefaultLayerDeps()
< Set rendering targets & dependencies for layers.
GERBVIEW_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
virtual void SetTopLayer(int aLayer) override
Return the bounding box of the view that should be used if model is not valid.
virtual ~GERBVIEW_DRAW_PANEL_GAL()
Take care of display settings for the given layer to be displayed in high contrast mode.
void OnShow() override
Called when the window is shown for the first time.
virtual void SetHighContrastLayer(int aLayer) override
bool SwitchBackend(GAL_TYPE aGalType) override
Move the selected layer to the top, so it is displayed above all others.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Called when the window is shown for the first time.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
int GetActiveLayer() const
Return the active layer.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
Store GerbView specific render settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void ClearHighContrastLayers()
Clear the list of active layers.
void SetLayerIsHighContrast(int aLayerId, bool aEnabled=true)
Set the specified layer as high-contrast.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
static constexpr int VIEW_MAX_LAYERS
Maximum number of layers that may be shown.
An implementation of class VIEW_CONTROLS for wxWidgets library.
@ LAYER_GERBVIEW_BACKGROUND
#define GERBER_DCODE_LAYER(x)
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
@ LAYER_GP_OVERLAY
General purpose overlay.
@ LAYER_SELECT_OVERLAY
Selected items overlay.
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
#define GERBER_DRAW_LAYER(x)
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_CACHED
Main rendering target (cached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
COLOR_SETTINGS * GetColorSettings(const wxString &aName)
WX_VIEW_CONTROLS class definition.
#define ZOOM_MIN_LIMIT_GERBVIEW
#define ZOOM_MAX_LIMIT_GERBVIEW