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...
 

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 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)
 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...
 
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 ()
 return the contrast mode setting (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN ) More...
 
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)
 Function SetLayerIsHighContrast Sets the specified layer as high-contrast. More...
 
bool GetLayerIsHighContrast (int aLayerId) const
 Function GetLayerIsHighContrast Returns information whether the queried layer is marked as high-contrast. More...
 
const std::set< unsigned int > GetHighContrastLayers () const
 Function GetHighContrastLayers() Returns the set of currently high-contrast layers. More...
 
PCB_LAYER_ID GetPrimaryHighContrastLayer () const
 Returns the board layer which is in high-contrast. More...
 
PCB_LAYER_ID GetActiveLayer () const
 
void SetActiveLayer (PCB_LAYER_ID aLayer)
 
void ClearHighContrastLayers ()
 Function ClearHighContrastLayers Clears the list of active layers. More...
 
bool IsHighlightEnabled () const
 Function IsHighlightEnabled Returns current highlight setting. More...
 
const std::set< int > & GetHighlightNetCodes () const
 Function GetHighlightNetCode Returns netcode of currently highlighted net. More...
 
void SetHighlight (bool aEnabled, int aNetcode=-1, bool aMulti=false)
 Function SetHighlight Turns on/off highlighting - it may be done for the active layer or the specified net(s). More...
 
void SetHighContrast (bool aEnabled)
 Function SetHighContrast Turns on/off high contrast display mode. More...
 
bool GetHighContrast () const
 
float GetWorksheetLineWidth () const
 
int GetDefaultPenWidth () const
 
void SetDefaultPenWidth (int aWidth)
 
int GetMinPenWidth () const
 
void SetMinPenWidth (int aWidth)
 
bool GetShowPageLimits () const
 
void SetShowPageLimits (bool aDraw)
 
const COLOR4DGetLayerColor (int aLayer) const
 Function GetLayerColor Returns the color used to draw a layer. More...
 
void SetLayerColor (int aLayer, const COLOR4D &aColor)
 Function SetLayerColor Changes the color used to draw a layer. More...
 
void SetOutlineWidth (float aWidth)
 Set line width used for drawing outlines. More...
 
void SetHighlightFactor (float aFactor)
 
void SetSelectFactor (float aFactor)
 
void SetHighContrastFactor (float aFactor)
 
wxDC * GetPrintDC ()
 
void SetPrintDC (wxDC *aDC)
 

Protected Member Functions

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

Protected Attributes

bool m_sketchMode [GAL_LAYER_ID_END]
 

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

More...
 
bool m_sketchGraphics
 

Flag determining if graphic items should be outlined or stroked

More...
 
bool m_sketchText
 

Flag determining if text items should be outlined or stroked

More...
 
bool m_padNumbers
 

Flag determining if pad numbers should be visible

More...
 
bool m_netNamesOnPads
 

Flag determining if net names should be visible for pads

More...
 
bool m_netNamesOnTracks
 

Flag determining if net names should be visible for tracks

More...
 
bool m_netNamesOnVias
 

Flag determining if net names should be visible for vias

More...
 
bool m_zoneOutlines
 

Flag determining if zones should have outlines drawn

More...
 
bool m_curvedRatsnestlines = true
 

Flag determining if ratsnest lines should be drawn curved

More...
 
bool m_globalRatsnestlines = true
 

Flag determining if ratsnest lines are shown by default

More...
 
bool m_drawIndividualViaLayers = false
 
ZONE_DISPLAY_MODE m_zoneDisplayMode
 

Option for different display modes for zones

More...
 
int m_clearance
 

Clearance visibility settings

More...
 
NET_COLOR_MODE m_netColorMode
 

How to display nets and netclasses with color overrides

More...
 
std::map< wxString, KIGFX::COLOR4Dm_netclassColors
 

Overrides for specific netclass colors

More...
 
std::map< int, KIGFX::COLOR4Dm_netColors
 

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

More...
 
std::set< int > m_hiddenNets
 

Set of net codes that should not have their ratsnest displayed

More...
 
HIGH_CONTRAST_MODE m_contrastModeDisplay
 

How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )

More...
 
RATSNEST_MODE m_ratsnestDisplayMode
 
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_worksheetLineWidth
 
int m_defaultPenWidth
 
int m_minPenWidth
 
bool m_showPageLimits
 
wxDC * m_printDC
 

Static Protected Attributes

static const double MAX_FONT_SIZE = Millimeter2iu( 10.0 )
 

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

More...
 

Friends

class PCB_PAINTER
 

Detailed Description

PCB_RENDER_SETTINGS Stores PCB specific render settings.

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

Constructor & Destructor Documentation

◆ PCB_RENDER_SETTINGS()

PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS ( )

Definition at line 56 of file pcb_painter.cpp.

