KiCad PCB EDA Suite
KIGFX::PCB_RENDER_SETTINGS Class Reference

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
}
 

Public Member Functions

 PCB_RENDER_SETTINGS ()
 
void LoadDisplayOptions (const PCB_DISPLAY_OPTIONS &aOptions, bool aShowPageLimits)
 Load 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 COLOR4D GetColor (const VIEW_ITEM *aItem, int aLayer) const override
 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)
 Turn on/off sketch mode for given item layer. More...
 
bool GetSketchMode (int aItemLayer) const
 Return sketch mode setting for a given item layer. More...
 
void SetSketchModeGraphicItems (bool aEnabled)
 Turn on/off sketch mode for graphic items (DRAWSEGMENTs, texts). More...
 
void EnableZoneOutlines (bool aEnabled)
 Turn on/off drawing outline and hatched lines for zones. More...
 
bool IsBackgroundDark () const override
 
const COLOR4DGetBackgroundColor () override
 Return current background color settings. More...
 
void SetBackgroundColor (const COLOR4D &aColor) override
 Set the background color. More...
 
const COLOR4DGetGridColor () override
 Return current grid color settings. More...
 
const COLOR4DGetCursorColor () override
 Return current cursor color settings. More...
 
void SetContrastModeDisplay (HIGH_CONTRAST_MODE aMode)
 Switch the contrast mode setting (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN ) to control how the non active layers are shown. More...
 
HIGH_CONTRAST_MODE GetContrastModeDisplay ()
 
bool GetCurvedRatsnestLinesEnabled () const
 
bool GetGlobalRatsnestLinesEnabled () const
 
bool GetDrawIndividualViaLayers () const
 
void SetDrawIndividualViaLayers (bool aFlag)
 
NET_COLOR_MODE GetNetColorMode () const
 
void SetNetColorMode (NET_COLOR_MODE aMode)
 
RATSNEST_MODE GetRatsnestDisplayMode () const
 
void SetRatsnestDisplayMode (RATSNEST_MODE aMode)
 
std::map< wxString, KIGFX::COLOR4D > & GetNetclassColorMap ()
 
std::map< int, KIGFX::COLOR4D > & GetNetColorMap ()
 
std::set< int > & GetHiddenNets ()
 
const std::set< int > & GetHiddenNets () const
 
void SetZoneDisplayMode (ZONE_DISPLAY_MODE mode)
 
void SetLayerIsHighContrast (int aLayerId, bool aEnabled=true)
 Set the specified layer as high-contrast. More...
 
bool GetLayerIsHighContrast (int aLayerId) const
 Return information whether the queried layer is marked as high-contrast. More...
 
const std::set< unsigned int > GetHighContrastLayers () const
 Returns the set of currently high-contrast layers. More...
 
PCB_LAYER_ID GetPrimaryHighContrastLayer () const
 Return the board layer which is in high-contrast mode. More...
 
PCB_LAYER_ID GetActiveLayer () const
 
void SetActiveLayer (PCB_LAYER_ID aLayer)
 
void ClearHighContrastLayers ()
 Clear the list of active layers. More...
 
bool IsHighlightEnabled () const
 Return current highlight setting. More...
 
const std::set< int > & GetHighlightNetCodes () const
 Return the netcode of currently highlighted net. More...
 
void SetHighlight (bool aEnabled, int aNetcode=-1, bool aMulti=false)
 Turns on/off highlighting. More...
 
void SetHighlight (std::set< int > &aHighlight, bool aEnabled=true)
 Turns on highlighting and highlights multiple nets. More...
 
void SetHighContrast (bool aEnabled)
 Turns on/off high contrast display mode. More...
 
bool GetHighContrast () const
 
float GetDrawingSheetLineWidth () const
 
int GetDefaultPenWidth () const
 
void SetDefaultPenWidth (int aWidth)
 
int GetMinPenWidth () const
 
void SetMinPenWidth (int aWidth)
 
bool GetShowPageLimits () const
 
void SetShowPageLimits (bool aDraw)
 
bool IsPrinting () const
 
void SetIsPrinting (bool isPrinting)
 
const COLOR4DGetLayerColor (int aLayer) const
 Return the color used to draw a layer. More...
 
void SetLayerColor (int aLayer, const COLOR4D &aColor)
 Change the color used to draw a layer. More...
 
void SetOutlineWidth (float aWidth)
 Set line width used for drawing outlines. More...
 
void SetHighlightFactor (float aFactor)
 
void SetSelectFactor (float aFactor)
 
void SetHighContrastFactor (float aFactor)
 
wxDC * GetPrintDC () const
 
void SetPrintDC (wxDC *aDC)
 

Protected Member Functions

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

Protected Attributes

bool m_sketchMode [GAL_LAYER_ID_END]
 
bool m_sketchGraphics
 
bool m_sketchText
 
bool m_padNumbers
 
bool m_netNamesOnPads
 
bool m_netNamesOnTracks
 
bool m_netNamesOnVias
 
bool m_zoneOutlines
 
bool m_curvedRatsnestlines = true
 
bool m_globalRatsnestlines = true
 
bool m_drawIndividualViaLayers = false
 
ZONE_DISPLAY_MODE m_zoneDisplayMode
 
HIGH_CONTRAST_MODE m_contrastModeDisplay
 
RATSNEST_MODE m_ratsnestDisplayMode
 
int m_clearanceDisplayFlags
 How to display nets and netclasses with color overrides. More...
 
NET_COLOR_MODE m_netColorMode
 Overrides for specific netclass colors. More...
 
std::map< wxString, KIGFX::COLOR4Dm_netclassColors
 Overrides for specific net colors, stored as netcodes for the ratsnest to access easily. More...
 
std::map< int, KIGFX::COLOR4Dm_netColors
 Set of net codes that should not have their ratsnest displayed. More...
 
std::set< int > m_hiddenNets
 
double m_trackOpacity
 Opacity override for all tracks. More...
 
double m_viaOpacity
 Opacity override for all types of via. More...
 
double m_padOpacity
 Opacity override for SMD pads and PTHs. More...
 
double m_zoneOpacity
 Opacity override for filled zones. More...
 
PCB_LAYER_ID m_activeLayer
 
std::set< unsigned int > m_highContrastLayers
 
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
 
float m_highlightFactor
 
float m_selectFactor
 
float m_outlineWidth
 
float m_drawingSheetLineWidth
 
int m_defaultPenWidth
 
int m_minPenWidth
 
bool m_showPageLimits
 
bool m_isPrinting
 
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
 Flags to control clearance lines visibility. More...
 

Detailed Description

PCB specific render settings.

Definition at line 64 of file pcb_painter.h.

Member Enumeration Documentation

◆ CLEARANCE_MODE

Enumerator
CL_NONE 
CL_PADS 
CL_VIAS 
CL_TRACKS 
CL_NEW 
CL_EDITED 
CL_EXISTING 

Definition at line 70 of file pcb_painter.h.

Constructor & Destructor Documentation

◆ PCB_RENDER_SETTINGS()

PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS ( )

Definition at line 62 of file pcb_painter.cpp.

