38 using namespace std::placeholders;
42 const wxPoint& aPosition,
const wxSize& aSize,
66 auto& displ_opts = frame->GetDisplayOptions();
67 auto rs = static_cast<KIGFX::GERBVIEW_RENDER_SETTINGS*>(
70 rs->LoadDisplayOptions( displ_opts );
97 std::vector<MSG_PANEL_ITEM>& aList )
111 static_cast<KIGFX::GERBVIEW_RENDER_SETTINGS*>(
137 if( gerber ==
nullptr )
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
currently selected items overlay
virtual void SetHighContrastLayer(int aLayer) override
#define GERBER_DCODE_LAYER(x)
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
void SetLayerOrder(int aLayer, int aRenderingOrder)
Set rendering order of a particular layer.
GAL_TYPE m_backend
Currently used GAL.
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Set given layer to be displayed on the top or sets back the default order of layers.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
GERBER_DRAW_ITEMS & GetItems()
An implementation of class VIEW_CONTROLS for wxWidgets library.
static constexpr double IU_PER_MM
Mock up a conversion function.
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
BOX2I GetDefaultViewBBox() const override
Return the bounding box of the view that should be used if model is not valid.
void RecacheAllItems()
Rebuild GAL display lists.
Hold the image data and parameters for one gerber file and layer parameters.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Called when the window is shown for the first time.
const GBR_DISPLAY_OPTIONS & GetDisplayOptions() const
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of 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)
The base class for create windows for drawing purpose.
void setDefaultLayerDeps()
< Set rendering targets & dependencies for layers.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
WX_VIEW_CONTROLS class definition.
static constexpr int VIEW_MAX_LAYERS
maximum number of layers that may be shown
Auxiliary rendering target (noncached)
#define ZOOM_MAX_LIMIT_GERBVIEW
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
#define ZOOM_MIN_LIMIT_GERBVIEW
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
std::unique_ptr< DS_PROXY_VIEW_ITEM > m_drawingSheet
void Clear()
Remove all items from the view.
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
void SetLayerDisplayOnly(int aLayer, bool aDisplayOnly=true)
#define GERBER_DRAWLAYERS_COUNT
Items that may change while the view stays the same (noncached)
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
void SetLayerIsHighContrast(int aLayerId, bool aEnabled=true)
Set the specified layer as high-contrast.
drawingsheet frame and titleblock
SETTINGS_MANAGER * GetSettingsManager()
#define GERBER_DRAW_LAYER(x)
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
void ClearTopLayers()
Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void OnShow() override
Called when the window is shown for the first time.
int GetActiveLayer() const
Return the active layer.
bool SwitchBackend(GAL_TYPE aGalType) override
Move the selected layer to the top, so it is displayed above all others.
virtual ~GERBVIEW_DRAW_PANEL_GAL()
Take care of display settings for the given layer to be displayed in high contrast mode.
Main rendering target (cached)
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Set or update the drawing-sheet (borders and title block) used by the draw panel.
EDA_DRAW_FRAME * GetParentEDAFrame() const
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
virtual void SetTopLayer(int aLayer) override
Return the bounding box of the view that should be used if model is not valid.
void ClearHighContrastLayers()
Clear the list of active layers.
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.