57 {
58  m_backgroundColor = COLOR4D( 0.0, 0.0, 0.0, 1.0 );
59  m_padNumbers = true;
60  m_netNamesOnPads = true;
61  m_netNamesOnTracks = true;
62  m_netNamesOnVias = true;
63  m_zoneOutlines = true;
66  m_sketchGraphics = false;
67  m_sketchText = false;
71 
72  m_trackOpacity = 1.0;
73  m_viaOpacity = 1.0;
74  m_padOpacity = 1.0;
75  m_zoneOpacity = 1.0;
76 
77  // By default everything should be displayed as filled
78  for( unsigned int i = 0; i < arrayDim( m_sketchMode ); ++i )
79  {
80  m_sketchMode[i] = false;
81  }
82 
83  update();
84 }
Filled polygons are shown.
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:252
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:191
Net/netclass colors are shown on ratsnest lines only.
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:200
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:203
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:194
Ratsnest lines are drawn to items on all layers (default)
NET_COLOR_MODE m_netColorMode
How to display nets and netclasses with color overrides
Definition: pcb_painter.h:232
virtual void update()
Function update Precalculates extra colors for layers (e.g.
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:246
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:250
bool m_sketchText
Flag determining if text items should be outlined or stroked
Definition: pcb_painter.h:197
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Definition: macros.h:127
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:206
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:249
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:229
HIGH_CONTRAST_MODE m_contrastModeDisplay
How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )
Definition: pcb_painter.h:244
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:251
bool m_zoneOutlines
Flag determining if zones should have outlines drawn
Definition: pcb_painter.h:212
ZONE_DISPLAY_MODE m_zoneDisplayMode
Option for different display modes for zones
Definition: pcb_painter.h:226
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:209
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:100

References ALL, arrayDim(), CL_NONE, KIGFX::RENDER_SETTINGS::m_backgroundColor, m_clearance, 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

Function ClearHighContrastLayers Clears the list of active layers.

Definition at line 117 of file render_settings.h.

118  {
119  m_highContrastLayers.clear();
120  }
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

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

Definition at line 135 of file pcb_painter.h.

136  {
137  m_zoneOutlines = aEnabled;
138  }
bool m_zoneOutlines
Flag determining if zones should have outlines drawn
Definition: pcb_painter.h:212

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

110 { return m_activeLayer; }

References KIGFX::RENDER_SETTINGS::m_activeLayer.

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

◆ GetBackgroundColor()

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

Function GetBackgroundColor Returns current background color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 147 of file pcb_painter.h.

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

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

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

◆ GetColor()

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

