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
 
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...
 
int GetHighlightNetCode () const
 Function GetHighlightNetCode Returns netcode of currently highlighted net. More...
 
void SetHighlight (bool aEnabled, int aNetcode=-1, bool aHighlightItems=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
 Function GetHighContrast Returns information about high contrast display mode. More...
 
float GetWorksheetLineWidth () const
 
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...
 

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_sketchBoardGfx
 

Flag determining if board graphic items should be outlined or stroked

More...
 
bool m_sketchFpGfx
 

Flag determining if footprint graphic items should be outlined or stroked

More...
 
bool m_sketchFpTxtfx
 

Flag determining if footprint 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...
 
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]
 

Colors for all layers (normal)

More...
 
COLOR4D m_layerColorsHi [LAYER_ID_COUNT]
 

Colors for all layers (highlighted)

More...
 
COLOR4D m_layerColorsSel [LAYER_ID_COUNT]
 

Colors for all layers (selected)

More...
 
COLOR4D m_layerColorsDark [LAYER_ID_COUNT]
 

Colors for all layers (darkened)

More...
 
COLOR4D m_hiContrastColor [LAYER_ID_COUNT]
 
bool m_hiContrastEnabled
 Parameters for display modes. More...
 
float m_hiContrastFactor
 Factor used for computing high contrast color. More...
 
bool m_highlightEnabled
 Highlight display mode on/off. More...
 
int m_highlightNetcode
 Net number that is displayed in highlight -1 means that there is no specific net, and whole active layer is highlighted. More...
 
bool m_highlightItems
 Highlight items with their HIGHLIGHT flags set. More...
 
float m_highlightFactor
 Factor used for computing highlight color. More...
 
float m_selectFactor
 Specifies how color of selected items is changed. More...
 
float m_layerOpacity
 Determines opacity of all layers. More...
 
float m_outlineWidth
 Line width used when drawing outlines. More...
 
float m_worksheetLineWidth
 Line width used when drawing worksheet. More...
 
bool m_showPageLimits
 
COLOR4D m_backgroundColor
 The background color. More...
 

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_sketchBoardGfx = false;
62  m_sketchFpGfx = false;
63  m_sketchFpTxtfx = false;
64  m_selectionCandidateColor = COLOR4D( 0.0, 1.0, 0.0, 0.75 );
65 
66  // By default everything should be displayed as filled
67  for( unsigned int i = 0; i < arrayDim( m_sketchMode ); ++i )
68  {
69  m_sketchMode[i] = false;
70  }
71 
72  update();
73 }
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:174
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:186
bool m_sketchBoardGfx
Flag determining if board graphic items should be outlined or stroked
Definition: pcb_painter.h:177
DISPLAY_ZONE_MODE m_displayZone
Option for different display modes for zones
Definition: pcb_painter.h:210
bool m_sketchFpTxtfx
Flag determining if footprint text items should be outlined or stroked
Definition: pcb_painter.h:183
COLOR4D m_selectionCandidateColor
Color used for highlighting selection candidates
Definition: pcb_painter.h:216
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:189
virtual void update()
Function update Precalculates extra colors for layers (e.g.
Definition: painter.cpp:54
bool m_sketchFpGfx
Flag determining if footprint graphic items should be outlined or stroked
Definition: pcb_painter.h:180
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:108
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:192
COLOR4D m_backgroundColor
The background color.
Definition: painter.h:292
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:213
bool m_zoneOutlines
Flag determining if zones should have outlines drawn
Definition: pcb_painter.h:198
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:195
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_sketchBoardGfx, m_sketchFpGfx, m_sketchFpTxtfx, m_sketchMode, 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 93 of file painter.h.

94  {
95  m_activeLayers.clear();
96  }
std::set< unsigned int > m_activeLayers
Stores active layers number.
Definition: painter.h:257

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:198

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 84 of file painter.h.

85  {
86  return m_activeLayers;
87  }
std::set< unsigned int > m_activeLayers
Stores active layers number.
Definition: painter.h:257

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]
Colors for all layers (normal)
Definition: painter.h:260

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 221 of file pcb_painter.cpp.