63 {
64  m_backgroundColor = COLOR4D( 0.0, 0.0, 0.0, 1.0 );
65  m_padNumbers = true;
66  m_netNamesOnPads = true;
67  m_netNamesOnTracks = true;
68  m_netNamesOnVias = true;
69  m_zoneOutlines = true;
72  m_sketchGraphics = false;
73  m_sketchText = false;
77 
78  m_trackOpacity = 1.0;
79  m_viaOpacity = 1.0;
80  m_padOpacity = 1.0;
81  m_zoneOpacity = 1.0;
82 
83  // By default everything should be displayed as filled
84  for( unsigned int i = 0; i < arrayDim( m_sketchMode ); ++i )
85  m_sketchMode[i] = false;
86 
87  update();
88 }
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:234
bool m_sketchMode[GAL_LAYER_ID_END]
Definition: pcb_painter.h:196
Net/netclass colors are shown on ratsnest lines only.
Ratsnest lines are drawn to items on all layers (default)
NET_COLOR_MODE m_netColorMode
Overrides for specific netclass colors.
Definition: pcb_painter.h:219
virtual void update()
Precalculates extra colors for layers (e.g.
Inactive layers are shown normally (no high-contrast mode)
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:214
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:232
int m_clearanceDisplayFlags
How to display nets and netclasses with color overrides.
Definition: pcb_painter.h:216
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:231
HIGH_CONTRAST_MODE m_contrastModeDisplay
Definition: pcb_painter.h:213
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:233
ZONE_DISPLAY_MODE m_zoneDisplayMode
Definition: pcb_painter.h:212
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103

References ALL, arrayDim(), CL_NONE, KIGFX::RENDER_SETTINGS::m_backgroundColor, m_clearanceDisplayFlags, m_contrastModeDisplay, m_netColorMode, m_netNamesOnPads, m_netNamesOnTracks, m_netNamesOnVias, m_padNumbers, m_padOpacity, m_ratsnestDisplayMode, m_sketchGraphics, m_sketchMode, m_sketchText, m_trackOpacity, m_viaOpacity, m_zoneDisplayMode, m_zoneOpacity, m_zoneOutlines, NORMAL, RATSNEST, SHOW_FILLED, and KIGFX::RENDER_SETTINGS::update().

Member Function Documentation

◆ ClearHighContrastLayers()

void KIGFX::RENDER_SETTINGS::ClearHighContrastLayers ( )
inlineinherited

Clear the list of active layers.

Definition at line 118 of file render_settings.h.

119  {
120  m_highContrastLayers.clear();
121  }
std::set< unsigned int > m_highContrastLayers

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

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

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

Definition at line 136 of file pcb_painter.h.

137  {
138  m_zoneOutlines = aEnabled;
139  }

References m_zoneOutlines.

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

◆ GetActiveLayer()

PCB_LAYER_ID KIGFX::RENDER_SETTINGS::GetActiveLayer ( ) const
inlineinherited

Definition at line 112 of file render_settings.h.

112 { return m_activeLayer; }

References KIGFX::RENDER_SETTINGS::m_activeLayer.

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

◆ GetBackgroundColor()

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

Return current background color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 148 of file pcb_painter.h.

148 { return m_layerColors[ LAYER_PCB_BACKGROUND ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]
PCB background color.
Definition: layer_ids.h:227

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

◆ GetColor()

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

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

227 {
228  const EDA_ITEM* item = dynamic_cast<const EDA_ITEM*>( aItem );
229  const BOARD_CONNECTED_ITEM* conItem = dynamic_cast<const BOARD_CONNECTED_ITEM*> ( aItem );
230  int netCode = -1;
231  int originalLayer = aLayer;
232 
233  // Marker shadows
234  if( aLayer == LAYER_MARKER_SHADOWS )
235  return m_backgroundColor.WithAlpha( 0.6 );
236 
237  if( IsHoleLayer( aLayer ) && m_isPrinting )
238  {
239  // Careful that we don't end up with the same colour for the annular ring and the hole
240  // when printing in B&W.
241  const PAD* pad = dynamic_cast<const PAD*>( item );
242  const PCB_VIA* via = dynamic_cast<const PCB_VIA*>( item );
243  int holeLayer = aLayer;
244  int annularRingLayer = UNDEFINED_LAYER;
245 
246  if( pad && pad->GetAttribute() == PAD_ATTRIB::PTH )
247  annularRingLayer = LAYER_PADS_TH;
248  else if( via && via->GetViaType() == VIATYPE::MICROVIA )
249  annularRingLayer = LAYER_VIA_MICROVIA;
250  else if( via && via->GetViaType() == VIATYPE::BLIND_BURIED )
251  annularRingLayer = LAYER_VIA_BBLIND;
252  else if( via && via->GetViaType() == VIATYPE::THROUGH )
253  annularRingLayer = LAYER_VIA_THROUGH;
254 
255  if( annularRingLayer != UNDEFINED_LAYER
256  && m_layerColors[ holeLayer ] == m_layerColors[ annularRingLayer ] )
257  {
258  aLayer = LAYER_PCB_BACKGROUND;
259  }
260  }
261 
262  // Zones should pull from the copper layer
263  if( item && ( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T ) )
264  {
265  if( IsZoneLayer( aLayer ) )
266  aLayer = aLayer - LAYER_ZONE_START;
267  }
268 
269  // Hole walls should pull from the copper layer
270  if( aLayer == LAYER_PAD_HOLEWALLS )
271  aLayer = LAYER_PADS_TH;
272  else if( aLayer == LAYER_VIA_HOLEWALLS )
273  aLayer = LAYER_VIA_THROUGH;
274 
275  // Normal path: get the layer base color
276  COLOR4D color = m_layerColors[aLayer];
277 
278  if( !item )
279  return m_layerColors[aLayer];
280 
281  // Selection disambiguation
282  if( item->IsBrightened() )
283  return color.Brightened( m_selectFactor ).WithAlpha( 0.8 );
284 
285  // Normal selection
286  if( item->IsSelected() )
287  color = m_layerColorsSel[aLayer];
288 
289  // Try to obtain the netcode for the item
290  if( conItem )
291  netCode = conItem->GetNetCode();
292 
293  bool highlighted = m_highlightEnabled && m_highlightNetcodes.count( netCode );
294  bool selected = item->IsSelected();
295 
296  // Apply net color overrides
297  if( conItem && m_netColorMode == NET_COLOR_MODE::ALL && IsNetCopperLayer( aLayer ) )
298  {
299  COLOR4D netColor = COLOR4D::UNSPECIFIED;
300 
301  auto ii = m_netColors.find( netCode );
302 
303  if( ii != m_netColors.end() )
304  netColor = ii->second;
305 
306  if( netColor == COLOR4D::UNSPECIFIED )
307  {
308  auto jj = m_netclassColors.find( conItem->GetNetClassName() );
309 
310  if( jj != m_netclassColors.end() )
311  netColor = jj->second;
312  }
313 
314  if( netColor == COLOR4D::UNSPECIFIED )
315  netColor = color;
316 
317  if( selected )
318  {
319  // Selection brightening overrides highlighting
320  netColor.Brighten( m_selectFactor );
321  }
322  else if( m_highlightEnabled )
323  {
324  // Highlight brightens objects on all layers and darkens everything else for contrast
325  if( highlighted )
326  netColor.Brighten( m_highlightFactor );
327  else
328  netColor.Darken( 1.0 - m_highlightFactor );
329  }
330 
331  color = netColor;
332  }
333  else if( !selected && m_highlightEnabled )
334  {
335  // Single net highlight mode
336  color = m_highlightNetcodes.count( netCode ) ? m_layerColorsHi[aLayer]
337  : m_layerColorsDark[aLayer];
338  }
339 
340  // Apply high-contrast dimming
341  if( m_hiContrastEnabled && m_highContrastLayers.size() && !highlighted && !selected )
342  {
344  bool isActive = m_highContrastLayers.count( aLayer );
345 
346  switch( originalLayer )
347  {
348  case LAYER_PADS_TH:
349  if( !static_cast<const PAD*>( item )->FlashLayer( primary ) )
350  isActive = false;
351 
352  break;
353 
354  case LAYER_VIA_BBLIND:
355  case LAYER_VIA_MICROVIA:
356  // Target graphic is active if the via crosses the primary layer
357  if( static_cast<const PCB_VIA*>( item )->GetLayerSet().test( primary ) == 0 )
358  isActive = false;
359 
360  break;
361 
362  case LAYER_VIA_THROUGH:
363  if( !static_cast<const PCB_VIA*>( item )->FlashLayer( primary ) )
364  isActive = false;
365 
366  break;
367 
369  case LAYER_PAD_HOLEWALLS:
371  // Pad holes are active is any physical layer is active
372  if( LSET::PhysicalLayersMask().test( primary ) == 0 )
373  isActive = false;
374 
375  break;
376 
377  case LAYER_VIA_HOLES:
378  case LAYER_VIA_HOLEWALLS:
379  if( static_cast<const PCB_VIA*>( item )->GetViaType() == VIATYPE::BLIND_BURIED
380  || static_cast<const PCB_VIA*>( item )->GetViaType() == VIATYPE::MICROVIA )
381  {
382  // A blind or micro via's hole is active if it crosses the primary layer
383  if( static_cast<const PCB_VIA*>( item )->GetLayerSet().test( primary ) == 0 )
384  isActive = false;
385  }
386  else
387  {
388  // A through via's hole is active if any physical layer is active
389  if( LSET::PhysicalLayersMask().test( primary ) == 0 )
390  isActive = false;
391  }
392 
393  break;
394 
395  default:
396  break;
397  }
398 
399  if( !isActive )
400  {
403  else
405  }
406  }
407 
408  // Apply per-type opacity overrides
409  if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )
410  color.a *= m_trackOpacity;
411  else if( item->Type() == PCB_VIA_T )
412  color.a *= m_viaOpacity;
413  else if( item->Type() == PCB_PAD_T )
414  color.a *= m_padOpacity;
415  else if( item->Type() == PCB_ZONE_T || item->Type() == PCB_FP_ZONE_T )
416  color.a *= m_zoneOpacity;
417 
418  // No special modifiers enabled
419  return color;
420 }
to draw micro vias
Definition: layer_ids.h:201
COLOR4D & Brighten(double aFactor)
Makes the color brighter by a given factor.
Definition: color4d.h:225
bool IsSelected() const
Definition: eda_item.h:122
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:234
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
COLOR4D m_layerColors[LAYER_ID_COUNT]
int color
Definition: DXF_plotter.cpp:57
Net/netclass colors are shown on all net copper.
class PCB_ARC, an arc track segment on a copper layer
Definition: typeinfo.h:97
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
Definition: color4d.h:321
bool IsBrightened() const
Definition: eda_item.h:125
class PAD, a pad in a footprint
Definition: typeinfo.h:89
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
to draw via holes (pad holes do not use this layer)
Definition: layer_ids.h:222
virtual wxString GetNetClassName() const
Returns the netclass of the zone.
std::set< unsigned int > m_highContrastLayers
class PCB_TRACK, a track segment (segment on a copper layer)
Definition: typeinfo.h:95
Plated through hole pad.
to draw usual through hole vias
Definition: layer_ids.h:203
std::map< wxString, KIGFX::COLOR4D > m_netclassColors
Overrides for specific net colors, stored as netcodes for the ratsnest to access easily.
Definition: pcb_painter.h:222
NET_COLOR_MODE m_netColorMode
Overrides for specific netclass colors.
Definition: pcb_painter.h:219
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
Definition: layer_ids.h:1002
bool IsHoleLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:847
handle color for not plated holes (holes, not pads)
Definition: layer_ids.h:204
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
bool m_hiContrastEnabled
Parameters for display modes.
static const COLOR4D CLEAR
Definition: color4d.h:395
shadows for drc markers
Definition: layer_ids.h:244
Virtual layers for stacking zones and tracks on a given copper layer.
Definition: layer_ids.h:253
class ZONE, a copper pour area
Definition: typeinfo.h:105
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:232
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
Definition: lset.cpp:858
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:231
std::map< int, KIGFX::COLOR4D > m_netColors
Set of net codes that should not have their ratsnest displayed.
Definition: pcb_painter.h:225
multilayer pads, usually with holes
Definition: layer_ids.h:220
to draw blind/buried vias
Definition: layer_ids.h:202
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:976
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
COLOR4D & Darken(double aFactor)
Makes the color darker by a given factor.
Definition: color4d.h:242
class ZONE, managed by a footprint
Definition: typeinfo.h:94
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition: color4d.h:390
HIGH_CONTRAST_MODE m_contrastModeDisplay
Definition: pcb_painter.h:213
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:99
PCB background color.
Definition: layer_ids.h:227
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:233
to draw pad holes (plated)
Definition: layer_ids.h:221
bool IsZoneLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:983
class PCB_VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:96
Inactive layers are hidden.
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
Definition: pad.h:57
std::set< int > m_highlightNetcodes
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:112
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103

References ALL, BLIND_BURIED, KIGFX::COLOR4D::Brighten(), KIGFX::COLOR4D::CLEAR, color, KIGFX::COLOR4D::Darken(), BOARD_CONNECTED_ITEM::GetNetClassName(), BOARD_CONNECTED_ITEM::GetNetCode(), KIGFX::RENDER_SETTINGS::GetPrimaryHighContrastLayer(), HIDDEN, EDA_ITEM::IsBrightened(), IsHoleLayer(), IsNetCopperLayer(), IsNetnameLayer(), EDA_ITEM::IsSelected(), IsZoneLayer(), LAYER_MARKER_SHADOWS, LAYER_NON_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS_TH, LAYER_PCB_BACKGROUND, LAYER_VIA_BBLIND, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_ZONE_START, KIGFX::RENDER_SETTINGS::m_backgroundColor, m_contrastModeDisplay, KIGFX::RENDER_SETTINGS::m_hiContrastEnabled, KIGFX::RENDER_SETTINGS::m_hiContrastFactor, KIGFX::RENDER_SETTINGS::m_highContrastLayers, KIGFX::RENDER_SETTINGS::m_highlightEnabled, KIGFX::RENDER_SETTINGS::m_highlightFactor, KIGFX::RENDER_SETTINGS::m_highlightNetcodes, KIGFX::RENDER_SETTINGS::m_isPrinting, KIGFX::RENDER_SETTINGS::m_layerColors, KIGFX::RENDER_SETTINGS::m_layerColorsDark, KIGFX::RENDER_SETTINGS::m_layerColorsHi, KIGFX::RENDER_SETTINGS::m_layerColorsSel, m_netclassColors, m_netColorMode, m_netColors, m_padOpacity, KIGFX::RENDER_SETTINGS::m_selectFactor, m_trackOpacity, m_viaOpacity, m_zoneOpacity, MICROVIA, pad, PCB_ARC_T, PCB_FP_ZONE_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, LSET::PhysicalLayersMask(), PTH, THROUGH, EDA_ITEM::Type(), UNDEFINED_LAYER, KIGFX::COLOR4D::UNSPECIFIED, via, and KIGFX::COLOR4D::WithAlpha().

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

◆ GetContrastModeDisplay()

HIGH_CONTRAST_MODE KIGFX::PCB_RENDER_SETTINGS::GetContrastModeDisplay ( )
inline
Returns
the contrast mode setting (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN ).

Definition at line 168 of file pcb_painter.h.

168 { return m_contrastModeDisplay; }
HIGH_CONTRAST_MODE m_contrastModeDisplay
Definition: pcb_painter.h:213

References m_contrastModeDisplay.

◆ GetCursorColor()

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

Return current cursor color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 157 of file pcb_painter.h.

157 { return m_layerColors[ LAYER_CURSOR ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]
PCB cursor.
Definition: layer_ids.h:228

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

◆ GetCurvedRatsnestLinesEnabled()

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

Definition at line 170 of file pcb_painter.h.

References m_curvedRatsnestlines.

◆ GetDefaultPenWidth()

◆ GetDrawIndividualViaLayers()

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

Definition at line 174 of file pcb_painter.h.

References m_drawIndividualViaLayers.

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

◆ GetDrawingSheetLineWidth()

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

◆ GetGlobalRatsnestLinesEnabled()

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

Definition at line 172 of file pcb_painter.h.

References m_globalRatsnestlines.

◆ GetGridColor()

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

Return current grid color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 155 of file pcb_painter.h.

155 { return m_layerColors[ LAYER_GRID ]; }
COLOR4D m_layerColors[LAYER_ID_COUNT]

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

◆ GetHiddenNets() [1/2]

std::set<int>& KIGFX::PCB_RENDER_SETTINGS::GetHiddenNets ( )
inline

◆ GetHiddenNets() [2/2]

const std::set<int>& KIGFX::PCB_RENDER_SETTINGS::GetHiddenNets ( ) const
inline

Definition at line 188 of file pcb_painter.h.

188 { return m_hiddenNets; }
std::set< int > m_hiddenNets
Definition: pcb_painter.h:228

References m_hiddenNets.

◆ GetHighContrast()

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

◆ GetHighContrastLayers()

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

Returns the set of currently high-contrast layers.

Definition at line 90 of file render_settings.h.

91  {
92  return m_highContrastLayers;
93  }
std::set< unsigned int > m_highContrastLayers

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

Referenced by PCB_GRID_HELPER::computeAnchors(), PCB_GRID_HELPER::queryVisible(), and PCB_SELECTION_TOOL::Selectable().

◆ GetHighlightNetCodes()

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

Return the netcode of currently highlighted net.

Returns
Netcode of currently highlighted net.

Definition at line 138 of file render_settings.h.

139  {
140  return m_highlightNetcodes;
141  }
std::set< int > m_highlightNetcodes

References KIGFX::RENDER_SETTINGS::m_highlightNetcodes.

Referenced by BOARD_INSPECTION_TOOL::HighlightNet(), PNS::TOOL_BASE::highlightNet(), and PCB_EDIT_FRAME::setupUIConditions().

◆ GetLayerColor()

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

Return the color used to draw a layer.

Parameters
aLayeris the layer number.

Definition at line 237 of file render_settings.h.

238  {
239  return m_layerColors[aLayer];
240  }
COLOR4D m_layerColors[LAYER_ID_COUNT]

References KIGFX::RENDER_SETTINGS::m_layerColors.

Referenced by DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), KIGFX::SCH_PAINTER::draw(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawCircle(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLine(), KIGFX::PREVIEW::DRAW_CONTEXT::DrawLineWithAngleHighlight(), BOARD_PRINTOUT::DrawPage(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::SCH_PAINTER::getRenderColor(), PCB_GRID_HELPER::PCB_GRID_HELPER(), LIB_SHAPE::Plot(), LIB_TEXT::Plot(), SCH_NO_CONNECT::Plot(), SCH_BITMAP::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), LIB_SYMBOL::Plot(), SCH_SHEET::Plot(), LIB_SYMBOL::PlotLibFields(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), LIB_PIN::PlotPinTexts(), LIB_PIN::PlotSymbol(), SCH_NO_CONNECT::Print(), SCH_JUNCTION::Print(), SCH_BUS_ENTRY_BASE::Print(), LIB_SHAPE::print(), LIB_TEXT::print(), LIB_PIN::print(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_LINE::Print(), LIB_FIELD::print(), SCH_SHEET::Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), LIB_PIN::printPinElectricalTypeName(), LIB_PIN::printPinSymbol(), LIB_PIN::printPinTexts(), DS_DRAW_ITEM_LINE::PrintWsItem(), DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), DS_DRAW_ITEM_RECT::PrintWsItem(), DS_DRAW_ITEM_TEXT::PrintWsItem(), DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), DS_PROXY_VIEW_ITEM::ViewDraw(), and EDIT_POINTS::ViewDraw().

◆ GetLayerIsHighContrast()

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

Return information whether the queried layer is marked as high-contrast.

Returns
True if the queried layer is marked as active.

Definition at line 82 of file render_settings.h.

83  {
84  return ( m_highContrastLayers.count( aLayerId ) > 0 );
85  }
std::set< unsigned int > m_highContrastLayers

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

◆ GetMinPenWidth()

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

◆ GetNetclassColorMap()

std::map<wxString, KIGFX::COLOR4D>& KIGFX::PCB_RENDER_SETTINGS::GetNetclassColorMap ( )
inline

Definition at line 183 of file pcb_painter.h.

183 { return m_netclassColors; }
std::map< wxString, KIGFX::COLOR4D > m_netclassColors
Overrides for specific net colors, stored as netcodes for the ratsnest to access easily.
Definition: pcb_painter.h:222

References m_netclassColors.

Referenced by PCB_EDIT_FRAME::LoadProjectSettings(), APPEARANCE_CONTROLS::onNetclassColorChanged(), APPEARANCE_CONTROLS::onNetclassContextMenu(), APPEARANCE_CONTROLS::rebuildNets(), and PCB_EDIT_FRAME::SaveProjectSettings().

◆ GetNetColorMap()

std::map<int, KIGFX::COLOR4D>& KIGFX::PCB_RENDER_SETTINGS::GetNetColorMap ( )
inline

Definition at line 185 of file pcb_painter.h.

185 { return m_netColors; }
std::map< int, KIGFX::COLOR4D > m_netColors
Set of net codes that should not have their ratsnest displayed.
Definition: pcb_painter.h:225

References m_netColors.

Referenced by PCB_EDIT_FRAME::LoadProjectSettings(), NET_GRID_TABLE::Rebuild(), PCB_EDIT_FRAME::SaveProjectSettings(), and NET_GRID_TABLE::updateNetColor().

◆ GetNetColorMode()

NET_COLOR_MODE KIGFX::PCB_RENDER_SETTINGS::GetNetColorMode ( ) const
inline

Definition at line 177 of file pcb_painter.h.

177 { return m_netColorMode; }
NET_COLOR_MODE m_netColorMode
Overrides for specific netclass colors.
Definition: pcb_painter.h:219

References m_netColorMode.

◆ GetPrimaryHighContrastLayer()

PCB_LAYER_ID KIGFX::RENDER_SETTINGS::GetPrimaryHighContrastLayer ( ) const
inlineinherited

Return the board layer which is in high-contrast mode.

There should only be one board layer which is high-contrast at any given time, although there might be many high-contrast synthetic (GAL) layers.

Definition at line 101 of file render_settings.h.

102  {
103  for( int layer : m_highContrastLayers )
104  {
105  if( layer >= PCBNEW_LAYER_ID_START && layer < PCB_LAYER_ID_COUNT )
106  return (PCB_LAYER_ID) layer;
107  }
108 
109  return UNDEFINED_LAYER;
110  }
std::set< unsigned int > m_highContrastLayers
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65

References KIGFX::RENDER_SETTINGS::m_highContrastLayers, PCB_LAYER_ID_COUNT, PCBNEW_LAYER_ID_START, and UNDEFINED_LAYER.

Referenced by GetColor(), and PNS_KICAD_IFACE::IsItemVisible().

◆ GetPrintDC()

◆ GetRatsnestDisplayMode()

RATSNEST_MODE KIGFX::PCB_RENDER_SETTINGS::GetRatsnestDisplayMode ( ) const
inline

Definition at line 180 of file pcb_painter.h.

180 { return m_ratsnestDisplayMode; }
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:214

References m_ratsnestDisplayMode.

◆ GetShowPageLimits()

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

◆ GetSketchMode()

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

Return sketch mode setting for a given item layer.

Parameters
aItemLayeris the item layer that is changed.

Definition at line 117 of file pcb_painter.h.

118  {
119  return m_sketchMode[aItemLayer];
120  }
bool m_sketchMode[GAL_LAYER_ID_END]
Definition: pcb_painter.h:196

References m_sketchMode.

◆ IsBackgroundDark()

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

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 141 of file pcb_painter.h.

142  {
144 
145  return luma < 0.5;
146  }
double GetBrightness() const
Returns the brightness value of the color ranged from 0.0 to 1.0.
Definition: color4d.h:343
COLOR4D m_layerColors[LAYER_ID_COUNT]
PCB background color.
Definition: layer_ids.h:227

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

◆ IsHighlightEnabled()

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

Return current highlight setting.

Returns
True if highlight is enabled, false otherwise.

Definition at line 128 of file render_settings.h.

129  {
130  return m_highlightEnabled;
131  }

References KIGFX::RENDER_SETTINGS::m_highlightEnabled.

Referenced by PCB_EDIT_FRAME::ExecuteRemoteCommand(), and PNS::TOOL_BASE::highlightNet().

◆ IsPrinting()

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

Definition at line 209 of file render_settings.h.

209 { return m_isPrinting; }

References KIGFX::RENDER_SETTINGS::m_isPrinting.

◆ LoadColors()

void PCB_RENDER_SETTINGS::LoadColors ( const COLOR_SETTINGS aSettings)
overridevirtual

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 91 of file pcb_painter.cpp.

92 {
94 
95  // Init board layers colors:
96  for( int i = 0; i < PCB_LAYER_ID_COUNT; i++ )
97  {
98  m_layerColors[i] = aSettings->GetColor( i );
99 
100  // Guard: if the alpha channel is too small, the layer is not visible.
101  if( m_layerColors[i].a < 0.2 )
102  m_layerColors[i].a = 0.2;
103  }
104 
105  // Init specific graphic layers colors:
106  for( int i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; i++ )
107  m_layerColors[i] = aSettings->GetColor( i );
108 
109  // Colors for layers that aren't theme-able
111  m_layerColors[LAYER_VIA_NETNAMES] = COLOR4D( 0.2, 0.2, 0.2, 0.9 );
112  m_layerColors[LAYER_PAD_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
113  m_layerColors[LAYER_PAD_FR] = aSettings->GetColor( F_Cu );
114  m_layerColors[LAYER_PAD_BK] = aSettings->GetColor( B_Cu );
115  m_layerColors[LAYER_PAD_FR_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
116  m_layerColors[LAYER_PAD_BK_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
117 
118  // Netnames for copper layers
119  for( LSEQ cu = LSET::AllCuMask().CuStack(); cu; ++cu )
120  {
121  const COLOR4D lightLabel( 0.8, 0.8, 0.8, 0.7 );
122  const COLOR4D darkLabel = lightLabel.Inverted();
123  PCB_LAYER_ID layer = *cu;
124 
125  if( m_layerColors[layer].GetBrightness() > 0.5 )
126  m_layerColors[GetNetnameLayer( layer )] = darkLabel;
127  else
128  m_layerColors[GetNetnameLayer( layer )] = lightLabel;
129  }
130 
131  update();
132 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:759
smd pads, front layer
Definition: layer_ids.h:209
COLOR4D Inverted() const
Returns an inverted color, alpha remains the same.
Definition: color4d.h:333
COLOR4D m_layerColors[LAYER_ID_COUNT]
smd pads, back layer
Definition: layer_ids.h:210
Additional netnames layers (not associated with a PCB layer)
Definition: layer_ids.h:172
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
Definition: layer_ids.h:953
double a
Alpha component.
Definition: color4d.h:387
virtual void update()
Precalculates extra colors for layers (e.g.
void SetBackgroundColor(const COLOR4D &aColor) override
Set the background color.
Definition: pcb_painter.h:150
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
Definition: layer_ids.h:477
COLOR4D GetColor(int aLayer) const
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
Definition: layer_ids.h:71
PCB background color.
Definition: layer_ids.h:227
to draw pad holes (plated)
Definition: layer_ids.h:221
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103

References KIGFX::COLOR4D::a, LSET::AllCuMask(), B_Cu, F_Cu, GAL_LAYER_ID_END, GAL_LAYER_ID_START, COLOR_SETTINGS::GetColor(), GetNetnameLayer(), KIGFX::COLOR4D::Inverted(), LAYER_PAD_BK, LAYER_PAD_BK_NETNAMES, LAYER_PAD_FR, LAYER_PAD_FR_NETNAMES, LAYER_PAD_NETNAMES, LAYER_PAD_PLATEDHOLES, LAYER_PCB_BACKGROUND, LAYER_VIA_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 
)

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

137 {
140  m_padNumbers = aOptions.m_DisplayPadNum;
142  m_sketchText = !aOptions.m_DisplayTextFill;
145 
146  // Whether to draw tracks, vias & pads filled or as outlines
152 
153  // Net names display settings
154  switch( aOptions.m_DisplayNetNamesMode )
155  {
156  case 0:
157  m_netNamesOnPads = false;
158  m_netNamesOnTracks = false;
159  m_netNamesOnVias = false;
160  break;
161 
162  case 1:
163  m_netNamesOnPads = true;
164  m_netNamesOnTracks = false;
165  m_netNamesOnVias = true; // Follow pads or tracks? For now we chose pads....
166  break;
167 
168  case 2:
169  m_netNamesOnPads = false;
170  m_netNamesOnTracks = true;
171  m_netNamesOnVias = false; // Follow pads or tracks? For now we chose pads....
172  break;
173 
174  case 3:
175  m_netNamesOnPads = true;
176  m_netNamesOnTracks = true;
177  m_netNamesOnVias = true;
178  break;
179  }
180 
181  // Zone display settings
183 
184  // Clearance settings
185  switch( aOptions.m_ShowTrackClearanceMode )
186  {
189  break;
190 
193  break;
194 
197  break;
198 
201  break;
202 
205  break;
206  }
207 
208  if( aOptions.m_DisplayPadClearance )
210 
212 
213  m_netColorMode = aOptions.m_NetColorMode;
214 
216 
217  m_trackOpacity = aOptions.m_TrackOpacity;
218  m_viaOpacity = aOptions.m_ViaOpacity;
219  m_padOpacity = aOptions.m_PadOpacity;
220  m_zoneOpacity = aOptions.m_ZoneOpacity;
221 
222  m_showPageLimits = aShowPageLimits;
223 }
to draw micro vias
Definition: layer_ids.h:201
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:234
double m_TrackOpacity
Opacity override for all tracks.
bool m_sketchMode[GAL_LAYER_ID_END]
Definition: pcb_painter.h:196
double m_ViaOpacity
Opacity override for all types of via.
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
to draw usual through hole vias
Definition: layer_ids.h:203
NET_COLOR_MODE m_netColorMode
Overrides for specific netclass colors.
Definition: pcb_painter.h:219
RATSNEST_MODE m_RatsnestMode
Ratsnest draw mode (all layers vs only visible layers)
bool m_hiContrastEnabled
Parameters for display modes.
Inactive layers are shown normally (no high-contrast mode)
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:214
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:232
double m_ZoneOpacity
Opacity override for filled zone areas.
int m_clearanceDisplayFlags
How to display nets and netclasses with color overrides.
Definition: pcb_painter.h:216
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:231
double m_PadOpacity
Opacity override for SMD pads and PTHs.
multilayer pads, usually with holes
Definition: layer_ids.h:220
to draw blind/buried vias
Definition: layer_ids.h:202
ZONE_DISPLAY_MODE m_ZoneDisplayMode
HIGH_CONTRAST_MODE m_contrastModeDisplay
Definition: pcb_painter.h:213
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:233
ZONE_DISPLAY_MODE m_zoneDisplayMode
Definition: pcb_painter.h:212
NET_COLOR_MODE m_NetColorMode
How to use color overrides on specific nets and netclasses.

References CL_EDITED, CL_EXISTING, CL_NEW, CL_NONE, CL_PADS, CL_TRACKS, CL_VIAS, PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE, LAYER_PADS_TH, LAYER_TRACKS, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, m_clearanceDisplayFlags, PCB_DISPLAY_OPTIONS::m_ContrastModeDisplay, m_contrastModeDisplay, m_curvedRatsnestlines, PCB_DISPLAY_OPTIONS::m_DisplayGraphicsFill, PCB_DISPLAY_OPTIONS::m_DisplayNetNamesMode, PCB_DISPLAY_OPTIONS::m_DisplayPadClearance, PCB_DISPLAY_OPTIONS::m_DisplayPadFill, 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_globalRatsnestlines, KIGFX::RENDER_SETTINGS::m_hiContrastEnabled, PCB_DISPLAY_OPTIONS::m_NetColorMode, m_netColorMode, m_netNamesOnPads, m_netNamesOnTracks, m_netNamesOnVias, m_padNumbers, PCB_DISPLAY_OPTIONS::m_PadOpacity, m_padOpacity, m_ratsnestDisplayMode, PCB_DISPLAY_OPTIONS::m_RatsnestMode, PCB_DISPLAY_OPTIONS::m_ShowGlobalRatsnest, KIGFX::RENDER_SETTINGS::m_showPageLimits, PCB_DISPLAY_OPTIONS::m_ShowTrackClearanceMode, m_sketchGraphics, m_sketchMode, m_sketchText, PCB_DISPLAY_OPTIONS::m_TrackOpacity, m_trackOpacity, PCB_DISPLAY_OPTIONS::m_ViaOpacity, m_viaOpacity, PCB_DISPLAY_OPTIONS::m_ZoneDisplayMode, m_zoneDisplayMode, PCB_DISPLAY_OPTIONS::m_ZoneOpacity, m_zoneOpacity, NORMAL, PCB_DISPLAY_OPTIONS::SHOW_TRACK_CLEARANCE_WHILE_ROUTING, PCB_DISPLAY_OPTIONS::SHOW_TRACK_CLEARANCE_WITH_VIA_ALWAYS, PCB_DISPLAY_OPTIONS::SHOW_TRACK_CLEARANCE_WITH_VIA_WHILE_ROUTING, and PCB_DISPLAY_OPTIONS::SHOW_WHILE_ROUTING_OR_DRAGGING.

◆ SetActiveLayer()

void KIGFX::RENDER_SETTINGS::SetActiveLayer ( PCB_LAYER_ID  aLayer)
inlineinherited

Definition at line 113 of file render_settings.h.

113 { m_activeLayer = aLayer; }

References KIGFX::RENDER_SETTINGS::m_activeLayer.

Referenced by PCB_DRAW_PANEL_GAL::SetHighContrastLayer().

◆ SetBackgroundColor()

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

Set the background color.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 150 of file pcb_painter.h.

151  {
153  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
PCB background color.
Definition: layer_ids.h:227

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

Referenced by LoadColors().

◆ SetContrastModeDisplay()

void KIGFX::PCB_RENDER_SETTINGS::SetContrastModeDisplay ( HIGH_CONTRAST_MODE  aMode)
inline

Switch the contrast mode setting (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN ) to control how the non active layers are shown.

Definition at line 163 of file pcb_painter.h.

163 { m_contrastModeDisplay = aMode; }
HIGH_CONTRAST_MODE m_contrastModeDisplay
Definition: pcb_painter.h:213

References m_contrastModeDisplay.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetDefaultPenWidth()

◆ SetDrawIndividualViaLayers()

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

Definition at line 175 of file pcb_painter.h.

References m_drawIndividualViaLayers.

Referenced by PCBNEW_PRINTOUT::setupPainter().

◆ SetHighContrast()

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

Turns on/off high contrast display mode.

Definition at line 185 of file render_settings.h.

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

References KIGFX::RENDER_SETTINGS::m_hiContrastEnabled.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetHighContrastFactor()

void KIGFX::RENDER_SETTINGS::SetHighContrastFactor ( float  aFactor)
inlineinherited

Definition at line 272 of file render_settings.h.

272 { m_hiContrastFactor = aFactor; }

References KIGFX::RENDER_SETTINGS::m_hiContrastFactor.

Referenced by PCB_BASE_FRAME::LoadSettings().

◆ SetHighlight() [1/2]

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

Turns on/off highlighting.

It may be done for the active layer or the specified net(s)..

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

Definition at line 152 of file render_settings.h.

153  {
154  m_highlightEnabled = aEnabled;
155 
156  if( aEnabled )
157  {
158  if( !aMulti )
159  m_highlightNetcodes.clear();
160 
161  m_highlightNetcodes.insert( aNetcode );
162  }
163  else
164  m_highlightNetcodes.clear();
165  }
std::set< int > m_highlightNetcodes

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

Referenced by DIALOG_NET_INSPECTOR::buildNetsList(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PNS::TOOL_BASE::highlightNet(), APPEARANCE_CONTROLS::onNetclassContextMenu(), DIALOG_NET_INSPECTOR::onSelChanged(), DIALOG_NET_INSPECTOR::onSortingChanged(), GERBVIEW_SELECTION_TOOL::Reset(), EE_SELECTION_TOOL::Reset(), and PCB_SELECTION_TOOL::Reset().

◆ SetHighlight() [2/2]

void KIGFX::RENDER_SETTINGS::SetHighlight ( std::set< int > &  aHighlight,
bool  aEnabled = true 
)
inlineinherited

Turns on highlighting and highlights multiple nets.

Parameters
aHighlightis a set of netcodes to highlight
aEnabledtells if highlighting should be enabled.

Definition at line 172 of file render_settings.h.

173  {
174  m_highlightEnabled = aEnabled;
175 
176  if( aEnabled )
177  m_highlightNetcodes = aHighlight;
178  else
179  m_highlightNetcodes.clear();
180  }
std::set< int > m_highlightNetcodes

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

◆ SetHighlightFactor()

void KIGFX::RENDER_SETTINGS::SetHighlightFactor ( float  aFactor)
inlineinherited

Definition at line 270 of file render_settings.h.

270 { m_highlightFactor = aFactor; }

References KIGFX::RENDER_SETTINGS::m_highlightFactor.

Referenced by PCB_BASE_FRAME::LoadSettings().

◆ SetIsPrinting()

void KIGFX::RENDER_SETTINGS::SetIsPrinting ( bool  isPrinting)
inlineinherited

Definition at line 210 of file render_settings.h.

210 { m_isPrinting = isPrinting; }

References KIGFX::RENDER_SETTINGS::m_isPrinting.

Referenced by BOARD_PRINTOUT::DrawPage().

◆ SetLayerColor()

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

Change the color used to draw a layer.

Parameters
aLayeris the layer number.
aColoris the new color.

Definition at line 248 of file render_settings.h.

249  {
250  m_layerColors[aLayer] = aColor;
251 
252  update(); // recompute other shades of the color
253  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
virtual void update()
Precalculates extra colors for layers (e.g.

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

Referenced by SCH_EDIT_FRAME::DrawCurrentSheetToClipboard(), BOARD_PRINTOUT::DrawPage(), PLEDITOR_PRINTOUT::PrintPage(), DIALOG_PAD_PROPERTIES::redraw(), PCBNEW_PRINTOUT::setupPainter(), PCBNEW_PRINTOUT::setupViewLayers(), and DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample().

◆ SetLayerIsHighContrast()

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

Set the specified layer as high-contrast.

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 69 of file render_settings.h.

70  {
71  if( aEnabled )
72  m_highContrastLayers.insert( aLayerId );
73  else
74  m_highContrastLayers.erase( aLayerId );
75  }
std::set< unsigned int > m_highContrastLayers

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

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

◆ SetMinPenWidth()

void KIGFX::RENDER_SETTINGS::SetMinPenWidth ( int  aWidth)
inlineinherited

◆ SetNetColorMode()

void KIGFX::PCB_RENDER_SETTINGS::SetNetColorMode ( NET_COLOR_MODE  aMode)
inline

Definition at line 178 of file pcb_painter.h.

178 { m_netColorMode = aMode; }
NET_COLOR_MODE m_netColorMode
Overrides for specific netclass colors.
Definition: pcb_painter.h:219

References m_netColorMode.

◆ SetOutlineWidth()

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

Set line width used for drawing outlines.

Parameters
aWidthis the new width.

Definition at line 265 of file render_settings.h.

266  {
267  m_outlineWidth = aWidth;
268  }

References KIGFX::RENDER_SETTINGS::m_outlineWidth.

◆ SetPrintDC()

◆ SetRatsnestDisplayMode()

void KIGFX::PCB_RENDER_SETTINGS::SetRatsnestDisplayMode ( RATSNEST_MODE  aMode)
inline

Definition at line 181 of file pcb_painter.h.

181 { m_ratsnestDisplayMode = aMode; }
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:214

References m_ratsnestDisplayMode.

◆ SetSelectFactor()

void KIGFX::RENDER_SETTINGS::SetSelectFactor ( float  aFactor)
inlineinherited

Definition at line 271 of file render_settings.h.

271 { m_selectFactor = aFactor; }

References KIGFX::RENDER_SETTINGS::m_selectFactor.

Referenced by PCB_BASE_FRAME::LoadSettings().

◆ SetShowPageLimits()

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

◆ SetSketchMode()

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

Turn 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 107 of file pcb_painter.h.

108  {
109  m_sketchMode[aItemLayer] = aEnabled;
110  }
bool m_sketchMode[GAL_LAYER_ID_END]
Definition: pcb_painter.h:196

References m_sketchMode.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetSketchModeGraphicItems()

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

Turn 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 128 of file pcb_painter.h.

129  {
130  m_sketchGraphics = aEnabled;
131  }

References m_sketchGraphics.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetZoneDisplayMode()

void KIGFX::PCB_RENDER_SETTINGS::SetZoneDisplayMode ( ZONE_DISPLAY_MODE  mode)
inline

Definition at line 190 of file pcb_painter.h.

190 { m_zoneDisplayMode = mode; }
ZONE_DISPLAY_MODE m_zoneDisplayMode
Definition: pcb_painter.h:212

References m_zoneDisplayMode.

◆ update()

void RENDER_SETTINGS::update ( )
protectedvirtualinherited

Precalculates extra colors for layers (e.g.

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

Definition at line 54 of file render_settings.cpp.

55 {
56  // Calculate darkened/highlighted variants of layer colors
57  for( int i = 0; i < LAYER_ID_COUNT; i++ )
58  {
61 
64 
65  if( IsNetnameLayer( i ) || IsHoleLayer( i ) )
66  {
68  continue;
69  }
70 
71  // Linear brightening doesn't work well for colors near white
72  double factor = ( m_selectFactor * 0.5 ) + pow( m_layerColors[i].GetBrightness(), 3 );
73  factor = std::min( 1.0, factor );
74 
75  m_layerColorsSel[i] = m_layerColors[i].Brightened( factor );
76 
77  // If we are maxed out on brightening as a highlight, fallback to darkening but keep
78  // the blue that acts as a "glowing" color
79  if( std::fabs( m_layerColorsSel[i].GetBrightness() - m_layerColors[i].GetBrightness() )
80  < 0.05 )
81  {
83  m_layerColorsSel[i].b = m_layerColors[i].b * ( 1.0 - factor ) + factor;
84  }
85 
86  }
87 }
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
COLOR4D m_layerColors[LAYER_ID_COUNT]
COLOR4D Darkened(double aFactor) const
Return a color that is darker by a given factor, without modifying object.
Definition: color4d.h:292
double b
Blue component.
Definition: color4d.h:386
COLOR4D m_hiContrastColor[LAYER_ID_COUNT]
COLOR4D Brightened(double aFactor) const
Return a color that is brighter by a given factor, without modifying object.
Definition: color4d.h:278
bool IsHoleLayer(LAYER_NUM aLayer)
Definition: layer_ids.h:847
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
Definition: layer_ids.h:976
PCB background color.
Definition: layer_ids.h:227
COLOR4D Mix(const COLOR4D &aColor, double aFactor) const
Return a color that is mixed with the input by a factor.
Definition: color4d.h:305
#define LAYER_ID_COUNT
Must update this if you add any enums after GerbView!
Definition: layer_ids.h:436
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]

References KIGFX::COLOR4D::b, KIGFX::COLOR4D::Brightened(), KIGFX::COLOR4D::Darkened(), IsHoleLayer(), IsNetnameLayer(), 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::DS_RENDER_SETTINGS::DS_RENDER_SETTINGS(), 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(), and KIGFX::RENDER_SETTINGS::SetLayerColor().

Friends And Related Function Documentation

◆ PCB_PAINTER

friend class PCB_PAINTER
friend

Flags to control clearance lines visibility.

Definition at line 67 of file pcb_painter.h.

Member Data Documentation

◆ m_activeLayer

PCB_LAYER_ID KIGFX::RENDER_SETTINGS::m_activeLayer
protectedinherited

◆ m_backgroundColor

◆ m_clearanceDisplayFlags

int KIGFX::PCB_RENDER_SETTINGS::m_clearanceDisplayFlags
protected

How to display nets and netclasses with color overrides.

Definition at line 216 of file pcb_painter.h.

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

◆ m_contrastModeDisplay

HIGH_CONTRAST_MODE KIGFX::PCB_RENDER_SETTINGS::m_contrastModeDisplay
protected

◆ m_curvedRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_curvedRatsnestlines = true
protected

Definition at line 207 of file pcb_painter.h.

Referenced by GetCurvedRatsnestLinesEnabled(), and LoadDisplayOptions().

◆ m_defaultPenWidth

◆ m_drawIndividualViaLayers

bool KIGFX::PCB_RENDER_SETTINGS::m_drawIndividualViaLayers = false
protected

Definition at line 210 of file pcb_painter.h.

Referenced by GetDrawIndividualViaLayers(), and SetDrawIndividualViaLayers().

◆ m_drawingSheetLineWidth

float KIGFX::RENDER_SETTINGS::m_drawingSheetLineWidth
protectedinherited

◆ m_globalRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_globalRatsnestlines = true
protected

Definition at line 208 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_hiddenNets

std::set<int> KIGFX::PCB_RENDER_SETTINGS::m_hiddenNets
protected

Definition at line 228 of file pcb_painter.h.

Referenced by GetHiddenNets().

◆ m_highContrastLayers

◆ m_highlightEnabled

◆ m_highlightFactor

float KIGFX::RENDER_SETTINGS::m_highlightFactor
protectedinherited

◆ m_highlightNetcodes

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

◆ m_isPrinting

bool KIGFX::RENDER_SETTINGS::m_isPrinting
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_minPenWidth

◆ m_netclassColors

std::map<wxString, KIGFX::COLOR4D> KIGFX::PCB_RENDER_SETTINGS::m_netclassColors
protected

Overrides for specific net colors, stored as netcodes for the ratsnest to access easily.

Definition at line 222 of file pcb_painter.h.

Referenced by GetColor(), and GetNetclassColorMap().

◆ m_netColorMode

NET_COLOR_MODE KIGFX::PCB_RENDER_SETTINGS::m_netColorMode
protected

Overrides for specific netclass colors.

Definition at line 219 of file pcb_painter.h.

Referenced by GetColor(), GetNetColorMode(), LoadDisplayOptions(), PCB_RENDER_SETTINGS(), and SetNetColorMode().

◆ m_netColors

std::map<int, KIGFX::COLOR4D> KIGFX::PCB_RENDER_SETTINGS::m_netColors
protected

Set of net codes that should not have their ratsnest displayed.

Definition at line 225 of file pcb_painter.h.

Referenced by GetColor(), and GetNetColorMap().

◆ m_netNamesOnPads

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnPads
protected

◆ m_netNamesOnTracks

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnTracks
protected

◆ m_netNamesOnVias

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnVias
protected

◆ m_outlineWidth

◆ m_padNumbers

bool KIGFX::PCB_RENDER_SETTINGS::m_padNumbers
protected

◆ m_padOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_padOpacity
protected

Opacity override for SMD pads and PTHs.

Definition at line 233 of file pcb_painter.h.

Referenced by GetColor(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_printDC

wxDC* KIGFX::RENDER_SETTINGS::m_printDC
protectedinherited

◆ m_ratsnestDisplayMode

RATSNEST_MODE KIGFX::PCB_RENDER_SETTINGS::m_ratsnestDisplayMode
protected

◆ m_selectFactor

float KIGFX::RENDER_SETTINGS::m_selectFactor
protectedinherited

◆ m_showPageLimits

◆ m_sketchGraphics

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchGraphics
protected

◆ m_sketchMode

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

◆ m_sketchText

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchText
protected

◆ m_trackOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_trackOpacity
protected

Opacity override for all tracks.

Definition at line 231 of file pcb_painter.h.

Referenced by GetColor(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_viaOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_viaOpacity
protected

Opacity override for all types of via.

Definition at line 232 of file pcb_painter.h.

Referenced by GetColor(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_zoneDisplayMode

ZONE_DISPLAY_MODE KIGFX::PCB_RENDER_SETTINGS::m_zoneDisplayMode
protected

◆ m_zoneOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_zoneOpacity
protected

Opacity override for filled zones.

Definition at line 234 of file pcb_painter.h.

Referenced by GetColor(), LoadDisplayOptions(), and PCB_RENDER_SETTINGS().

◆ m_zoneOutlines

bool KIGFX::PCB_RENDER_SETTINGS::m_zoneOutlines
protected

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

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


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