226 {
227  int netCode = -1;
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 
231  // Zones should pull from the copper layer
232  if( item && item->Type() == PCB_ZONE_AREA_T && IsZoneLayer( aLayer ) )
233  aLayer = aLayer - LAYER_ZONE_START;
234 
235  // Make items invisible in "other layers hidden" contrast mode
237  return COLOR4D::CLEAR;
238 
239  // Hide net names in "dimmed" contrast mode
240  if( m_hiContrastEnabled && IsNetnameLayer( aLayer ) && m_highContrastLayers.count( aLayer ) == 0 )
241  return COLOR4D::CLEAR;
242 
243  // Marker shadows
244  if( aLayer == LAYER_MARKER_SHADOWS )
245  {
246  COLOR4D shadowColor = m_backgroundColor.WithAlpha( 0.6 );
247 
248  if( item && item->IsSelected() )
249  shadowColor.Brighten( m_selectFactor );
250 
251  return shadowColor;
252  }
253 
254  // Normal path: get the layer base color
255  COLOR4D color = m_layerColors[aLayer];
256 
257  if( item )
258  {
259  // Selection disambiguation
260  if( item->IsBrightened() )
261  return color.Brightened( m_selectFactor ).WithAlpha( 0.8 );
262 
263  // Don't let pads that *should* be NPTHs get lost
264  if( item->Type() == PCB_PAD_T && dyn_cast<const D_PAD*>( item )->PadShouldBeNPTH() )
265  aLayer = LAYER_MOD_TEXT_INVISIBLE;
266 
267  if( item->IsSelected() )
268  color = m_layerColorsSel[aLayer];
269  }
270  else
271  {
272  return m_layerColors[aLayer];
273  }
274 
275  // Try to obtain the netcode for the item
276  if( conItem )
277  netCode = conItem->GetNetCode();
278 
280  bool highlighted = m_highlightEnabled && m_highlightNetcodes.count( netCode );
281  bool activeLayer = m_highContrastLayers.count( aLayer );
282  bool selected = item->IsSelected();
283 
284  // Apply net color overrides
285  if( conItem && m_netColorMode == NET_COLOR_MODE::ALL && IsNetCopperLayer( aLayer ) )
286  {
287  COLOR4D netColor = COLOR4D::UNSPECIFIED;
288 
289  auto ii = m_netColors.find( netCode );
290 
291  if( ii != m_netColors.end() )
292  netColor = ii->second;
293 
294  if( netColor == COLOR4D::UNSPECIFIED )
295  {
296  auto jj = m_netclassColors.find( conItem->GetNetClassName() );
297 
298  if( jj != m_netclassColors.end() )
299  netColor = jj->second;
300  }
301 
302  if( netColor == COLOR4D::UNSPECIFIED )
303  netColor = color;
304 
305  if( selected )
306  {
307  // Selection brightening overrides highlighting
308  netColor.Brighten( m_selectFactor );
309  }
310  else if( m_highlightEnabled )
311  {
312  // Highlight brightens objects on all layers and darkens everything else for contrast
313  if( highlighted )
314  netColor.Brighten( m_highlightFactor );
315  else
316  netColor.Darken( 1.0 - m_highlightFactor );
317  }
318 
319  color = netColor;
320  }
321  else if( !selected && m_highlightEnabled )
322  {
323  // Single net highlight mode
324  color = m_highlightNetcodes.count( netCode ) ? m_layerColorsHi[aLayer]
325  : m_layerColorsDark[aLayer];
326  }
327 
328  // Apply high-contrast dimming
329  if( dimmedMode && !activeLayer && !highlighted && !selected )
331 
332  // For vias, some layers depend on other layers in high contrast mode
333  if( m_hiContrastEnabled && !selected && item->Type() == PCB_VIA_T &&
334  ( aLayer == LAYER_VIAS_HOLES ||
335  aLayer == LAYER_VIA_THROUGH ||
336  aLayer == LAYER_VIA_MICROVIA ||
337  aLayer == LAYER_VIA_BBLIND ||
338  aLayer == LAYER_VIAS_NETNAMES ) )
339  {
340  const VIA* via = static_cast<const VIA*>( item );
341  const BOARD* pcb = static_cast<const BOARD*>( item->GetParent() );
342  bool viaActiveLayer = false;
343 
344  for( int layer : m_highContrastLayers )
345  {
346  auto lay_id = static_cast<PCB_LAYER_ID>( layer );
347  viaActiveLayer |= via->IsOnLayer( lay_id ) && pcb->IsLayerVisible( lay_id );
348  }
349 
350  if( !viaActiveLayer && m_contrastModeDisplay == HIGH_CONTRAST_MODE::HIDDEN )
351  return COLOR4D::CLEAR;
352 
353  if( !viaActiveLayer )
354  color.Darken( 1.0 - m_highlightFactor );
355  }
356 
357  // Apply per-type opacity overrides
358  if( item->Type() == PCB_TRACE_T || item->Type() == PCB_ARC_T )
359  color.a *= m_trackOpacity;
360  else if( item->Type() == PCB_VIA_T )
361  color.a *= m_viaOpacity;
362  else if( item->Type() == PCB_PAD_T )
363  color.a *= m_padOpacity;
364  else if( item->Type() == PCB_ZONE_AREA_T || item->Type() == PCB_FP_ZONE_AREA_T )
365  color.a *= m_zoneOpacity;
366 
367  // No special modificators enabled
368  return color;
369 }
Virtual layers for stacking zones and tracks on a given copper layer.
to draw blind/buried vias
int GetNetCode() const
Function GetNetCode.
class ZONE_CONTAINER, managed by a footprint
Definition: typeinfo.h:95
COLOR4D & Brighten(double aFactor)
Function Brighten Makes the color brighter by a given factor.
Definition: color4d.h:214
bool IsSelected() const
Definition: eda_item.h:191
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:252
COLOR4D m_layerColorsHi[LAYER_ID_COUNT]
COLOR4D m_layerColors[LAYER_ID_COUNT]
int color
Definition: DXF_plotter.cpp:60
class ZONE_CONTAINER, a zone area
Definition: typeinfo.h:106
Net/netclass colors are shown on all net copper.
to draw via holes (pad holes do not use this layer)
class ARC, an arc track segment on a copper layer
Definition: typeinfo.h:98
COLOR4D WithAlpha(double aAlpha) const
Function WithAlpha Returns a colour with the same colour, but the given alpha.
Definition: color4d.h:315
bool IsBrightened() const
Definition: eda_item.h:193
class D_PAD, a pad in a footprint
Definition: typeinfo.h:90
bool IsNetCopperLayer(LAYER_NUM aLayer)
Checks if the given layer is "net copper", meaning it is eligible for net coloring.
BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected and have...
wxString GetNetClassName() const
Function GetNetClassName returns a pointer to the netclass of the zone.
std::set< unsigned int > m_highContrastLayers
class TRACK, a track segment (segment on a copper layer)
Definition: typeinfo.h:96
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition: color4d.h:380
std::map< wxString, KIGFX::COLOR4D > m_netclassColors
Overrides for specific netclass colors
Definition: pcb_painter.h:235
NET_COLOR_MODE m_netColorMode
How to display nets and netclasses with color overrides
Definition: pcb_painter.h:232
Non-active layers are shown normally (no high-contrast mode)
COLOR4D m_layerColorsDark[LAYER_ID_COUNT]
bool m_hiContrastEnabled
Parameters for display modes.
bool IsZoneLayer(LAYER_NUM aLayer)
static const COLOR4D CLEAR
Definition: color4d.h:385
to draw usual through hole vias
EDA_ITEM * GetParent() const
Definition: eda_item.h:183
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:250
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:249
std::map< int, KIGFX::COLOR4D > m_netColors
Overrides for specific net colors, stored as netcodes for the ratsnest to access easily
Definition: pcb_painter.h:238
Information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:186
COLOR4D & Darken(double aFactor)
Function Darken Makes the color darker by a given factor.
Definition: color4d.h:231
HIGH_CONTRAST_MODE m_contrastModeDisplay
How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )
Definition: pcb_painter.h:244
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: eda_item.h:147
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:251
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:97
Non-active layers are dimmed (old high-contrast mode)
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
std::set< int > m_highlightNetcodes
COLOR4D m_layerColorsSel[LAYER_ID_COUNT]
bool IsNetnameLayer(LAYER_NUM aLayer)
Test whether a layer is a netname layer.
KICAD_T Type() const
Function Type()
Definition: eda_item.h:181
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:100

