KiCad PCB EDA Suite
KIGFX::PCB_RENDER_SETTINGS Class Reference

PCB_RENDER_SETTINGS Stores PCB specific render settings. More...

#include <pcb_painter.h>

Inheritance diagram for KIGFX::PCB_RENDER_SETTINGS:
KIGFX::RENDER_SETTINGS

Public Types

enum  CLEARANCE_MODE {
  CL_NONE = 0x00, CL_PADS = 0x01, CL_VIAS = 0x02, CL_TRACKS = 0x04,
  CL_NEW = 0x08, CL_EDITED = 0x10, CL_EXISTING = 0x20
}
 

Flags to control clearance lines visibility

More...
 
enum  DISPLAY_ZONE_MODE { DZ_HIDE_FILLED = 0, DZ_SHOW_FILLED, DZ_SHOW_OUTLINED }
 

Determines how zones should be displayed

More...
 

Public Member Functions

 PCB_RENDER_SETTINGS ()
 
void LoadDisplayOptions (const PCB_DISPLAY_OPTIONS &aOptions, bool aShowPageLimits)
 Function LoadDisplayOptions Loads settings related to display options (high-contrast mode, full or outline modes for vias/pads/tracks and so on). More...
 
virtual void LoadColors (const COLOR_SETTINGS *aSettings) override
 
virtual const COLOR4DGetColor (const VIEW_ITEM *aItem, int aLayer) const override
 Function GetColor Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using currently used render settings. More...
 
void SetSketchMode (int aItemLayer, bool aEnabled)
 Function SetSketchMode Turns on/off sketch mode for given item layer. More...
 
bool GetSketchMode (int aItemLayer) const
 Function GetSketchMode Returns sketch mode setting for a given item layer. More...
 
void SetSketchModeGraphicItems (bool aEnabled)
 Turns on/off sketch mode for graphic items (DRAWSEGMENTs, texts). More...
 
void EnableZoneOutlines (bool aEnabled)
 Turns on/off drawing outline and hatched lines for zones. More...
 
bool IsBackgroundDark () const override
 
const COLOR4DGetBackgroundColor () override
 Function GetBackgroundColor Returns current background color settings. More...
 
void SetBackgroundColor (const COLOR4D &aColor) override
 Sets the background color. More...
 
const COLOR4DGetGridColor () override
 Function GetGridColor Returns current grid color settings. More...
 
const COLOR4DGetCursorColor () override
 Function GetCursorColor Returns current cursor color settings. More...
 
bool GetCurvedRatsnestLinesEnabled () const
 
bool GetGlobalRatsnestLinesEnabled () const
 
bool GetDrawIndividualViaLayers () const
 
void SetDrawIndividualViaLayers (bool aFlag)
 