222 {
223  int netCode = -1;
224  const EDA_ITEM* item = dynamic_cast<const EDA_ITEM*>( aItem );
225 
226  if( item )
227  {
228  // Selection disambiguation
229  if( item->IsBrightened() )
230  {
232  }
233 
234  // Don't let pads that *should* be NPTHs get lost
235  if( item->Type() == PCB_PAD_T && dyn_cast<const D_PAD*>( item )->PadShouldBeNPTH() )
236  aLayer = LAYER_MOD_TEXT_INVISIBLE;
237 
238  if( item->IsSelected() )
239  {
240  return m_layerColorsSel[aLayer];
241  }
242 
244  {
245  if( item->IsHighlighted() )
246  return m_layerColorsHi[aLayer];
247  else
248  return m_layerColorsDark[aLayer];
249  }
250 
251  // Try to obtain the netcode for the item
252  if( const BOARD_CONNECTED_ITEM* conItem = dyn_cast<const BOARD_CONNECTED_ITEM*> ( item ) )
253  netCode = conItem->GetNetCode();
254 
255  if( item->Type() == PCB_MARKER_T )
256  return m_layerColors[aLayer];
257 
258  // For vias, some layers depend on other layers in high contrast mode
259  if( m_hiContrastEnabled && item->Type() == PCB_VIA_T &&
260  ( aLayer == LAYER_VIAS_HOLES ||
261  aLayer == LAYER_VIA_THROUGH ||
262  aLayer == LAYER_VIA_MICROVIA ||
263  aLayer == LAYER_VIA_BBLIND ) )
264  {
265  const VIA* via = static_cast<const VIA*>( item );
266  const BOARD* pcb = static_cast<const BOARD*>( item->GetParent() );
267  bool viaActiveLayer = false;
268 
269  for( auto activeLayer : m_activeLayers )
270  {
271  auto lay_id = static_cast<PCB_LAYER_ID>( activeLayer );
272  viaActiveLayer |= via->IsOnLayer( lay_id ) && pcb->IsLayerVisible( lay_id );
273  }
274 
275  if( viaActiveLayer )
276  return m_layerColors[aLayer];
277  else
278  return m_hiContrastColor[aLayer];
279  }
280  }
281 
282  // Single net highlight mode
283  if( m_highlightEnabled && netCode == m_highlightNetcode )
284  return m_layerColorsHi[aLayer];
285 
286  // Return grayish color for non-highlighted layers in the high contrast mode
287  if( m_hiContrastEnabled && m_activeLayers.count( aLayer ) == 0 )
288  return m_hiContrastColor[aLayer];
289 
290  // Catch the case when highlight and high-contraste modes are enabled
291  // and we are drawing a not highlighted track
292  if( m_highlightEnabled )
293  return m_layerColorsDark[aLayer];
294 
295  // No special modificators enabled
296  return m_layerColors[aLayer];
297 }
to draw blind/buried vias
bool m_highlightItems
Highlight items with their HIGHLIGHT flags set.
Definition: painter.h:282
bool IsSelected() const
Definition: base_struct.h:225
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
Colors for all layers (highlighted)
Definition: painter.h:263
COLOR4D m_layerColors[LAYER_ID_COUNT]
Colors for all layers (normal)
Definition: painter.h:260
to draw via holes (pad holes do not use this layer)
bool m_highlightEnabled
Highlight display mode on/off.
Definition: painter.h:278
bool IsBrightened() const
Definition: base_struct.h:228
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:216
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:227
COLOR4D m_hiContrastColor[LAYER_ID_COUNT]
Definition: painter.h:272
std::set< unsigned int > m_activeLayers
Stores active layers number.
Definition: painter.h:257
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
Colors for all layers (darkened)
Definition: painter.h:269
bool m_hiContrastEnabled
Parameters for display modes.
Definition: painter.h:275
to draw usual through hole vias
EDA_ITEM * GetParent() const
Definition: base_struct.h:217
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:431
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:163
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:97
int m_highlightNetcode
Net number that is displayed in highlight -1 means that there is no specific net, and whole active la...
Definition: painter.h:279
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]
Colors for all layers (selected)
Definition: painter.h:266
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212

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_highlightNetcode, 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]
Colors for all layers (normal)
Definition: painter.h:260

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.