References ALL, KIGFX::COLOR4D::Brighten(), KIGFX::COLOR4D::CLEAR, color, KIGFX::COLOR4D::Darken(), DIMMED, BOARD_CONNECTED_ITEM::GetNetClassName(), BOARD_CONNECTED_ITEM::GetNetCode(), EDA_ITEM::GetParent(), HIDDEN, EDA_ITEM::IsBrightened(), BOARD::IsLayerVisible(), IsNetCopperLayer(), IsNetnameLayer(), VIA::IsOnLayer(), EDA_ITEM::IsSelected(), IsZoneLayer(), LAYER_MARKER_SHADOWS, LAYER_MOD_TEXT_INVISIBLE, LAYER_PCB_BACKGROUND, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_VIAS_HOLES, LAYER_VIAS_NETNAMES, 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_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, PCB_ARC_T, PCB_FP_ZONE_AREA_T, PCB_PAD_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_AREA_T, EDA_ITEM::Type(), KIGFX::COLOR4D::UNSPECIFIED, and KIGFX::COLOR4D::WithAlpha().

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

◆ GetContrastModeDisplay()

HIGH_CONTRAST_MODE KIGFX::PCB_RENDER_SETTINGS::GetContrastModeDisplay ( )
inline

return the contrast mode setting (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )

Definition at line 165 of file pcb_painter.h.

165 { return m_contrastModeDisplay; }
HIGH_CONTRAST_MODE m_contrastModeDisplay
How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )
Definition: pcb_painter.h:244

References m_contrastModeDisplay.

◆ GetCursorColor()

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

Function GetCursorColor Returns current cursor color settings.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 156 of file pcb_painter.h.

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

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

◆ GetCurvedRatsnestLinesEnabled()

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

Definition at line 167 of file pcb_painter.h.

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

References m_curvedRatsnestlines.

◆ GetDefaultPenWidth()

◆ GetDrawIndividualViaLayers()

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

Definition at line 171 of file pcb_painter.h.

References m_drawIndividualViaLayers.

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

◆ GetGlobalRatsnestLinesEnabled()

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

Definition at line 169 of file pcb_painter.h.

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

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

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

◆ GetHiddenNets() [1/2]

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

Definition at line 184 of file pcb_painter.h.

184 { return m_hiddenNets; }
std::set< int > m_hiddenNets
Set of net codes that should not have their ratsnest displayed
Definition: pcb_painter.h:241

References m_hiddenNets.

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

◆ GetHiddenNets() [2/2]

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

Definition at line 185 of file pcb_painter.h.

185 { return m_hiddenNets; }
std::set< int > m_hiddenNets
Set of net codes that should not have their ratsnest displayed
Definition: pcb_painter.h:241

References m_hiddenNets.

◆ GetHighContrast()

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

◆ GetHighContrastLayers()

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

Function GetHighContrastLayers() Returns the set of currently high-contrast layers.

Definition at line 89 of file render_settings.h.

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

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

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

◆ GetHighlightNetCodes()

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

Function GetHighlightNetCode Returns netcode of currently highlighted net.

Returns
Netcode of currently highlighted net.

Definition at line 137 of file render_settings.h.

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

References KIGFX::RENDER_SETTINGS::m_highlightNetcodes.

Referenced by PNS::TOOL_BASE::highlightNet(), and PCB_INSPECTION_TOOL::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 219 of file render_settings.h.