void SetActiveLayer (int aLayerId, bool aEnabled=true)
 Function SetActiveLayer Sets the specified layer as active - it means that it can be drawn in a specific mode (eg. More...
 
const std::set< unsigned int > GetActiveLayers ()
 Function GetActiveLayers() Returns the set of currently active layers. More...
 
void ClearActiveLayers ()
 Function ClearActiveLayers Clears the list of active layers. More...
 
bool IsActiveLayer (int aLayerId) const
 Function IsActiveLayer Returns information whether the queried layer is marked as active. More...
 
bool IsHighlightEnabled () const
 Function IsHighlightEnabled Returns current highlight setting. More...
 
const std::set< int > & GetHighlightNetCodes () const
 Function GetHighlightNetCode Returns netcode of currently highlighted net. More...
 
void SetHighlight (bool aEnabled, int aNetcode=-1, bool aHighlightItems=false, bool aMulti=false)
 Function SetHighlight Turns on/off highlighting - it may be done for the active layer, the specified net, or items with their HIGHLIGHTED flags set. More...
 
void SetHighContrast (bool aEnabled)
 Function SetHighContrast Turns on/off high contrast display mode. More...
 
bool GetHighContrast () const
 
float GetWorksheetLineWidth () const
 
int GetDefaultPenWidth () const
 
void SetDefaultPenWidth (int aWidth)
 
bool GetShowPageLimits () const
 
void SetShowPageLimits (bool aDraw)
 
const COLOR4DGetLayerColor (int aLayer) const
 Function GetLayerColor Returns the color used to draw a layer. More...
 
void SetLayerColor (int aLayer, const COLOR4D &aColor)
 Function SetLayerColor Changes the color used to draw a layer. More...
 
void SetOutlineWidth (float aWidth)
 Set line width used for drawing outlines. More...
 
wxDC * GetPrintDC ()
 
void SetPrintDC (wxDC *aDC)
 

Protected Member Functions

virtual void update ()
 Function update Precalculates extra colors for layers (e.g. More...
 

Protected Attributes

bool m_sketchMode [GAL_LAYER_ID_END]
 

Flag determining if items on a given layer should be drawn as an outline or a filled item

More...
 
bool m_sketchGraphics
 

Flag determining if graphic items should be outlined or stroked

More...
 
bool m_sketchText
 

Flag determining if text items should be outlined or stroked

More...
 
bool m_padNumbers
 

Flag determining if pad numbers should be visible

More...
 
bool m_netNamesOnPads
 

Flag determining if net names should be visible for pads

More...
 
bool m_netNamesOnTracks
 

Flag determining if net names should be visible for tracks

More...
 
bool m_netNamesOnVias
 

Flag determining if net names should be visible for vias

More...
 
bool m_zoneOutlines
 

Flag determining if zones should have outlines drawn

More...
 
bool m_curvedRatsnestlines = true
 

Flag determining if ratsnest lines should be drawn curved

More...
 
bool m_globalRatsnestlines = true
 

Flag determining if ratsnest lines are shown by default

More...
 
bool m_drawIndividualViaLayers = false
 
DISPLAY_ZONE_MODE m_displayZone
 

Option for different display modes for zones

More...
 
int m_clearance
 

Clearance visibility settings

More...
 
COLOR4D m_selectionCandidateColor
 

Color used for highlighting selection candidates

More...
 
std::set< unsigned int > m_activeLayers
 Stores active layers number. More...
 
COLOR4D m_layerColors [LAYER_ID_COUNT]
 
COLOR4D m_layerColorsHi [LAYER_ID_COUNT]
 
COLOR4D m_layerColorsSel [LAYER_ID_COUNT]
 
COLOR4D m_hiContrastColor [LAYER_ID_COUNT]
 
COLOR4D m_layerColorsDark [LAYER_ID_COUNT]
 
COLOR4D m_backgroundColor
 
bool m_hiContrastEnabled
 Parameters for display modes. More...
 
float m_hiContrastFactor
 
bool m_highlightEnabled
 
std::set< int > m_highlightNetcodes
 
bool m_highlightItems
 
float m_highlightFactor
 
float m_selectFactor
 
float m_outlineWidth
 
float m_worksheetLineWidth
 
int m_defaultPenWidth
 
bool m_showPageLimits
 
wxDC * m_printDC
 

Static Protected Attributes

static const double MAX_FONT_SIZE = Millimeter2iu( 10.0 )
 

Maximum font size for netnames (and other dynamically shown strings)

More...
 

Friends

class PCB_PAINTER
 

Detailed Description

PCB_RENDER_SETTINGS Stores PCB specific render settings.

Definition at line 60 of file pcb_painter.h.

Member Enumeration Documentation

◆ CLEARANCE_MODE

Flags to control clearance lines visibility

Enumerator
CL_NONE 
CL_PADS 
CL_VIAS 
CL_TRACKS 
CL_NEW 
CL_EDITED 
CL_EXISTING 

Definition at line 66 of file pcb_painter.h.

◆ DISPLAY_ZONE_MODE

Determines how zones should be displayed

Enumerator
DZ_HIDE_FILLED 
DZ_SHOW_FILLED 
DZ_SHOW_OUTLINED 

Definition at line 82 of file pcb_painter.h.

Constructor & Destructor Documentation

◆ PCB_RENDER_SETTINGS()

PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS ( )

Definition at line 51 of file pcb_painter.cpp.

52 {
53  m_backgroundColor = COLOR4D( 0.0, 0.0, 0.0, 1.0 );
54  m_padNumbers = true;
55  m_netNamesOnPads = true;
56  m_netNamesOnTracks = true;
57  m_netNamesOnVias = true;
58  m_zoneOutlines = true;
61  m_sketchGraphics = false;
62  m_sketchText = false;
63  m_selectionCandidateColor = COLOR4D( 0.0, 1.0, 0.0, 0.75 );
64 
65  // By default everything should be displayed as filled
66  for( unsigned int i = 0; i < arrayDim( m_sketchMode ); ++i )
67  {
68  m_sketchMode[i] = false;
69  }
70 
71  update();
72 }
bool m_sketchMode[GAL_LAYER_ID_END]
Flag determining if items on a given layer should be drawn as an outline or a filled item
Definition: pcb_painter.h:171
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:180
DISPLAY_ZONE_MODE m_displayZone
Option for different display modes for zones
Definition: pcb_painter.h:206
COLOR4D m_selectionCandidateColor
Color used for highlighting selection candidates
Definition: pcb_painter.h:212
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:183
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:174
virtual void update()
Function update Precalculates extra colors for layers (e.g.
bool m_sketchText
Flag determining if text items should be outlined or stroked
Definition: pcb_painter.h:177
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:160
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:186
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:209
bool m_zoneOutlines
Flag determining if zones should have outlines drawn
Definition: pcb_painter.h:192
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:189
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40

References arrayDim(), CL_NONE, DZ_SHOW_FILLED, KIGFX::RENDER_SETTINGS::m_backgroundColor, m_clearance, m_displayZone, m_netNamesOnPads, m_netNamesOnTracks, m_netNamesOnVias, m_padNumbers, m_selectionCandidateColor, m_sketchGraphics, m_sketchMode, m_sketchText, m_zoneOutlines, and KIGFX::RENDER_SETTINGS::update().

Member Function Documentation

◆ ClearActiveLayers()

void KIGFX::RENDER_SETTINGS::ClearActiveLayers ( )
inlineinherited

Function ClearActiveLayers Clears the list of active layers.

Definition at line 89 of file render_settings.h.

90  {
91  m_activeLayers.clear();
92  }
std::set< unsigned int > m_activeLayers
Stores active layers number.

References KIGFX::RENDER_SETTINGS::m_activeLayers.

Referenced by GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), and EDA_DRAW_PANEL_GAL::SetHighContrastLayer().

◆ EnableZoneOutlines()

void KIGFX::PCB_RENDER_SETTINGS::EnableZoneOutlines ( bool  aEnabled)
inline

Turns on/off drawing outline and hatched lines for zones.

Definition at line 139 of file pcb_painter.h.

140  {
141  m_zoneOutlines = aEnabled;
142  }
bool m_zoneOutlines
Flag determining if zones should have outlines drawn
Definition: pcb_painter.h:192

References m_zoneOutlines.

Referenced by KIGFX::PCB_PRINT_PAINTER::PCB_PRINT_PAINTER().

◆ GetActiveLayers()

const std::set<unsigned int> KIGFX::RENDER_SETTINGS::GetActiveLayers ( )
inlineinherited

Function GetActiveLayers() Returns the set of currently active layers.

Returns
The set of currently active layers.

Definition at line 80 of file render_settings.h.

81  {
82  return m_activeLayers;
83  }
std::set< unsigned int > m_activeLayers
Stores active layers number.

References KIGFX::RENDER_SETTINGS::m_activeLayers.

Referenced by GRID_HELPER::computeAnchors(), PNS_KICAD_IFACE::IsItemVisible(), GRID_HELPER::queryVisible(), and SELECTION_TOOL::Selectable().

◆ GetBackgroundColor()

const COLOR4D& KIGFX::PCB_RENDER_SETTINGS::GetBackgroundColor ( )
inlineoverridevirtual

Function GetBackgroundColor Returns current background color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 151 of file pcb_painter.h.

151 { return m_layerColors[ LAYER_PCB_BACKGROUND ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]

References LAYER_PCB_BACKGROUND, and KIGFX::RENDER_SETTINGS::m_layerColors.

Referenced by KIGFX::PCB_PAINTER::draw().

◆ GetColor()

const COLOR4D & PCB_RENDER_SETTINGS::GetColor ( const VIEW_ITEM aItem,
int  aLayer 
) const
overridevirtual

Function GetColor Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using currently used render settings.

Parameters
aItemis the VIEW_ITEM.
aLayeris the layer.
Returns
The color.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 219 of file pcb_painter.cpp.

220 {
221  int netCode = -1;
222  const EDA_ITEM* item = dynamic_cast<const EDA_ITEM*>( aItem );
223 
224  if( item )
225  {
226  // Selection disambiguation
227  if( item->IsBrightened() )
228  {
230  }
231 
232  // Don't let pads that *should* be NPTHs get lost
233  if( item->Type() == PCB_PAD_T && dyn_cast<const D_PAD*>( item )->PadShouldBeNPTH() )
234  aLayer = LAYER_MOD_TEXT_INVISIBLE;
235 
236  if( item->IsSelected() )
237  {
238  return m_layerColorsSel[aLayer];
239  }
240 
242  {
243  if( item->IsHighlighted() )
244  return m_layerColorsHi[aLayer];
245  else
246  return m_layerColorsDark[aLayer];
247  }
248 
249  // Try to obtain the netcode for the item
250  if( const BOARD_CONNECTED_ITEM* conItem = dyn_cast<const BOARD_CONNECTED_ITEM*> ( item ) )
251  netCode = conItem->GetNetCode();
252 
253  if( item->Type() == PCB_MARKER_T )
254  return m_layerColors[aLayer];
255 
256  // For vias, some layers depend on other layers in high contrast mode
257  if( m_hiContrastEnabled && item->Type() == PCB_VIA_T &&
258  ( aLayer == LAYER_VIAS_HOLES ||
259  aLayer == LAYER_VIA_THROUGH ||
260  aLayer == LAYER_VIA_MICROVIA ||
261  aLayer == LAYER_VIA_BBLIND ) )
262  {
263  const VIA* via = static_cast<const VIA*>( item );
264  const BOARD* pcb = static_cast<const BOARD*>( item->GetParent() );
265  bool viaActiveLayer = false;
266 
267  for( auto activeLayer : m_activeLayers )
268  {
269  auto lay_id = static_cast<PCB_LAYER_ID>( activeLayer );
270  viaActiveLayer |= via->IsOnLayer( lay_id ) && pcb->IsLayerVisible( lay_id );
271  }
272 
273  if( viaActiveLayer )
274  return m_layerColors[aLayer];
275  else
276  return m_hiContrastColor[aLayer];
277  }
278  }
279 
280  // Single net highlight mode
281  if( m_highlightEnabled && m_highlightNetcodes.count( netCode ) )
282  return m_layerColorsHi[aLayer];
283 
284  // Return grayish color for non-highlighted layers in the high contrast mode
285  if( m_hiContrastEnabled && m_activeLayers.count( aLayer ) == 0 )
286  return m_hiContrastColor[aLayer];
287 
288  // Catch the case when highlight and high-contraste modes are enabled
289  // and we are drawing a not highlighted track
290  if( m_highlightEnabled )
291  return m_layerColorsDark[aLayer];
292 
293  // No special modificators enabled
294  return m_layerColors[aLayer];
295 }
to draw blind/buried vias
bool IsSelected() const
Definition: base_struct.h:207
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
COLOR4D m_layerColors[LAYER_ID_COUNT]
to draw via holes (pad holes do not use this layer)
bool IsBrightened() const
Definition: base_struct.h:210
class D_PAD, a pad in a footprint
Definition: typeinfo.h:90
COLOR4D m_selectionCandidateColor
Color used for highlighting selection candidates
Definition: pcb_painter.h:212
BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected and have...
bool IsHighlighted() const
Definition: base_struct.h:209
COLOR4D m_hiContrastColor[LAYER_ID_COUNT]
std::set< unsigned int > m_activeLayers
Stores active layers number.
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
bool m_hiContrastEnabled
Parameters for display modes.
to draw usual through hole vias
EDA_ITEM * GetParent() const
Definition: base_struct.h:199
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
Function IsLayerVisible is a proxy function that calls the correspondent function in m_BoardSettings ...
Definition: class_board.h:461
class MARKER_PCB, a marker used to show something
Definition: typeinfo.h:99
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:181
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:163
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:97
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
std::set< int > m_highlightNetcodes
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]
KICAD_T Type() const
Function Type()
Definition: base_struct.h:197

References EDA_ITEM::GetParent(), EDA_ITEM::IsBrightened(), EDA_ITEM::IsHighlighted(), BOARD::IsLayerVisible(), VIA::IsOnLayer(), EDA_ITEM::IsSelected(), LAYER_MOD_TEXT_INVISIBLE, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_VIAS_HOLES, KIGFX::RENDER_SETTINGS::m_activeLayers, KIGFX::RENDER_SETTINGS::m_hiContrastColor, KIGFX::RENDER_SETTINGS::m_hiContrastEnabled, KIGFX::RENDER_SETTINGS::m_highlightEnabled, KIGFX::RENDER_SETTINGS::m_highlightItems, KIGFX::RENDER_SETTINGS::m_highlightNetcodes, KIGFX::RENDER_SETTINGS::m_layerColors, KIGFX::RENDER_SETTINGS::m_layerColorsDark, KIGFX::RENDER_SETTINGS::m_layerColorsHi, KIGFX::RENDER_SETTINGS::m_layerColorsSel, m_selectionCandidateColor, PCB_MARKER_T, PCB_PAD_T, PCB_VIA_T, and EDA_ITEM::Type().

Referenced by KIGFX::PCB_PAINTER::draw().

◆ GetCursorColor()

const COLOR4D& KIGFX::PCB_RENDER_SETTINGS::GetCursorColor ( )
inlineoverridevirtual

Function GetCursorColor Returns current cursor color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 160 of file pcb_painter.h.

160 { return m_layerColors[ LAYER_CURSOR ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]

References LAYER_CURSOR, and KIGFX::RENDER_SETTINGS::m_layerColors.

◆ GetCurvedRatsnestLinesEnabled()

bool KIGFX::PCB_RENDER_SETTINGS::GetCurvedRatsnestLinesEnabled ( ) const
inline

Definition at line 162 of file pcb_painter.h.

162 { return m_curvedRatsnestlines; }
bool m_curvedRatsnestlines
Flag determining if ratsnest lines should be drawn curved
Definition: pcb_painter.h:195

References m_curvedRatsnestlines.

◆ GetDefaultPenWidth()

int KIGFX::RENDER_SETTINGS::GetDefaultPenWidth ( ) const
inlineinherited

◆ GetDrawIndividualViaLayers()

bool KIGFX::PCB_RENDER_SETTINGS::GetDrawIndividualViaLayers ( ) const
inline

Definition at line 166 of file pcb_painter.h.

References m_drawIndividualViaLayers.

Referenced by KIGFX::PCB_PAINTER::draw().

◆ GetGlobalRatsnestLinesEnabled()

bool KIGFX::PCB_RENDER_SETTINGS::GetGlobalRatsnestLinesEnabled ( ) const
inline

Definition at line 164 of file pcb_painter.h.

164 { return m_globalRatsnestlines; }
bool m_globalRatsnestlines
Flag determining if ratsnest lines are shown by default
Definition: pcb_painter.h:198

References m_globalRatsnestlines.

◆ GetGridColor()

const COLOR4D& KIGFX::PCB_RENDER_SETTINGS::GetGridColor ( )
inlineoverridevirtual

Function GetGridColor Returns current grid color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 158 of file pcb_painter.h.

References LAYER_GRID, and KIGFX::RENDER_SETTINGS::m_layerColors.

◆ GetHighContrast()

bool KIGFX::RENDER_SETTINGS::GetHighContrast ( ) const
inlineinherited

Definition at line 155 of file render_settings.h.

155 { return m_hiContrastEnabled; }
bool m_hiContrastEnabled
Parameters for display modes.

References KIGFX::RENDER_SETTINGS::m_hiContrastEnabled.

Referenced by PNS_KICAD_IFACE::IsItemVisible(), and SELECTION_TOOL::Selectable().

◆ GetHighlightNetCodes()

const std::set<int>& KIGFX::RENDER_SETTINGS::GetHighlightNetCodes ( ) const
inlineinherited

Function GetHighlightNetCode Returns netcode of currently highlighted net.

Returns
Netcode of currently highlighted net.

Definition at line 119 of file render_settings.h.

120  {
121  return m_highlightNetcodes;
122  }
std::set< int > m_highlightNetcodes

References KIGFX::RENDER_SETTINGS::m_highlightNetcodes.

Referenced by PNS::TOOL_BASE::highlightNet().

◆ GetLayerColor()

const COLOR4D& KIGFX::RENDER_SETTINGS::GetLayerColor ( int  aLayer) const
inlineinherited

Function GetLayerColor Returns the color used to draw a layer.

Parameters
aLayeris the layer number.

Definition at line 203 of file render_settings.h.

204  {
205  return m_layerColors[aLayer];
206  }
COLOR4D m_layerColors[LAYER_ID_COUNT]

References KIGFX::RENDER_SETTINGS::m_layerColors.

Referenced by DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN(), KIGFX::SCH_PAINTER::draw(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawArcWithAngleHighlight(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLine(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineWithAngleHighlight(), KIGFX::SCH_PAINTER::getRenderColor(), LIB_RECTANGLE::Plot(), LIB_CIRCLE::Plot(), LIB_BEZIER::Plot(), LIB_TEXT::Plot(), LIB_ARC::Plot(), SCH_JUNCTION::Plot(), LIB_POLYLINE::Plot(), SCH_BUS_ENTRY_BASE::Plot(), SCH_NO_CONNECT::Plot(), SCH_BITMAP::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_LINE::Plot(), SCH_TEXT::Plot(), LIB_PART::Plot(), SCH_SHEET::Plot(), LIB_PART::PlotLibFields(), DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), LIB_PIN::PlotPinTexts(), LIB_PIN::PlotSymbol(), LIB_POLYLINE::print(), LIB_RECTANGLE::print(), LIB_TEXT::print(), LIB_ARC::print(), SCH_JUNCTION::Print(), LIB_FIELD::print(), SCH_NO_CONNECT::Print(), SCH_BUS_ENTRY_BASE::Print(), LIB_BEZIER::print(), LIB_CIRCLE::print(), SCH_LINE::Print(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), LIB_PIN::PrintPinElectricalTypeName(), LIB_PIN::PrintPinSymbol(), LIB_PIN::PrintPinTexts(), WS_DRAW_ITEM_LINE::PrintWsItem(), WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), WS_DRAW_ITEM_RECT::PrintWsItem(), WS_DRAW_ITEM_TEXT::PrintWsItem(), and KIGFX::WS_PROXY_VIEW_ITEM::ViewDraw().

◆ GetPrintDC()

◆ GetShowPageLimits()

bool KIGFX::RENDER_SETTINGS::GetShowPageLimits ( ) const
inlineinherited

◆ GetSketchMode()

bool KIGFX::PCB_RENDER_SETTINGS::GetSketchMode ( int  aItemLayer) const
inline

Function GetSketchMode Returns sketch mode setting for a given item layer.

Parameters
aItemLayeris the item layer that is changed.

Definition at line 121 of file pcb_painter.h.

122  {
123  return m_sketchMode[aItemLayer];
124  }
bool m_sketchMode[GAL_LAYER_ID_END]
Flag determining if items on a given layer should be drawn as an outline or a filled item
Definition: pcb_painter.h:171

References m_sketchMode.

◆ GetWorksheetLineWidth()

float KIGFX::RENDER_SETTINGS::GetWorksheetLineWidth ( ) const
inlineinherited

◆ IsActiveLayer()

bool KIGFX::RENDER_SETTINGS::IsActiveLayer ( int  aLayerId) const
inlineinherited

Function IsActiveLayer Returns information whether the queried layer is marked as active.

Returns
True if the queried layer is marked as active.

Definition at line 99 of file render_settings.h.

100  {
101  return ( m_activeLayers.count( aLayerId ) > 0 );
102  }
std::set< unsigned int > m_activeLayers
Stores active layers number.

References KIGFX::RENDER_SETTINGS::m_activeLayers.

◆ IsBackgroundDark()

bool KIGFX::PCB_RENDER_SETTINGS::IsBackgroundDark ( ) const
inlineoverridevirtual

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 144 of file pcb_painter.h.

145  {
147 
148  return luma < 0.5;
149  }
double GetBrightness() const
Function GetBrightness Returns the brightness value of the color ranged from 0.0 to 1....
Definition: color4d.h:270
COLOR4D m_layerColors[LAYER_ID_COUNT]

References KIGFX::COLOR4D::GetBrightness(), LAYER_PCB_BACKGROUND, and KIGFX::RENDER_SETTINGS::m_layerColors.

◆ IsHighlightEnabled()

bool KIGFX::RENDER_SETTINGS::IsHighlightEnabled ( ) const
inlineinherited

Function IsHighlightEnabled Returns current highlight setting.

Returns
True if highlight is enabled, false otherwise.

Definition at line 109 of file render_settings.h.

110  {
111  return m_highlightEnabled;
112  }

References KIGFX::RENDER_SETTINGS::m_highlightEnabled.

Referenced by PNS::TOOL_BASE::highlightNet().

◆ LoadColors()

void PCB_RENDER_SETTINGS::LoadColors ( const COLOR_SETTINGS aSettings)
overridevirtual

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 75 of file pcb_painter.cpp.

76 {
78 
79  // Init board layers colors:
80  for( int i = 0; i < PCB_LAYER_ID_COUNT; i++ )
81  {
82  m_layerColors[i] = aSettings->GetColor( i );
83 
84  // Guard: if the alpah channel is too small, the layer is not visible.
85  // clamp it to 0.2
86  if( m_layerColors[i].a < 0.2 )
87  m_layerColors[i].a = 0.2;
88  }
89 
90  // Init specific graphic layers colors:
91  for( int i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; i++ )
92  m_layerColors[i] = aSettings->GetColor( i );
93 
94  // Default colors for specific layers (not really board layers).
95  m_layerColors[LAYER_VIAS_HOLES] = COLOR4D( 0.5, 0.4, 0.0, 0.8 );
97  m_layerColors[LAYER_VIAS_NETNAMES] = COLOR4D( 0.2, 0.2, 0.2, 0.9 );
98  m_layerColors[LAYER_PADS_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
99  m_layerColors[LAYER_PAD_FR_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
100  m_layerColors[LAYER_PAD_BK_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
101 
102  // LAYER_PADS_TH, LAYER_NON_PLATEDHOLES, LAYER_ANCHOR ,LAYER_RATSNEST,
103  // LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA
104  // are initialized from aSettings
105 
106  // These colors are not actually used. Set just in case...
109 
110  // Netnames for copper layers
111  for( LSEQ cu = LSET::AllCuMask().CuStack(); cu; ++cu )
112  {
113  const COLOR4D lightLabel( 0.8, 0.8, 0.8, 0.7 );
114  const COLOR4D darkLabel = lightLabel.Inverted();
115  PCB_LAYER_ID layer = *cu;
116 
117  if( m_layerColors[layer].GetBrightness() > 0.5 )
118  m_layerColors[GetNetnameLayer( layer )] = darkLabel;
119  else
120  m_layerColors[GetNetnameLayer( layer )] = lightLabel;
121  }
122 
123  update();
124 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:712
COLOR4D Inverted() const
Function Inverted Returns an inverted color, alpha remains the same.
Definition: color4d.h:260
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
COLOR4D m_layerColors[LAYER_ID_COUNT]
to draw via holes (pad holes do not use this layer)
Add new GAL layers here.
PCB_LAYER_ID
A quick note on layer IDs:
double a
Alpha component.
Definition: color4d.h:305
virtual void update()
Function update Precalculates extra colors for layers (e.g.
void SetBackgroundColor(const COLOR4D &aColor) override
Sets the background color.
Definition: pcb_painter.h:153
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
COLOR4D GetColor(int aLayer) const
Additional netnames layers (not associated with a PCB layer)
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40

References KIGFX::COLOR4D::a, LSET::AllCuMask(), B_SilkS, F_SilkS, GAL_LAYER_ID_END, GAL_LAYER_ID_START, COLOR_SETTINGS::GetColor(), GetNetnameLayer(), KIGFX::COLOR4D::Inverted(), LAYER_MOD_TEXT_BK, LAYER_MOD_TEXT_FR, LAYER_PAD_BK_NETNAMES, LAYER_PAD_FR_NETNAMES, LAYER_PADS_NETNAMES, LAYER_PADS_PLATEDHOLES, LAYER_PCB_BACKGROUND, LAYER_VIAS_HOLES, LAYER_VIAS_NETNAMES, KIGFX::RENDER_SETTINGS::m_layerColors, PCB_LAYER_ID_COUNT, SetBackgroundColor(), and KIGFX::RENDER_SETTINGS::update().

Referenced by StartPlotBoard().

◆ LoadDisplayOptions()

void PCB_RENDER_SETTINGS::LoadDisplayOptions ( const PCB_DISPLAY_OPTIONS aOptions,
bool  aShowPageLimits 
)

Function LoadDisplayOptions Loads settings related to display options (high-contrast mode, full or outline modes for vias/pads/tracks and so on).

Parameters
aOptionsare settings that you want to use for displaying items.

Definition at line 127 of file pcb_painter.cpp.

129 {
131  m_padNumbers = aOptions.m_DisplayPadNum;
133  m_sketchText = !aOptions.m_DisplayTextFill;
136 
137  // Whether to draw tracks, vias & pads filled or as outlines
143 
144  // Net names display settings
145  switch( aOptions.m_DisplayNetNamesMode )
146  {
147  case 0:
148  m_netNamesOnPads = false;
149  m_netNamesOnTracks = false;
150  m_netNamesOnVias = false;
151  break;
152 
153  case 1:
154  m_netNamesOnPads = true;
155  m_netNamesOnTracks = false;
156  m_netNamesOnVias = true; // Follow pads or tracks? For now we chose pads....
157  break;
158 
159  case 2:
160  m_netNamesOnPads = false;
161  m_netNamesOnTracks = true;
162  m_netNamesOnVias = false; // Follow pads or tracks? For now we chose pads....
163  break;
164 
165  case 3:
166  m_netNamesOnPads = true;
167  m_netNamesOnTracks = true;
168  m_netNamesOnVias = true;
169  break;
170  }
171 
172  // Zone display settings
173  switch( aOptions.m_DisplayZonesMode )
174  {
175  case 0:
177  break;
178 
179  case 1:
181  break;
182 
183  case 2:
185  break;
186  }
187 
188  // Clearance settings
189  switch( aOptions.m_ShowTrackClearanceMode )
190  {
193  break;
194 
197  break;
198 
201  break;
202 
205  break;
206 
209  break;
210  }
211 
212  if( aOptions.m_DisplayPadIsol )
213  m_clearance |= CL_PADS;
214 
215  m_showPageLimits = aShowPageLimits;
216 }
to draw blind/buried vias
multilayer pads, usually with holes
bool m_sketchMode[GAL_LAYER_ID_END]
Flag determining if items on a given layer should be drawn as an outline or a filled item
Definition: pcb_painter.h:171
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:180
DISPLAY_ZONE_MODE m_displayZone
Option for different display modes for zones
Definition: pcb_painter.h:206
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:183
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:174
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
bool m_hiContrastEnabled
Parameters for display modes.
to draw usual through hole vias
bool m_curvedRatsnestlines
Flag determining if ratsnest lines should be drawn curved
Definition: pcb_painter.h:195
bool m_sketchText
Flag determining if text items should be outlined or stroked
Definition: pcb_painter.h:177
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:186
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:209
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:189
bool m_globalRatsnestlines
Flag determining if ratsnest lines are shown by default
Definition: pcb_painter.h:198

References CL_EDITED, CL_EXISTING, CL_NEW, CL_NONE, CL_PADS, CL_TRACKS, CL_VIAS, PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE, DZ_HIDE_FILLED, DZ_SHOW_FILLED, DZ_SHOW_OUTLINED, LAYER_PADS_TH, LAYER_TRACKS, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, m_clearance, PCB_DISPLAY_OPTIONS::m_ContrastModeDisplay, m_curvedRatsnestlines, PCB_DISPLAY_OPTIONS::m_DisplayGraphicsFill, PCB_DISPLAY_OPTIONS::m_DisplayNetNamesMode, PCB_DISPLAY_OPTIONS::m_DisplayPadFill, PCB_DISPLAY_OPTIONS::m_DisplayPadIsol, PCB_DISPLAY_OPTIONS::m_DisplayPadNum, PCB_DISPLAY_OPTIONS::m_DisplayPcbTrackFill, PCB_DISPLAY_OPTIONS::m_DisplayRatsnestLinesCurved, PCB_DISPLAY_OPTIONS::m_DisplayTextFill, PCB_DISPLAY_OPTIONS::m_DisplayViaFill, m_displayZone, PCB_DISPLAY_OPTIONS::m_DisplayZonesMode, m_globalRatsnestlines, KIGFX::RENDER_SETTINGS::m_hiContrastEnabled, m_netNamesOnPads, m_netNamesOnTracks, m_netNamesOnVias, m_padNumbers, PCB_DISPLAY_OPTIONS::m_ShowGlobalRatsnest, KIGFX::RENDER_SETTINGS::m_showPageLimits, PCB_DISPLAY_OPTIONS::m_ShowTrackClearanceMode, m_sketchGraphics, m_sketchMode, m_sketchText, PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_ALWAYS, PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS, PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS, and PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS.

Referenced by FOOTPRINT_VIEWER_FRAME::ApplyDisplaySettingsToGAL().

◆ SetActiveLayer()

void KIGFX::RENDER_SETTINGS::SetActiveLayer ( int  aLayerId,
bool  aEnabled = true 
)
inlineinherited

Function SetActiveLayer Sets the specified layer as active - it means that it can be drawn in a specific mode (eg.

highlighted, so it differs from other layers).

Parameters
aLayerIdis a layer number that should be displayed in a specific mode.
aEnabledis the new layer state ( true = active or false = not active).

Definition at line 67 of file render_settings.h.

68  {
69  if( aEnabled )
70  m_activeLayers.insert( aLayerId );
71  else
72  m_activeLayers.erase( aLayerId );
73  }
std::set< unsigned int > m_activeLayers
Stores active layers number.

References KIGFX::RENDER_SETTINGS::m_activeLayers.

Referenced by GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), and EDA_DRAW_PANEL_GAL::SetHighContrastLayer().

◆ SetBackgroundColor()

void KIGFX::PCB_RENDER_SETTINGS::SetBackgroundColor ( const COLOR4D aColor)
inlineoverridevirtual

Sets the background color.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 153 of file pcb_painter.h.

154  {
156  }
COLOR4D m_layerColors[LAYER_ID_COUNT]

References LAYER_PCB_BACKGROUND, and KIGFX::RENDER_SETTINGS::m_layerColors.

Referenced by LoadColors().

◆ SetDefaultPenWidth()

◆ SetDrawIndividualViaLayers()

void KIGFX::PCB_RENDER_SETTINGS::SetDrawIndividualViaLayers ( bool  aFlag)
inline

Definition at line 167 of file pcb_painter.h.

References m_drawIndividualViaLayers.

Referenced by PCBNEW_PRINTOUT::setupPainter().

◆ SetHighContrast()

void KIGFX::RENDER_SETTINGS::SetHighContrast ( bool  aEnabled)
inlineinherited

Function SetHighContrast Turns on/off high contrast display mode.

Definition at line 154 of file render_settings.h.

154 { m_hiContrastEnabled = aEnabled; }
bool m_hiContrastEnabled
Parameters for display modes.

References KIGFX::RENDER_SETTINGS::m_hiContrastEnabled.

◆ SetHighlight()

void KIGFX::RENDER_SETTINGS::SetHighlight ( bool  aEnabled,
int  aNetcode = -1,
bool  aHighlightItems = false,
bool  aMulti = false 
)
inlineinherited

Function SetHighlight Turns on/off highlighting - it may be done for the active layer, the specified net, or items with their HIGHLIGHTED flags set.

Parameters
aEnabledtells if highlighting should be enabled.
aNetcodeis optional and if specified, turns on higlighting only for the net with number given as the parameter.

Definition at line 132 of file render_settings.h.

134  {
135  m_highlightEnabled = aEnabled;
136 
137  if( aEnabled )
138  {
139  if( !aMulti )
140  m_highlightNetcodes.clear();
141 
142  m_highlightNetcodes.insert( aNetcode );
143  }
144  else
145  m_highlightNetcodes.clear();
146 
147  m_highlightItems = aEnabled ? aHighlightItems : false;
148  }
std::set< int > m_highlightNetcodes

References KIGFX::RENDER_SETTINGS::m_highlightEnabled, KIGFX::RENDER_SETTINGS::m_highlightItems, and KIGFX::RENDER_SETTINGS::m_highlightNetcodes.

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), PNS::TOOL_BASE::highlightNet(), DIALOG_SELECT_NET_FROM_LIST::highlightNetOnBoard(), GERBVIEW_SELECTION_TOOL::Reset(), EE_SELECTION_TOOL::Reset(), and SELECTION_TOOL::Reset().

◆ SetLayerColor()

void KIGFX::RENDER_SETTINGS::SetLayerColor ( int  aLayer,
const COLOR4D aColor 
)
inlineinherited

Function SetLayerColor Changes the color used to draw a layer.

Parameters
aLayeris the layer number.
aColoris the new color.

Definition at line 214 of file render_settings.h.

215  {
216  m_layerColors[aLayer] = aColor;
217 
218  update(); // recompute other shades of the color
219  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
virtual void update()
Function update Precalculates extra colors for layers (e.g.

References KIGFX::RENDER_SETTINGS::m_layerColors, and KIGFX::RENDER_SETTINGS::update().

Referenced by PLEDITOR_PRINTOUT::PrintPage(), DIALOG_PAD_PROPERTIES::redraw(), PCBNEW_PRINTOUT::setupPainter(), and DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample().

◆ SetOutlineWidth()

void KIGFX::RENDER_SETTINGS::SetOutlineWidth ( float  aWidth)
inlineinherited

Set line width used for drawing outlines.

Parameters
aWidthis the new width.

Definition at line 231 of file render_settings.h.

232  {
233  m_outlineWidth = aWidth;
234  }

References KIGFX::RENDER_SETTINGS::m_outlineWidth.

◆ SetPrintDC()

◆ SetShowPageLimits()

void KIGFX::RENDER_SETTINGS::SetShowPageLimits ( bool  aDraw)
inlineinherited

◆ SetSketchMode()

void KIGFX::PCB_RENDER_SETTINGS::SetSketchMode ( int  aItemLayer,
bool  aEnabled 
)
inline

Function SetSketchMode Turns on/off sketch mode for given item layer.

Parameters
aItemLayeris the item layer that is changed.
aEnableddecides if it is drawn in sketch mode (true for sketched mode, false for filled mode).

Definition at line 111 of file pcb_painter.h.

112  {
113  m_sketchMode[aItemLayer] = aEnabled;
114  }
bool m_sketchMode[GAL_LAYER_ID_END]
Flag determining if items on a given layer should be drawn as an outline or a filled item
Definition: pcb_painter.h:171

References m_sketchMode.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetSketchModeGraphicItems()

void KIGFX::PCB_RENDER_SETTINGS::SetSketchModeGraphicItems ( bool  aEnabled)
inline

Turns on/off sketch mode for graphic items (DRAWSEGMENTs, texts).

Parameters
aEnableddecides if it is drawn in sketch mode (true for sketched mode, false for filled mode).

Definition at line 131 of file pcb_painter.h.

132  {
133  m_sketchGraphics = aEnabled;
134  }
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:174

References m_sketchGraphics.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ update()

void RENDER_SETTINGS::update ( )
protectedvirtualinherited

Function update Precalculates extra colors for layers (e.g.

highlighted, darkened and any needed version of base colors).

Definition at line 52 of file render_settings.cpp.

53 {
54  // Calculate darkened/highlighted variants of layer colors
55  for( int i = 0; i < LAYER_ID_COUNT; i++ )
56  {
62  }
63 }
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
COLOR4D m_layerColors[LAYER_ID_COUNT]
COLOR4D Darkened(double aFactor) const
Function Darkened Returns a color that is darker by a given factor, without modifying object.
Definition: color4d.h:216
COLOR4D m_hiContrastColor[LAYER_ID_COUNT]
COLOR4D Brightened(double aFactor) const
Function Brightened Returns a color that is brighter by a given factor, without modifying object.
Definition: color4d.h:200
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
#define LAYER_ID_COUNT
Must update this if you add any enums after GerbView!
COLOR4D Mix(const COLOR4D &aColor, double aFactor) const
Function Mix Returns a color that is mixed with the input by a factor.
Definition: color4d.h:232
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]

References KIGFX::COLOR4D::Brightened(), KIGFX::COLOR4D::Darkened(), LAYER_ID_COUNT, LAYER_PCB_BACKGROUND, KIGFX::RENDER_SETTINGS::m_hiContrastColor, KIGFX::RENDER_SETTINGS::m_hiContrastFactor, KIGFX::RENDER_SETTINGS::m_highlightFactor, KIGFX::RENDER_SETTINGS::m_layerColors, KIGFX::RENDER_SETTINGS::m_layerColorsDark, KIGFX::RENDER_SETTINGS::m_layerColorsHi, KIGFX::RENDER_SETTINGS::m_layerColorsSel, KIGFX::RENDER_SETTINGS::m_selectFactor, and KIGFX::COLOR4D::Mix().

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::GERBVIEW_RENDER_SETTINGS(), KIGFX::GERBVIEW_RENDER_SETTINGS::LoadColors(), LoadColors(), KIGFX::GERBVIEW_RENDER_SETTINGS::LoadDisplayOptions(), PCB_RENDER_SETTINGS(), KIGFX::GERBVIEW_RENDER_SETTINGS::SetLayerColor(), KIGFX::RENDER_SETTINGS::SetLayerColor(), and KIGFX::WS_RENDER_SETTINGS::WS_RENDER_SETTINGS().

Friends And Related Function Documentation

◆ PCB_PAINTER

friend class PCB_PAINTER
friend

Definition at line 63 of file pcb_painter.h.

Member Data Documentation

◆ m_activeLayers

std::set<unsigned int> KIGFX::RENDER_SETTINGS::m_activeLayers
protectedinherited

◆ m_backgroundColor

◆ m_clearance

int KIGFX::PCB_RENDER_SETTINGS::m_clearance
protected

Clearance visibility settings

Definition at line 209 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_curvedRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_curvedRatsnestlines = true
protected

Flag determining if ratsnest lines should be drawn curved

Definition at line 195 of file pcb_painter.h.

Referenced by GetCurvedRatsnestLinesEnabled(), and LoadDisplayOptions().

◆ m_defaultPenWidth

int KIGFX::RENDER_SETTINGS::m_defaultPenWidth
protectedinherited

◆ m_displayZone

DISPLAY_ZONE_MODE KIGFX::PCB_RENDER_SETTINGS::m_displayZone
protected

Option for different display modes for zones

Definition at line 206 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_drawIndividualViaLayers

bool KIGFX::PCB_RENDER_SETTINGS::m_drawIndividualViaLayers = false
protected

Definition at line 200 of file pcb_painter.h.

Referenced by GetDrawIndividualViaLayers(), and SetDrawIndividualViaLayers().

◆ m_globalRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_globalRatsnestlines = true
protected

Flag determining if ratsnest lines are shown by default

Definition at line 198 of file pcb_painter.h.

Referenced by GetGlobalRatsnestLinesEnabled(), and LoadDisplayOptions().

◆ m_hiContrastColor

COLOR4D KIGFX::RENDER_SETTINGS::m_hiContrastColor[LAYER_ID_COUNT]
protectedinherited

◆ m_hiContrastEnabled

◆ m_hiContrastFactor

float KIGFX::RENDER_SETTINGS::m_hiContrastFactor
protectedinherited

◆ m_highlightEnabled

◆ m_highlightFactor

float KIGFX::RENDER_SETTINGS::m_highlightFactor
protectedinherited

◆ m_highlightItems

bool KIGFX::RENDER_SETTINGS::m_highlightItems
protectedinherited

◆ m_highlightNetcodes

std::set<int> KIGFX::RENDER_SETTINGS::m_highlightNetcodes
protectedinherited

◆ m_layerColors

◆ m_layerColorsDark

COLOR4D KIGFX::RENDER_SETTINGS::m_layerColorsDark[LAYER_ID_COUNT]
protectedinherited

◆ m_layerColorsHi

COLOR4D KIGFX::RENDER_SETTINGS::m_layerColorsHi[LAYER_ID_COUNT]
protectedinherited

◆ m_layerColorsSel

COLOR4D KIGFX::RENDER_SETTINGS::m_layerColorsSel[LAYER_ID_COUNT]
protectedinherited

◆ m_netNamesOnPads

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnPads
protected

Flag determining if net names should be visible for pads

Definition at line 183 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_netNamesOnTracks

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnTracks
protected

Flag determining if net names should be visible for tracks

Definition at line 186 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_netNamesOnVias

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnVias
protected

Flag determining if net names should be visible for vias

Definition at line 189 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_outlineWidth

◆ m_padNumbers

bool KIGFX::PCB_RENDER_SETTINGS::m_padNumbers
protected

Flag determining if pad numbers should be visible

Definition at line 180 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_printDC

wxDC* KIGFX::RENDER_SETTINGS::m_printDC
protectedinherited

◆ m_selectFactor

float KIGFX::RENDER_SETTINGS::m_selectFactor
protectedinherited

◆ m_selectionCandidateColor

COLOR4D KIGFX::PCB_RENDER_SETTINGS::m_selectionCandidateColor
protected

Color used for highlighting selection candidates

Definition at line 212 of file pcb_painter.h.

Referenced by GetColor(), and PCB_RENDER_SETTINGS().

◆ m_showPageLimits

◆ m_sketchGraphics

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchGraphics
protected

Flag determining if graphic items should be outlined or stroked

Definition at line 174 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), PCB_RENDER_SETTINGS(), and SetSketchModeGraphicItems().

◆ m_sketchMode

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchMode[GAL_LAYER_ID_END]
protected

Flag determining if items on a given layer should be drawn as an outline or a filled item

Definition at line 171 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), GetSketchMode(), LoadDisplayOptions(), PCB_RENDER_SETTINGS(), and SetSketchMode().

◆ m_sketchText

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchText
protected

Flag determining if text items should be outlined or stroked

Definition at line 177 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_worksheetLineWidth

float KIGFX::RENDER_SETTINGS::m_worksheetLineWidth
protectedinherited

◆ m_zoneOutlines

bool KIGFX::PCB_RENDER_SETTINGS::m_zoneOutlines
protected

Flag determining if zones should have outlines drawn

Definition at line 192 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), EnableZoneOutlines(), and PCB_RENDER_SETTINGS().

◆ MAX_FONT_SIZE

const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = Millimeter2iu( 10.0 )
staticprotected

Maximum font size for netnames (and other dynamically shown strings)

Definition at line 203 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw().


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