65    std::unique_lock<KISPINLOCK> lock( 
m_data->GetLock(), std::try_to_lock );
 
   70    constexpr int CROSS_SIZE = 200000;
 
   83    std::set<int>        highlightedNets = rs->GetHighlightNetCodes();
 
   84    const std::set<int>& hiddenNets      = rs->GetHiddenNets();
 
   89    const bool dimStatic = 
m_data->GetLocalRatsnest().size() > 0 || highlightedNets.size() > 0;
 
   91    std::map<int, KIGFX::COLOR4D>& netColors = rs->GetNetColorMap();
 
  100            visibleLayers.
set( rs->GetPrimaryHighContrastLayer() );
 
  108                        visibleLayers.
set( layer );
 
  113            [&]( 
COLOR4D& color_base, 
double brightnessDelta, 
double alpha )
 
  118                    return color_base.
Darkened( brightnessDelta ).
WithAlpha( std::min( alpha, 1.0 ) );
 
  126        if( hiddenNets.count( l.netCode ) )
 
  132        if( 
m_data->HasNetNameForNetCode( l.netCode ) )
 
  134            const wxString& netName = 
m_data->GetNetNameForNetCode( l.netCode );
 
  140        if( colorByNet && netColors.count( l.netCode ) )
 
  141            color = netColors.at( l.netCode );
 
  145            color = defaultColor;
 
  148            color = defaultColor;
 
  155                           VECTOR2I( l.b.x + CROSS_SIZE, l.b.y + CROSS_SIZE ) );
 
  157                           VECTOR2I( l.b.x + CROSS_SIZE, l.b.y - CROSS_SIZE ) );
 
  163                int dx = l.b.x - l.a.x;
 
  164                int dy = l.b.y - l.a.y;
 
  166                                                  l.a.y + 0.5 * dy + 0.1 * dx );
 
  176    for( 
int i = 1 ; i < 
m_data->GetNetCount(); ++i )
 
  178        if( hiddenNets.count( i ) )
 
  183        if( !net || 
m_data->GetConnectivityAlgo()->IsNetDirty( i ) )
 
  189        if( 
m_data->HasNetNameForNetCode( i ) )
 
  191            const wxString& netName = 
m_data->GetNetNameForNetCode( i );
 
  197        if( colorByNet && netColors.count( i ) )
 
  198            color = netColors.at( i );
 
  202            color = defaultColor;
 
  205            color = defaultColor;
 
  211        if( highlightedNets.count( i ) )
 
  218            if( !edge.IsVisible() )
 
  221            const std::shared_ptr<const CN_ANCHOR>& sourceNode = edge.GetSourceNode();
 
  222            const std::shared_ptr<const CN_ANCHOR>& targetNode = edge.GetTargetNode();
 
  224            if( !sourceNode || sourceNode->Dirty() || !targetNode || targetNode->Dirty() )
 
  227            const VECTOR2I source( sourceNode->Pos() );
 
  228            const VECTOR2I target( targetNode->Pos() );
 
  230            bool enable =  !sourceNode->GetNoLine() && !targetNode->GetNoLine();
 
  239                show = sourceNode->Parent()->GetLocalRatsnestVisible() &&
 
  240                       targetNode->Parent()->GetLocalRatsnestVisible();
 
  244                show = sourceNode->Parent()->GetLocalRatsnestVisible() ||
 
  245                       targetNode->Parent()->GetLocalRatsnestVisible();
 
  248            if( onlyVisibleLayers && show )
 
  250                LSET sourceLayers = sourceNode->Parent()->GetLayerSet();
 
  251                LSET targetLayers = targetNode->Parent()->GetLayerSet();
 
  253                if( !( sourceLayers & visibleLayers ).
any() ||
 
  254                    !( targetLayers & visibleLayers ).
any() )
 
  260            if ( enable && show )
 
  262                if ( source == target )
 
  265                                   VECTOR2I( source.
x + CROSS_SIZE, source.
y + CROSS_SIZE ) );
 
  267                                   VECTOR2I( source.
x + CROSS_SIZE, source.
y - CROSS_SIZE ) );
 
  273                        int dx = target.
x - source.
x;
 
  274                        int dy = target.
y - source.
y;
 
  276                                                          source.
y + 0.5 * dy + 0.1 * dx );
 
 
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
 
@ HIDDEN
Inactive layers are hidden.
 
@ OFF
Net (and netclass) colors are not shown.
 
@ VISIBLE
Ratsnest lines are drawn to items on visible layers only.
 
BASE_SET & set(size_t pos)
 
constexpr void SetMaximum()
 
CN_EDGE represents a point-to-point connection, whether realized or unrealized (ie: tracks etc.
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
 
APP_SETTINGS_BASE * KifaceSettings() const
 
A color representation with 4 components: red, green, blue, alpha.
 
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
 
COLOR4D Darkened(double aFactor) const
Return a color that is darker by a given factor, without modifying object.
 
COLOR4D Brightened(double aFactor) const
Return a color that is brighter by a given factor, without modifying object.
 
Abstract interface for drawing on a 2D-surface.
 
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
 
virtual void SetLineWidth(float aLineWidth)
Set the line width.
 
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
 
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
 
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
 
virtual void DrawCurve(const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0)
Draw a cubic bezier spline.
 
double GetWorldScale() const
Get the world scale.
 
PCB specific render settings.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
 
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
 
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
 
LSET is a set of PCB_LAYER_IDs.
 
void RunOnLayers(const std::function< void(PCB_LAYER_ID)> &aFunction) const
Execute a function on each layer of the LSET.
 
static LSET AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
 
A collection of nets and the parameters used to route or test these nets.
 
COLOR4D GetPcbColor(bool aIsForSave=false) const
 
NET_SETTINGS stores various net-related settings in a project context.
 
bool HasEffectiveNetClass(const wxString &aNetName) const
Determines if an effective netclass for the given net name has been cached.
 
std::shared_ptr< NETCLASS > GetCachedEffectiveNetClass(const wxString &aNetName) const
Returns an already cached effective netclass for the given net name.
 
DISPLAY_OPTIONS m_Display
 
const BOX2I ViewBBox() const override
 
RATSNEST_VIEW_ITEM(std::shared_ptr< CONNECTIVITY_DATA > aData)
Class that draws missing connections on a PCB.
 
std::shared_ptr< CONNECTIVITY_DATA > m_data
Object containing ratsnest data.
 
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
 
std::vector< int > ViewGetLayers() const override
 
Describe ratsnest for a single net.
 
const std::vector< CN_EDGE > & GetEdges() const
 
A type-safe container of any type.
 
@ LAYER_PCB_BACKGROUND
PCB background color.
 
PCB_LAYER_ID
A quick note on layer IDs:
 
Class that computes missing connections on a PCB.
 
RATSNEST_MODE m_RatsnestMode
 
bool m_DisplayRatsnestLinesCurved
 
bool m_ShowGlobalRatsnest
 
double m_RatsnestThickness
 
@ NOT_USED
the 3d code uses this value
 
VECTOR2< int32_t > VECTOR2I