220  {
221  return m_layerColors[aLayer];
222  }
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(), KIGFX::PREVIEW::DrawTextNextToCursor(), KIGFX::SCH_PAINTER::getRenderColor(), LIB_RECTANGLE::Plot(), LIB_CIRCLE::Plot(), LIB_BEZIER::Plot(), LIB_TEXT::Plot(), LIB_ARC::Plot(), LIB_POLYLINE::Plot(), SCH_NO_CONNECT::Plot(), SCH_BITMAP::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), LIB_PART::Plot(), SCH_SHEET::Plot(), LIB_PART::PlotLibFields(), DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), LIB_PIN::PlotPinTexts(), LIB_PIN::PlotSymbol(), LIB_POLYLINE::print(), LIB_RECTANGLE::print(), LIB_TEXT::print(), LIB_ARC::print(), SCH_JUNCTION::Print(), LIB_FIELD::print(), SCH_NO_CONNECT::Print(), SCH_BUS_ENTRY_BASE::Print(), LIB_BEZIER::print(), LIB_CIRCLE::print(), SCH_FIELD::Print(), SCH_LINE::Print(), SCH_TEXT::Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), LIB_PIN::printPinElectricalTypeName(), LIB_PIN::printPinSymbol(), LIB_PIN::printPinTexts(), WS_DRAW_ITEM_LINE::PrintWsItem(), WS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem(), WS_DRAW_ITEM_RECT::PrintWsItem(), WS_DRAW_ITEM_TEXT::PrintWsItem(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::WS_PROXY_VIEW_ITEM::ViewDraw(), and EDIT_POINTS::ViewDraw().

◆ GetLayerIsHighContrast()

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

Function GetLayerIsHighContrast Returns information whether the queried layer is marked as high-contrast.

Returns
True if the queried layer is marked as active.

Definition at line 80 of file render_settings.h.

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

References KIGFX::RENDER_SETTINGS::m_highContrastLayers.

◆ GetMinPenWidth()

◆ GetNetclassColorMap()

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

◆ GetNetColorMap()

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

Definition at line 182 of file pcb_painter.h.

182 { return m_netColors; }
std::map< int, KIGFX::COLOR4D > m_netColors
Overrides for specific net colors, stored as netcodes for the ratsnest to access easily
Definition: pcb_painter.h:238

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

174 { return m_netColorMode; }
NET_COLOR_MODE m_netColorMode
How to display nets and netclasses with color overrides
Definition: pcb_painter.h:232

References m_netColorMode.

◆ GetPrimaryHighContrastLayer()

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

Returns the board layer which is in high-contrast.

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

100  {
101  for( int layer : m_highContrastLayers )
102  {
103  if( layer >= PCBNEW_LAYER_ID_START && layer < PCB_LAYER_ID_COUNT )
104  return (PCB_LAYER_ID) layer;
105  }
106 
107  return UNDEFINED_LAYER;
108  }
std::set< unsigned int > m_highContrastLayers
PCB_LAYER_ID
A quick note on layer IDs:

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

◆ GetPrintDC()

◆ GetRatsnestDisplayMode()

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

Definition at line 177 of file pcb_painter.h.

177 { return m_ratsnestDisplayMode; }
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:246

References m_ratsnestDisplayMode.

◆ GetShowPageLimits()

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

◆ GetSketchMode()

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

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

Parameters
aItemLayeris the item layer that is changed.

Definition at line 117 of file pcb_painter.h.

118  {
119  return m_sketchMode[aItemLayer];
120  }
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:191

References m_sketchMode.

◆ GetWorksheetLineWidth()

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

◆ IsBackgroundDark()

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

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 140 of file pcb_painter.h.

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

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

◆ IsHighlightEnabled()

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

Function IsHighlightEnabled Returns current highlight setting.

Returns
True if highlight is enabled, false otherwise.

Definition at line 127 of file render_settings.h.

128  {
129  return m_highlightEnabled;
130  }

References KIGFX::RENDER_SETTINGS::m_highlightEnabled.

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

◆ LoadColors()

void PCB_RENDER_SETTINGS::LoadColors ( const COLOR_SETTINGS aSettings)
overridevirtual

Reimplemented from KIGFX::RENDER_SETTINGS.

Definition at line 87 of file pcb_painter.cpp.

88 {
90 
91  // Init board layers colors:
92  for( int i = 0; i < PCB_LAYER_ID_COUNT; i++ )
93  {
94  m_layerColors[i] = aSettings->GetColor( i );
95 
96  // Guard: if the alpah channel is too small, the layer is not visible.
97  // clamp it to 0.2
98  if( m_layerColors[i].a < 0.2 )
99  m_layerColors[i].a = 0.2;
100  }
101 
102  // Init specific graphic layers colors:
103  for( int i = GAL_LAYER_ID_START; i < GAL_LAYER_ID_END; i++ )
104  m_layerColors[i] = aSettings->GetColor( i );
105 
106  // Default colors for specific layers (not really board layers).
108  m_layerColors[LAYER_VIAS_NETNAMES] = COLOR4D( 0.2, 0.2, 0.2, 0.9 );
109  m_layerColors[LAYER_PADS_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
110  m_layerColors[LAYER_PAD_FR_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
111  m_layerColors[LAYER_PAD_BK_NETNAMES] = COLOR4D( 1.0, 1.0, 1.0, 0.9 );
112 
113  // LAYER_PADS_TH, LAYER_NON_PLATEDHOLES, LAYER_ANCHOR ,LAYER_RATSNEST,
114  // LAYER_VIA_THROUGH, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA
115  // are initialized from aSettings
116 
117  // Netnames for copper layers
118  for( LSEQ cu = LSET::AllCuMask().CuStack(); cu; ++cu )
119  {
120  const COLOR4D lightLabel( 0.8, 0.8, 0.8, 0.7 );
121  const COLOR4D darkLabel = lightLabel.Inverted();
122  PCB_LAYER_ID layer = *cu;
123 
124  if( m_layerColors[layer].GetBrightness() > 0.5 )
125  m_layerColors[GetNetnameLayer( layer )] = darkLabel;
126  else
127  m_layerColors[GetNetnameLayer( layer )] = lightLabel;
128  }
129 
130  update();
131 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:749
COLOR4D Inverted() const
Function Inverted Returns an inverted color, alpha remains the same.
Definition: color4d.h:327
int GetNetnameLayer(int aLayer)
Returns a netname layer corresponding to the given layer.
COLOR4D m_layerColors[LAYER_ID_COUNT]
Add new GAL layers here.
PCB_LAYER_ID
A quick note on layer IDs:
double a
Alpha component.
Definition: color4d.h:377
virtual void update()
Function update Precalculates extra colors for layers (e.g.
void SetBackgroundColor(const COLOR4D &aColor) override
Sets the background color.
Definition: pcb_painter.h:149
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:100

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

Referenced by StartPlotBoard().

◆ LoadDisplayOptions()

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

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

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

Definition at line 134 of file pcb_painter.cpp.

136 {
139  m_padNumbers = aOptions.m_DisplayPadNum;
141  m_sketchText = !aOptions.m_DisplayTextFill;
144 
145  // Whether to draw tracks, vias & pads filled or as outlines
151 
152  // Net names display settings
153  switch( aOptions.m_DisplayNetNamesMode )
154  {
155  case 0:
156  m_netNamesOnPads = false;
157  m_netNamesOnTracks = false;
158  m_netNamesOnVias = false;
159  break;
160 
161  case 1:
162  m_netNamesOnPads = true;
163  m_netNamesOnTracks = false;
164  m_netNamesOnVias = true; // Follow pads or tracks? For now we chose pads....
165  break;
166 
167  case 2:
168  m_netNamesOnPads = false;
169  m_netNamesOnTracks = true;
170  m_netNamesOnVias = false; // Follow pads or tracks? For now we chose pads....
171  break;
172 
173  case 3:
174  m_netNamesOnPads = true;
175  m_netNamesOnTracks = true;
176  m_netNamesOnVias = true;
177  break;
178  }
179 
180  // Zone display settings
182 
183  // Clearance settings
184  switch( aOptions.m_ShowTrackClearanceMode )
185  {
188  break;
189 
192  break;
193 
196  break;
197 
200  break;
201 
204  break;
205  }
206 
207  if( aOptions.m_DisplayPadIsol )
208  m_clearance |= CL_PADS;
209 
211 
212  m_netColorMode = aOptions.m_NetColorMode;
213 
215 
216  m_trackOpacity = aOptions.m_TrackOpacity;
217  m_viaOpacity = aOptions.m_ViaOpacity;
218  m_padOpacity = aOptions.m_PadOpacity;
219  m_zoneOpacity = aOptions.m_ZoneOpacity;
220 
221  m_showPageLimits = aShowPageLimits;
222 }
to draw blind/buried vias
multilayer pads, usually with holes
double m_zoneOpacity
Opacity override for filled zones.
Definition: pcb_painter.h:252
double m_TrackOpacity
Opacity override for all tracks.
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:191
double m_ViaOpacity
Opacity override for all types of via.
bool m_padNumbers
Flag determining if pad numbers should be visible
Definition: pcb_painter.h:200
bool m_netNamesOnPads
Flag determining if net names should be visible for pads
Definition: pcb_painter.h:203
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:194
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode
How trace clearances are displayed.
NET_COLOR_MODE m_netColorMode
How to display nets and netclasses with color overrides
Definition: pcb_painter.h:232
RATSNEST_MODE m_RatsnestMode
Ratsnest draw mode (all layers vs only visible layers)
bool m_hiContrastEnabled
Parameters for display modes.
to draw usual through hole vias
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:246
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
double m_viaOpacity
Opacity override for all types of via.
Definition: pcb_painter.h:250
bool m_curvedRatsnestlines
Flag determining if ratsnest lines should be drawn curved
Definition: pcb_painter.h:215
double m_ZoneOpacity
Opacity override for filled zone areas.
bool m_sketchText
Flag determining if text items should be outlined or stroked
Definition: pcb_painter.h:197
bool m_netNamesOnTracks
Flag determining if net names should be visible for tracks
Definition: pcb_painter.h:206
double m_trackOpacity
Opacity override for all tracks.
Definition: pcb_painter.h:249
double m_PadOpacity
Opacity override for SMD pads and PTHs.
int m_clearance
Clearance visibility settings
Definition: pcb_painter.h:229
ZONE_DISPLAY_MODE m_ZoneDisplayMode
HIGH_CONTRAST_MODE m_contrastModeDisplay
How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )
Definition: pcb_painter.h:244
double m_padOpacity
Opacity override for SMD pads and PTHs.
Definition: pcb_painter.h:251
ZONE_DISPLAY_MODE m_zoneDisplayMode
Option for different display modes for zones
Definition: pcb_painter.h:226
bool m_netNamesOnVias
Flag determining if net names should be visible for vias
Definition: pcb_painter.h:209
NET_COLOR_MODE m_NetColorMode
How to use color overrides on specific nets and netclasses.
bool m_globalRatsnestlines
Flag determining if ratsnest lines are shown by default
Definition: pcb_painter.h:218

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_clearance, PCB_DISPLAY_OPTIONS::m_ContrastModeDisplay, m_contrastModeDisplay, m_curvedRatsnestlines, PCB_DISPLAY_OPTIONS::m_DisplayGraphicsFill, PCB_DISPLAY_OPTIONS::m_DisplayNetNamesMode, PCB_DISPLAY_OPTIONS::m_DisplayPadFill, PCB_DISPLAY_OPTIONS::m_DisplayPadIsol, PCB_DISPLAY_OPTIONS::m_DisplayPadNum, PCB_DISPLAY_OPTIONS::m_DisplayPcbTrackFill, PCB_DISPLAY_OPTIONS::m_DisplayRatsnestLinesCurved, PCB_DISPLAY_OPTIONS::m_DisplayTextFill, PCB_DISPLAY_OPTIONS::m_DisplayViaFill, m_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_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.

◆ SetActiveLayer()

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

Definition at line 111 of file render_settings.h.

111 { 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

Sets the background color.

Implements KIGFX::RENDER_SETTINGS.

Definition at line 149 of file pcb_painter.h.

150  {
152  }
COLOR4D m_layerColors[LAYER_ID_COUNT]

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

161 { m_contrastModeDisplay = aMode; }
HIGH_CONTRAST_MODE m_contrastModeDisplay
How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )
Definition: pcb_painter.h:244

References m_contrastModeDisplay.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetDefaultPenWidth()

◆ SetDrawIndividualViaLayers()

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

Definition at line 172 of file pcb_painter.h.

References m_drawIndividualViaLayers.

Referenced by PCBNEW_PRINTOUT::setupPainter().

◆ SetHighContrast()

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

Function SetHighContrast Turns on/off high contrast display mode.

Definition at line 168 of file render_settings.h.

168 { 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 254 of file render_settings.h.

254 { m_hiContrastFactor = aFactor; }

References KIGFX::RENDER_SETTINGS::m_hiContrastFactor.

Referenced by PCB_BASE_FRAME::LoadSettings().

◆ SetHighlight()

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

Function SetHighlight 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 higlighting only for the net with number given as the parameter.

Definition at line 149 of file render_settings.h.

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

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

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

◆ SetHighlightFactor()

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

Definition at line 252 of file render_settings.h.

252 { m_highlightFactor = aFactor; }

References KIGFX::RENDER_SETTINGS::m_highlightFactor.

Referenced by PCB_BASE_FRAME::LoadSettings().

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

231  {
232  m_layerColors[aLayer] = aColor;
233 
234  update(); // recompute other shades of the color
235  }
COLOR4D m_layerColors[LAYER_ID_COUNT]
virtual void update()
Function update Precalculates extra colors for layers (e.g.

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

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

◆ SetLayerIsHighContrast()

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

Function SetLayerIsHighContrast Sets 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 67 of file render_settings.h.

68  {
69  if( aEnabled )
70  m_highContrastLayers.insert( aLayerId );
71  else
72  m_highContrastLayers.erase( aLayerId );
73  }
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

Definition at line 186 of file render_settings.h.

186 { m_minPenWidth = aWidth; }

References KIGFX::RENDER_SETTINGS::m_minPenWidth.

◆ SetNetColorMode()

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

Definition at line 175 of file pcb_painter.h.

175 { m_netColorMode = aMode; }
NET_COLOR_MODE m_netColorMode
How to display nets and netclasses with color overrides
Definition: pcb_painter.h:232

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

248  {
249  m_outlineWidth = aWidth;
250  }

References KIGFX::RENDER_SETTINGS::m_outlineWidth.

◆ SetPrintDC()

◆ SetRatsnestDisplayMode()

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

Definition at line 178 of file pcb_painter.h.

178 { m_ratsnestDisplayMode = aMode; }
RATSNEST_MODE m_ratsnestDisplayMode
Definition: pcb_painter.h:246

References m_ratsnestDisplayMode.

◆ SetSelectFactor()

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

Definition at line 253 of file render_settings.h.

253 { 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

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

108  {
109  m_sketchMode[aItemLayer] = aEnabled;
110  }
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:191

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

128  {
129  m_sketchGraphics = aEnabled;
130  }
bool m_sketchGraphics
Flag determining if graphic items should be outlined or stroked
Definition: pcb_painter.h:194

References m_sketchGraphics.

Referenced by DIALOG_PAD_PROPERTIES::onChangePadMode().

◆ SetZoneDisplayMode()

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

Definition at line 187 of file pcb_painter.h.

187 { m_zoneDisplayMode = mode; }
ZONE_DISPLAY_MODE m_zoneDisplayMode
Option for different display modes for zones
Definition: pcb_painter.h:226

References m_zoneDisplayMode.

◆ 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 53 of file render_settings.cpp.

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

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

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

Friends And Related Function Documentation

◆ PCB_PAINTER

friend class PCB_PAINTER
friend

Definition at line 67 of file pcb_painter.h.

Member Data Documentation

◆ m_activeLayer

PCB_LAYER_ID KIGFX::RENDER_SETTINGS::m_activeLayer
protectedinherited

◆ m_backgroundColor

◆ m_clearance

int KIGFX::PCB_RENDER_SETTINGS::m_clearance
protected

Clearance visibility settings

Definition at line 229 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

How to display inactive layers (HIGH_CONTRAST_MODE:NORMAL, DIMMED or HIDDEN )

Definition at line 244 of file pcb_painter.h.

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

◆ m_curvedRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_curvedRatsnestlines = true
protected

Flag determining if ratsnest lines should be drawn curved

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

Referenced by GetDrawIndividualViaLayers(), and SetDrawIndividualViaLayers().

◆ m_globalRatsnestlines

bool KIGFX::PCB_RENDER_SETTINGS::m_globalRatsnestlines = true
protected

Flag determining if ratsnest lines are shown by default

Definition at line 218 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

Set of net codes that should not have their ratsnest displayed

Definition at line 241 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_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 netclass colors

Definition at line 235 of file pcb_painter.h.

Referenced by GetColor(), and GetNetclassColorMap().

◆ m_netColorMode

NET_COLOR_MODE KIGFX::PCB_RENDER_SETTINGS::m_netColorMode
protected

How to display nets and netclasses with color overrides

Definition at line 232 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

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

Definition at line 238 of file pcb_painter.h.

Referenced by GetColor(), and GetNetColorMap().

◆ m_netNamesOnPads

bool KIGFX::PCB_RENDER_SETTINGS::m_netNamesOnPads
protected

Flag determining if net names should be visible for pads

Definition at line 203 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 206 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 209 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 200 of file pcb_painter.h.

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

◆ m_padOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_padOpacity
protected

Opacity override for SMD pads and PTHs.

Definition at line 251 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

Flag determining if graphic items should be outlined or stroked

Definition at line 194 of file pcb_painter.h.

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

◆ m_sketchMode

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

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

Definition at line 191 of file pcb_painter.h.

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

◆ m_sketchText

bool KIGFX::PCB_RENDER_SETTINGS::m_sketchText
protected

Flag determining if text items should be outlined or stroked

Definition at line 197 of file pcb_painter.h.

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

◆ m_trackOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_trackOpacity
protected

Opacity override for all tracks.

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

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

◆ m_worksheetLineWidth

float KIGFX::RENDER_SETTINGS::m_worksheetLineWidth
protectedinherited

◆ m_zoneDisplayMode

ZONE_DISPLAY_MODE KIGFX::PCB_RENDER_SETTINGS::m_zoneDisplayMode
protected

Option for different display modes for zones

Definition at line 226 of file pcb_painter.h.

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

◆ m_zoneOpacity

double KIGFX::PCB_RENDER_SETTINGS::m_zoneOpacity
protected

Opacity override for filled zones.

Definition at line 252 of file pcb_painter.h.

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

◆ m_zoneOutlines

bool KIGFX::PCB_RENDER_SETTINGS::m_zoneOutlines
protected

Flag determining if zones should have outlines drawn

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

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


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