24#ifndef RENDER_SETTINGS_H
25#define RENDER_SETTINGS_H
159 inline void SetHighlight(
bool aEnabled,
int aNetcode = -1,
bool aMulti =
false )
179 inline void SetHighlight( std::set<int>& aHighlight,
bool aEnabled =
true )
Color settings are a bit different than most of the settings objects in that there can be more than o...
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D BLACK
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
COLOR4D m_backgroundColor
void SetOutlineWidth(float aWidth)
Set line width used for drawing outlines.
void SetDrawBoundingBoxes(bool aEnabled)
virtual bool IsBackgroundDark() const
const std::set< int > & GetHighlightNetCodes() const
Return the netcode of currently highlighted net.
double GetGapLength(int aLineWidth) const
int GetDefaultPenWidth() const
double GetGapLengthRatio() const
void SetDefaultPenWidth(int aWidth)
void ClearHighContrastLayers()
Clear the list of active layers.
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
virtual const COLOR4D & GetGridColor()=0
Return current grid color settings.
int GetMinPenWidth() const
void SetHighContrast(bool aEnabled)
Turns on/off high contrast display mode.
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
float GetOutlineWidth() const
const std::set< int > GetHighContrastLayers() const
Returns the set of currently high-contrast layers.
float GetDrawingSheetLineWidth() const
void SetPrintLayers(LSET aLayerSet)
void SetDefaultFont(const wxString &aFont)
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
void SetActiveLayer(PCB_LAYER_ID aLayer)
void SetGapLengthRatio(double aRatio)
const wxString & GetDefaultFont() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
virtual ~RENDER_SETTINGS()
PCB_LAYER_ID GetActiveLayer() const
void SetPrintBlackAndWhite(bool aPrintBlackAndWhite)
virtual void SetBackgroundColor(const COLOR4D &aColor)=0
Set the background color.
bool PrintBlackAndWhiteReq() const
virtual COLOR4D GetColor(const VIEW_ITEM *aItem, int aLayer) const =0
Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using curr...
double GetDotLength(int aLineWidth) const
std::map< int, COLOR4D > m_layerColorsHi
float m_drawingSheetLineWidth
virtual void update()
Precalculates extra colors for layers (e.g.
bool IsHighlightEnabled() const
Return current highlight setting.
bool GetHighContrast() const
LSET GetPrintLayers() const
PCB_LAYER_ID m_activeLayer
void SetLayerName(const wxString &aLayerName)
void SetDashLengthRatio(double aRatio)
void SetPrintDC(wxDC *aDC)
void SetHighlightFactor(float aFactor)
virtual const COLOR4D & GetBackgroundColor() const =0
Return current background color settings.
void SetMinPenWidth(int aWidth)
void SetIsPrinting(bool isPrinting)
void SetSelectFactor(float aFactor)
bool IsPrintBlackAndWhite() const
std::map< int, COLOR4D > m_hiContrastColor
void SetLayerIsHighContrast(int aLayerId, bool aEnabled=true)
Set the specified layer as high-contrast.
const wxString & GetLayerName() const
bool GetLayerIsHighContrast(int aLayerId) const
Return information whether the queried layer is marked as high-contrast.
std::set< int > m_highlightNetcodes
virtual const COLOR4D & GetCursorColor()=0
Return current cursor color settings.
double GetDashLength(int aLineWidth) const
std::map< int, COLOR4D > m_layerColorsDark
std::map< int, COLOR4D > m_layerColorsSel
wxDC * GetPrintDC() const
std::set< int > m_highContrastLayers
void SetHighlight(std::set< int > &aHighlight, bool aEnabled=true)
Turns on highlighting and highlights multiple nets.
std::map< int, COLOR4D > m_layerColors
bool m_hiContrastEnabled
Parameters for display modes.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual bool GetShowPageLimits() const
double GetDashLengthRatio() const
bool GetDrawBoundingBoxes() const
An abstract base class for deriving all objects that can be added to a VIEW.
LSET is a set of PCB_LAYER_IDs.
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
PCB_LAYER_ID
A quick note on layer IDs:
The Cairo implementation of the graphics abstraction layer.