163  {
164  return m_curvedRatsnestlines;
165  }
bool m_curvedRatsnestlines
Flag determining if ratsnest lines should be drawn curved
Definition: pcb_painter.h:201

References m_curvedRatsnestlines.

◆ GetGlobalRatsnestLinesEnabled()

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

Definition at line 167 of file pcb_painter.h.

168  {
169  return m_globalRatsnestlines;
170  }
bool m_globalRatsnestlines
Flag determining if ratsnest lines are shown by default
Definition: pcb_painter.h:204

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.

158 { return m_layerColors[ LAYER_GRID ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]
Colors for all layers (normal)
Definition: painter.h:260

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

◆ GetHighContrast()

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

Function GetHighContrast Returns information about high contrast display mode.

Returns
True if the high contrast mode is on, false otherwise.

Definition at line 158 of file painter.h.

159  {
160  return m_hiContrastEnabled;
161  }
bool m_hiContrastEnabled
Parameters for display modes.
Definition: painter.h:275

References KIGFX::RENDER_SETTINGS::m_hiContrastEnabled.

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

◆ GetHighlightNetCode()

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

Function GetHighlightNetCode Returns netcode of currently highlighted net.

Returns
Netcode of currently highlighted net.

Definition at line 123 of file painter.h.

124  {
125  return m_highlightNetcode;
126  }
int m_highlightNetcode
Net number that is displayed in highlight -1 means that there is no specific net, and whole active la...
Definition: painter.h:279

References KIGFX::RENDER_SETTINGS::m_highlightNetcode.

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 216 of file painter.h.

217  {
218  return m_layerColors[aLayer];
219  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
Colors for all layers (normal)
Definition: painter.h:260

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(), and KIGFX::SCH_PAINTER::getRenderColor().

◆ GetShowPageLimits()

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

Definition at line 178 of file painter.h.

179  {
180  return m_showPageLimits;
181  }

References KIGFX::RENDER_SETTINGS::m_showPageLimits.

◆ 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:174

References m_sketchMode.

◆ GetWorksheetLineWidth()

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

Definition at line 173 of file painter.h.

174  {
175  return m_worksheetLineWidth;
176  }
float m_worksheetLineWidth
Line width used when drawing worksheet.
Definition: painter.h:288

References KIGFX::RENDER_SETTINGS::m_worksheetLineWidth.

◆ 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 103 of file painter.h.

104  {
105  return ( m_activeLayers.count( aLayerId ) > 0 );
106  }
std::set< unsigned int > m_activeLayers
Stores active layers number.
Definition: painter.h:257

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]
Colors for all layers (normal)
Definition: painter.h:260

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 113 of file painter.h.

114  {
115  return m_highlightEnabled;
116  }
bool m_highlightEnabled
Highlight display mode on/off.
Definition: painter.h:278

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 76 of file pcb_painter.cpp.

77 {
79 
80  // Init board layers colors:
81  for( int i = 0; i < PCB_LAYER_ID_COUNT; i++ )
82  {
83  m_layerColors[i] = aSettings->GetColor( i );
84 
85  // Guard: if the alpah channel is too small, the layer is not visible.
86  // clamp it to 0.2
87  if( m_layerColors[i].a < 0.2 )
88  m_layerColors[i].a = 0.2;
89  }
90 
91  // Init specific graphic layers colors:
92  for( int i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; i++ )
93  m_layerColors[i] = aSettings->GetColor( i );
94 
95  // Default colors for specific layers (not really board layers).
96  m_layerColors[LAYER_VIAS_HOLES] = COLOR4D( 0.5, 0.4, 0.0, 0.8 );
98  m_layerColors[LAYER_VIAS_NETNAMES] = COLOR4D( 0.2, 0.2, 0.2, 0.9 );
99  m_layerColors[LAYER_PADS_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
100  m_layerColors[LAYER_PAD_FR_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
101  m_layerColors[LAYER_PAD_BK_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
102 
103  // LAYER_PADS_TH, LAYER_NON_PLATEDHOLES, LAYER_ANCHOR ,LAYER_RATSNEST,
104  // LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA
105  // are initialized from aSettings
106 
107  // These colors are not actually used. Set just in case...
110 
111  // Netnames for copper layers
112  for( LSEQ cu = LSET::AllCuMask().CuStack(); cu; ++cu )
113  {
114  const COLOR4D lightLabel( 0.8, 0.8, 0.8, 0.7 );
115  const COLOR4D darkLabel = lightLabel.Inverted();
116  PCB_LAYER_ID layer = *cu;
117 
118  if( m_layerColors[layer].GetBrightness() > 0.5 )
119  m_layerColors[GetNetnameLayer( layer )] = darkLabel;
120  else
121  m_layerColors[GetNetnameLayer( layer )] = lightLabel;
122  }
123 
124  update();
125 }
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:686
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]
Colors for all layers (normal)
Definition: painter.h:260
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.
Definition: painter.cpp:54
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().

◆ 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 128 of file pcb_painter.cpp.

130 {
132  m_padNumbers = aOptions.m_DisplayPadNum;
138 
139  // Whether to draw tracks, vias & pads filled or as outlines
145 
146  // Net names display settings
147  switch( aOptions.m_DisplayNetNamesMode )
148  {
149  case 0:
150  m_netNamesOnPads = false;
151  m_netNamesOnTracks = false;
152  m_netNamesOnVias = false;
153  break;
154 
155  case 1:
156  m_netNamesOnPads = true;
157  m_netNamesOnTracks = false;
158  m_netNamesOnVias = true; // Follow pads or tracks? For now we chose pads....
159  break;
160 
161  case 2:
162  m_netNamesOnPads = false;
163  m_netNamesOnTracks = true;
164  m_netNamesOnVias = false; // Follow pads or tracks? For now we chose pads....
165  break;
166 
167  case 3:
168  m_netNamesOnPads = true;
169  m_netNamesOnTracks = true;
170  m_netNamesOnVias = true;
171  break;
172  }
173 
174  // Zone display settings
175  switch( aOptions.m_DisplayZonesMode )
176  {
177  case 0:
179  break;
180 
181  case 1:
183  break;
184 
185  case 2:
187  break;
188  }
189 
190  // Clearance settings
191  switch( aOptions.m_ShowTrackClearanceMode )
192  {
195  break;
196 
199  break;
200 
203  break;
204 
207  break;
208 
211  break;
212  }
213 
214  if( aOptions.m_DisplayPadIsol )
215  m_clearance |= CL_PADS;
216 
217  m_showPageLimits = aShowPageLimits;
218 }
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:174
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:186
bool m_sketchBoardGfx
Flag determining if board graphic items should be outlined or stroked
Definition: pcb_painter.h:177
DISPLAY_ZONE_MODE m_displayZone
Option for different display modes for zones
Definition: pcb_painter.h:210
bool m_sketchFpTxtfx
Flag determining if footprint text items should be outlined or stroked
Definition: pcb_painter.h:183
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:189
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
bool m_hiContrastEnabled
Parameters for display modes.
Definition: painter.h:275
to draw usual through hole vias
bool m_curvedRatsnestlines
Flag determining if ratsnest lines should be drawn curved
Definition: pcb_painter.h:201
bool m_sketchFpGfx
Flag determining if footprint graphic items should be outlined or stroked
Definition: pcb_painter.h:180
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:192
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:213
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:195
bool m_globalRatsnestlines
Flag determining if ratsnest lines are shown by default
Definition: pcb_painter.h:204

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_DisplayDrawItemsFill, PCB_DISPLAY_OPTIONS::m_DisplayModEdgeFill, PCB_DISPLAY_OPTIONS::m_DisplayModTextFill, 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_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_sketchBoardGfx, m_sketchFpGfx, m_sketchFpTxtfx, m_sketchMode, 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 71 of file painter.h.

72  {
73  if( aEnabled )
74  m_activeLayers.insert( aLayerId );
75  else
76  m_activeLayers.erase( aLayerId );
77  }
std::set< unsigned int > m_activeLayers
Stores active layers number.
Definition: painter.h:257

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]
Colors for all layers (normal)
Definition: painter.h:260

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

Referenced by LoadColors().

◆ SetHighContrast()

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

Function SetHighContrast Turns on/off high contrast display mode.

Parameters
aEnableddetermines if high contrast display mode should be enabled or not.

Definition at line 148 of file painter.h.

149  {
150  m_hiContrastEnabled = aEnabled;
151  }
bool m_hiContrastEnabled
Parameters for display modes.
Definition: painter.h:275

References KIGFX::RENDER_SETTINGS::m_hiContrastEnabled.

◆ SetHighlight()

void KIGFX::RENDER_SETTINGS::SetHighlight ( bool  aEnabled,
int  aNetcode = -1,
bool  aHighlightItems = 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 136 of file painter.h.

137  {
138  m_highlightEnabled = aEnabled;
139  m_highlightNetcode = aEnabled ? aNetcode : -1;
140  m_highlightItems = aEnabled ? aHighlightItems : false;
141  }
bool m_highlightItems
Highlight items with their HIGHLIGHT flags set.
Definition: painter.h:282
bool m_highlightEnabled
Highlight display mode on/off.
Definition: painter.h:278
int m_highlightNetcode
Net number that is displayed in highlight -1 means that there is no specific net, and whole active la...
Definition: painter.h:279

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

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), DIALOG_SELECT_NET_FROM_LIST::HighlightNet(), PNS::TOOL_BASE::highlightNet(), 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 227 of file painter.h.

228  {
229  m_layerColors[aLayer] = aColor;
230 
231  update(); // recompute other shades of the color
232  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
Colors for all layers (normal)
Definition: painter.h:260
virtual void update()
Function update Precalculates extra colors for layers (e.g.
Definition: painter.cpp:54

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

Referenced by BOARD_PRINTOUT::DrawPage(), and DIALOG_PAD_PROPERTIES::redraw().

◆ SetOutlineWidth()

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

Set line width used for drawing outlines.

Parameters
aWidthis the new width.

Definition at line 244 of file painter.h.

245  {
246  m_outlineWidth = aWidth;
247  }
float m_outlineWidth
Line width used when drawing outlines.
Definition: painter.h:287

References KIGFX::RENDER_SETTINGS::m_outlineWidth.

◆ 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:174

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_sketchBoardGfx = aEnabled;
134  }
bool m_sketchBoardGfx
Flag determining if board graphic items should be outlined or stroked
Definition: pcb_painter.h:177

References m_sketchBoardGfx.

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 54 of file painter.cpp.

55 {
56  // Calculate darkened/highlighted variants of layer colors
57  for( int i = 0; i < LAYER_ID_COUNT; i++ )
58  {
64  }
65 }
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
Colors for all layers (highlighted)
Definition: painter.h:263
COLOR4D m_layerColors[LAYER_ID_COUNT]
Colors for all layers (normal)
Definition: painter.h:260
float m_highlightFactor
Factor used for computing highlight color.
Definition: painter.h:283
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]
Definition: painter.h:272
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]
Colors for all layers (darkened)
Definition: painter.h:269
#define LAYER_ID_COUNT
Must update this if you add any enums after GerbView!
float m_hiContrastFactor
Factor used for computing high contrast color.
Definition: painter.h:276
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
float m_selectFactor
Specifies how color of selected items is changed.
Definition: painter.h:285
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]
Colors for all layers (selected)
Definition: painter.h:266

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 213 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 201 of file pcb_painter.h.

