KiCad PCB EDA Suite
|
Container for all the knowledge about how graphical objects are drawn on any output surface/device. More...
#include <render_settings.h>
Public Member Functions | |
RENDER_SETTINGS () | |
virtual | ~RENDER_SETTINGS () |
virtual void | LoadColors (const COLOR_SETTINGS *aSettings) |
void | SetLayerIsHighContrast (int aLayerId, bool aEnabled=true) |
Set the specified layer as high-contrast. | |
bool | GetLayerIsHighContrast (int aLayerId) const |
Return information whether the queried layer is marked as high-contrast. | |
const std::set< int > | GetHighContrastLayers () const |
Returns the set of currently high-contrast layers. | |
PCB_LAYER_ID | GetPrimaryHighContrastLayer () const |
Return the board layer which is in high-contrast mode. | |
PCB_LAYER_ID | GetActiveLayer () const |
void | SetActiveLayer (PCB_LAYER_ID aLayer) |
const wxString & | GetLayerName () const |
void | SetLayerName (const wxString &aLayerName) |
LSET | GetPrintLayers () const |
void | SetPrintLayers (const LSET &aLayerSet) |
void | ClearHighContrastLayers () |
Clear the list of active layers. | |
bool | IsHighlightEnabled () const |
Return current highlight setting. | |
const std::set< int > & | GetHighlightNetCodes () const |
Return the netcode of currently highlighted net. | |
void | SetHighlight (bool aEnabled, int aNetcode=-1, bool aMulti=false) |
Turns on/off highlighting. | |
void | SetHighlight (std::set< int > &aHighlight, bool aEnabled=true) |
Turns on highlighting and highlights multiple nets. | |
void | SetHighContrast (bool aEnabled) |
Turns on/off high contrast display mode. | |
bool | GetHighContrast () const |
void | SetDrawBoundingBoxes (bool aEnabled) |
bool | GetDrawBoundingBoxes () 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 currently used render settings. | |
float | GetDrawingSheetLineWidth () const |
int | GetDefaultPenWidth () const |
void | SetDefaultPenWidth (int aWidth) |
int | GetMinPenWidth () const |
void | SetMinPenWidth (int aWidth) |
double | GetDashLengthRatio () const |
void | SetDashLengthRatio (double aRatio) |
double | GetDashLength (int aLineWidth) const |
double | GetDotLength (int aLineWidth) const |
double | GetGapLengthRatio () const |
void | SetGapLengthRatio (double aRatio) |
double | GetGapLength (int aLineWidth) const |
virtual bool | GetShowPageLimits () const |
bool | IsPrinting () const |
void | SetIsPrinting (bool isPrinting) |
bool | IsPrintBlackAndWhite () const |
void | SetPrintBlackAndWhite (bool aPrintBlackAndWhite) |
bool | PrintBlackAndWhiteReq () const |
virtual const COLOR4D & | GetBackgroundColor () const=0 |
Return current background color settings. | |
virtual void | SetBackgroundColor (const COLOR4D &aColor)=0 |
Set the background color. | |
virtual const COLOR4D & | GetGridColor ()=0 |
Return current grid color settings. | |
virtual const COLOR4D & | GetCursorColor ()=0 |
Return current cursor color settings. | |
const COLOR4D & | GetLayerColor (int aLayer) const |
Return the color used to draw a layer. | |
void | SetLayerColor (int aLayer, const COLOR4D &aColor) |
Change the color used to draw a layer. | |
virtual bool | IsBackgroundDark () const |
void | SetOutlineWidth (float aWidth) |
Set line width used for drawing outlines. | |
float | GetOutlineWidth () const |
void | SetHighlightFactor (float aFactor) |
void | SetSelectFactor (float aFactor) |
void | SetDefaultFont (const wxString &aFont) |
const wxString & | GetDefaultFont () const |
wxDC * | GetPrintDC () const |
void | SetPrintDC (wxDC *aDC) |
Protected Member Functions | |
virtual void | update () |
Precalculates extra colors for layers (e.g. | |
Protected Attributes | |
PCB_LAYER_ID | m_activeLayer |
wxString | m_layerName |
std::set< int > | m_highContrastLayers |
std::map< int, COLOR4D > | m_layerColors |
std::map< int, COLOR4D > | m_layerColorsHi |
std::map< int, COLOR4D > | m_layerColorsSel |
std::map< int, COLOR4D > | m_hiContrastColor |
std::map< int, COLOR4D > | m_layerColorsDark |
COLOR4D | m_backgroundColor |
bool | m_hiContrastEnabled |
Parameters for display modes. | |
float | m_hiContrastFactor |
bool | m_highlightEnabled |
std::set< int > | m_highlightNetcodes |
float | m_highlightFactor |
bool | m_drawBoundingBoxes |
float | m_selectFactor |
float | m_outlineWidth |
float | m_drawingSheetLineWidth |
int | m_defaultPenWidth |
int | m_minPenWidth |
double | m_dashLengthRatio |
double | m_gapLengthRatio |
wxString | m_defaultFont |
bool | m_isPrinting |
bool | m_printBlackAndWite |
LSET | m_printLayers |
wxDC * | m_printDC |
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
This includes:
The class acts as an interface between the PAINTER object and the GUI (i.e. Layers/Items widget or display options dialog).
Definition at line 56 of file render_settings.h.
RENDER_SETTINGS::RENDER_SETTINGS | ( | ) |
Definition at line 29 of file render_settings.cpp.
|
virtual |
Definition at line 52 of file render_settings.cpp.
|
inline |
Clear the list of active layers.
Definition at line 125 of file render_settings.h.
|
inline |
Definition at line 113 of file render_settings.h.
|
pure virtual |
Return current background color settings.
|
pure virtual |
Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using currently used render settings.
aItem | is the VIEW_ITEM. |
aLayer | is the layer. |
|
pure virtual |
Return current cursor color settings.
double RENDER_SETTINGS::GetDashLength | ( | int | aLineWidth | ) | const |
Definition at line 67 of file render_settings.cpp.
|
inline |
Definition at line 216 of file render_settings.h.
|
inline |
Definition at line 305 of file render_settings.h.
|
inline |
Definition at line 210 of file render_settings.h.
double RENDER_SETTINGS::GetDotLength | ( | int | aLineWidth | ) | const |
Definition at line 73 of file render_settings.cpp.
|
inline |
Definition at line 196 of file render_settings.h.
|
inline |
Definition at line 208 of file render_settings.h.
double RENDER_SETTINGS::GetGapLength | ( | int | aLineWidth | ) | const |
Definition at line 81 of file render_settings.cpp.
|
inline |
Definition at line 221 of file render_settings.h.
|
pure virtual |
Return current grid color settings.
|
inline |
Definition at line 193 of file render_settings.h.
|
inline |
Returns the set of currently high-contrast layers.
Definition at line 91 of file render_settings.h.
|
inline |
Return the netcode of currently highlighted net.
Definition at line 145 of file render_settings.h.
|
inline |
Return the color used to draw a layer.
aLayer | is the layer number. |
Definition at line 266 of file render_settings.h.
|
inline |
Return information whether the queried layer is marked as high-contrast.
Definition at line 83 of file render_settings.h.
|
inline |
Definition at line 116 of file render_settings.h.
|
inline |
Definition at line 213 of file render_settings.h.
|
inline |
Definition at line 299 of file render_settings.h.
|
inline |
Return the board layer which is in high-contrast mode.
There should only be one board layer which is high-contrast at any given time, although there might be many high-contrast synthetic (GAL) layers.
Definition at line 102 of file render_settings.h.
|
inline |
Definition at line 308 of file render_settings.h.
|
inline |
Definition at line 119 of file render_settings.h.
|
inlinevirtual |
Definition at line 225 of file render_settings.h.
|
inlinevirtual |
Definition at line 288 of file render_settings.h.
|
inline |
Return current highlight setting.
Definition at line 135 of file render_settings.h.
|
inline |
Definition at line 230 of file render_settings.h.
|
inline |
Definition at line 227 of file render_settings.h.
|
inlinevirtual |
Definition at line 62 of file render_settings.h.
|
inline |
Definition at line 236 of file render_settings.h.
|
inline |
Definition at line 114 of file render_settings.h.
|
pure virtual |
Set the background color.
|
inline |
Definition at line 217 of file render_settings.h.
|
inline |
Definition at line 304 of file render_settings.h.
|
inline |
Definition at line 211 of file render_settings.h.
|
inline |
Definition at line 195 of file render_settings.h.
|
inline |
Definition at line 222 of file render_settings.h.
|
inline |
Turns on/off high contrast display mode.
Definition at line 192 of file render_settings.h.
|
inline |
Turns on/off highlighting.
It may be done for the active layer or the specified net(s)..
aEnabled | tells if highlighting should be enabled. |
aNetcode | is optional and if specified, turns on highlighting only for the net with number given as the parameter. |
Definition at line 159 of file render_settings.h.
|
inline |
Turns on highlighting and highlights multiple nets.
aHighlight | is a set of netcodes to highlight |
aEnabled | tells if highlighting should be enabled. |
Definition at line 179 of file render_settings.h.
|
inline |
Definition at line 301 of file render_settings.h.
|
inline |
Definition at line 228 of file render_settings.h.
|
inline |
Change the color used to draw a layer.
aLayer | is the layer number. |
aColor | is the new color. |
Definition at line 281 of file render_settings.h.
|
inline |
Set the specified layer as high-contrast.
aLayerId | is a layer number that should be displayed in a specific mode. |
aEnabled | is the new layer state ( true = active or false = not active). |
Definition at line 70 of file render_settings.h.
|
inline |
Definition at line 117 of file render_settings.h.
|
inline |
Definition at line 214 of file render_settings.h.
|
inline |
Set line width used for drawing outlines.
aWidth | is the new width. |
Definition at line 298 of file render_settings.h.
|
inline |
Definition at line 231 of file render_settings.h.
|
inline |
Definition at line 309 of file render_settings.h.
|
inline |
Definition at line 120 of file render_settings.h.
|
inline |
Definition at line 302 of file render_settings.h.
|
protectedvirtual |
Precalculates extra colors for layers (e.g.
highlighted, darkened and any needed version of base colors).
Definition at line 87 of file render_settings.cpp.
|
protected |
Definition at line 318 of file render_settings.h.
|
protected |
Definition at line 328 of file render_settings.h.
|
protected |
Definition at line 347 of file render_settings.h.
|
protected |
Definition at line 350 of file render_settings.h.
|
protected |
Definition at line 344 of file render_settings.h.
|
protected |
Definition at line 338 of file render_settings.h.
|
protected |
Definition at line 342 of file render_settings.h.
|
protected |
Definition at line 348 of file render_settings.h.
|
protected |
Definition at line 325 of file render_settings.h.
|
protected |
Parameters for display modes.
Definition at line 331 of file render_settings.h.
|
protected |
Definition at line 332 of file render_settings.h.
|
protected |
Definition at line 320 of file render_settings.h.
|
protected |
Definition at line 334 of file render_settings.h.
|
protected |
Definition at line 336 of file render_settings.h.
|
protected |
Definition at line 335 of file render_settings.h.
|
protected |
Definition at line 352 of file render_settings.h.
|
protected |
Definition at line 322 of file render_settings.h.
|
protected |
Definition at line 326 of file render_settings.h.
|
protected |
Definition at line 323 of file render_settings.h.
|
protected |
Definition at line 324 of file render_settings.h.
|
protected |
Definition at line 319 of file render_settings.h.
|
protected |
Definition at line 345 of file render_settings.h.
|
protected |
Definition at line 341 of file render_settings.h.
|
protected |
Definition at line 353 of file render_settings.h.
|
protected |
Definition at line 357 of file render_settings.h.
|
protected |
Definition at line 355 of file render_settings.h.
|
protected |
Definition at line 340 of file render_settings.h.