Referenced by GetCurvedRatsnestLinesEnabled(), and LoadDisplayOptions().

◆ m_displayZone

DISPLAY_ZONE_MODE KIGFX::PCB_RENDER_SETTINGS::m_displayZone
protected

Option for different display modes for zones

Definition at line 210 of file pcb_painter.h.

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

◆ m_globalRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_globalRatsnestlines = true
protected

Flag determining if ratsnest lines are shown by default

Definition at line 204 of file pcb_painter.h.

Referenced by GetGlobalRatsnestLinesEnabled(), and LoadDisplayOptions().

◆ m_hiContrastColor

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

◆ m_hiContrastEnabled

bool KIGFX::RENDER_SETTINGS::m_hiContrastEnabled
protectedinherited

◆ m_hiContrastFactor

float KIGFX::RENDER_SETTINGS::m_hiContrastFactor
protectedinherited

Factor used for computing high contrast color.

Definition at line 276 of file painter.h.

Referenced by KIGFX::RENDER_SETTINGS::RENDER_SETTINGS(), and KIGFX::RENDER_SETTINGS::update().

◆ m_highlightEnabled

bool KIGFX::RENDER_SETTINGS::m_highlightEnabled
protectedinherited

◆ m_highlightFactor

float KIGFX::RENDER_SETTINGS::m_highlightFactor
protectedinherited

Factor used for computing highlight color.

Definition at line 283 of file painter.h.

Referenced by KIGFX::RENDER_SETTINGS::RENDER_SETTINGS(), and KIGFX::RENDER_SETTINGS::update().

◆ m_highlightItems

bool KIGFX::RENDER_SETTINGS::m_highlightItems
protectedinherited

Highlight items with their HIGHLIGHT flags set.

Definition at line 282 of file painter.h.

Referenced by GetColor(), KIGFX::RENDER_SETTINGS::RENDER_SETTINGS(), and KIGFX::RENDER_SETTINGS::SetHighlight().

◆ m_highlightNetcode

int KIGFX::RENDER_SETTINGS::m_highlightNetcode
protectedinherited

Net number that is displayed in highlight -1 means that there is no specific net, and whole active layer is highlighted.

Definition at line 279 of file painter.h.

Referenced by GetColor(), KIGFX::RENDER_SETTINGS::GetHighlightNetCode(), KIGFX::RENDER_SETTINGS::RENDER_SETTINGS(), and KIGFX::RENDER_SETTINGS::SetHighlight().

◆ m_layerColors

◆ m_layerColorsDark

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

Colors for all layers (darkened)

Colora used for high contrast display mode

Definition at line 269 of file painter.h.

Referenced by KIGFX::GERBVIEW_RENDER_SETTINGS::GetColor(), GetColor(), KIGFX::GERBVIEW_RENDER_SETTINGS::LoadColors(), and KIGFX::RENDER_SETTINGS::update().

◆ 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_layerOpacity

float KIGFX::RENDER_SETTINGS::m_layerOpacity
protectedinherited

Determines opacity of all layers.

Definition at line 286 of file painter.h.

Referenced by KIGFX::RENDER_SETTINGS::RENDER_SETTINGS().

◆ m_netNamesOnPads

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnPads
protected

Flag determining if net names should be visible for pads

Definition at line 189 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 192 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 195 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 186 of file pcb_painter.h.

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

◆ m_selectFactor

float KIGFX::RENDER_SETTINGS::m_selectFactor
protectedinherited

Specifies how color of selected items is changed.

Definition at line 285 of file painter.h.

Referenced by KIGFX::RENDER_SETTINGS::RENDER_SETTINGS(), and KIGFX::RENDER_SETTINGS::update().

◆ m_selectionCandidateColor

COLOR4D KIGFX::PCB_RENDER_SETTINGS::m_selectionCandidateColor
protected

Color used for highlighting selection candidates

Definition at line 216 of file pcb_painter.h.

Referenced by GetColor(), and PCB_RENDER_SETTINGS().

◆ m_showPageLimits

◆ m_sketchBoardGfx

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchBoardGfx
protected

Flag determining if board graphic items should be outlined or stroked

Definition at line 177 of file pcb_painter.h.

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

◆ m_sketchFpGfx

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchFpGfx
protected

Flag determining if footprint graphic items should be outlined or stroked

Definition at line 180 of file pcb_painter.h.

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

◆ m_sketchFpTxtfx

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchFpTxtfx
protected

Flag determining if footprint text items should be outlined or stroked

Definition at line 183 of file pcb_painter.h.

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

◆ 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 174 of file pcb_painter.h.

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

◆ m_worksheetLineWidth

float KIGFX::RENDER_SETTINGS::m_worksheetLineWidth
protectedinherited

Line width used when drawing worksheet.

Definition at line 288 of file painter.h.

Referenced by KIGFX::RENDER_SETTINGS::GetWorksheetLineWidth(), and KIGFX::RENDER_SETTINGS::RENDER_SETTINGS().

◆ m_zoneOutlines

bool KIGFX::PCB_RENDER_SETTINGS::m_zoneOutlines
protected

Flag determining if zones should have outlines drawn

Definition at line 198 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 207 of file pcb_painter.h.

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


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