57        m_shape = aItem->Shape( -1 )->Clone();
 
   59        switch( m_shape->Type() )
 
   61        case SH_SEGMENT:    static_cast<SHAPE_SEGMENT*>( m_shape )->SetWidth( 0 );    break;
 
   62        case SH_ARC:        static_cast<SHAPE_ARC*>( m_shape )->SetWidth( 0 );        break;
 
   63        case SH_LINE_CHAIN: static_cast<SHAPE_LINE_CHAIN*>( m_shape )->SetWidth( 0 ); break;
 
   70        m_shape = aItem->Shape( -1 )->Clone();
 
   72        if( aItem->HasHole() )
 
   73            m_hole = aItem->Hole()->Shape( -1 )->Clone();
 
   79    m_showClearance = 
false;
 
   84    m_depth = m_originDepth = aView->GetLayerOrder( m_originLayer );
 
 
  126        if( !l->SegmentCount() )
 
  143    switch( aItem->
Kind() )
 
  173        int largestDiameter = 0;
 
  175        for( 
int layer : 
via->UniqueShapeLayers() )
 
  177            if( 
via->Diameter( layer ) > largestDiameter )
 
  179                largestDiameter = 
via->Diameter( layer );
 
  184        if( aItem->
Shape( shapeLayer ) )
 
 
  271    for( 
size_t s = 0; lineChain && s < lineChain->
ArcCount(); s++ )
 
 
  287    bool holeDrawn = 
false;
 
  292        showClearance = 
true;
 
  294    switch( aShape->
Type() )
 
  417        std::deque<VECTOR2D> polygon = std::deque<VECTOR2D>();
 
  421            polygon.push_back( c->
CDPoint( i ) );
 
  432            polygon.push_back( c->
CDPoint( 0 ) );
 
  469        wxFAIL_MSG( wxT( 
"Router preview item: nested compound shapes not supported" ) );
 
  473        wxFAIL_MSG( wxT( 
"Router preview item: SHAPE_POLY_SET not supported" ) );
 
  480    if( 
m_hole && !holeDrawn )
 
 
  524        if( 
m_shape->HasIndexableSubshapes() )
 
  526            std::vector<const SHAPE*> subshapes;
 
  527            m_shape->GetIndexableSubshapes( subshapes );
 
  529            for( 
const SHAPE* shape : subshapes )
 
 
  547        return color.Saturate( 1.0 );
 
  549        return color.Brightened( 0.7 );
 
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
 
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
 
A color representation with 4 components: red, green, blue, alpha.
 
Abstract interface for drawing on a 2D-surface.
 
virtual void DrawPolygon(const std::deque< VECTOR2D > &aPointList)
Draw a polygon.
 
virtual void SetLayerDepth(double aLayerDepth)
Set the depth of the layer (position on the z-axis)
 
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
 
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.
 
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
 
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
 
virtual void SetLineWidth(float aLineWidth)
Set the line width.
 
virtual void DrawPolyline(const std::deque< VECTOR2D > &aPointList)
Draw a polyline.
 
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 DrawArc(const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle)
Draw an arc.
 
virtual void DrawSegment(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth)
Draw a rounded segment.
 
float GetLineWidth() const
Get the line width.
 
PCB specific render settings.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
int GetLayerOrder(int aLayer) const
Return rendering order of a particular layer.
 
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
 
const SHAPE * Shape(int aLayer) const override
Return the geometrical shape of the item.
 
Base class for PNS router board items.
 
virtual const SHAPE * Shape(int aLayer) const
Return the geometrical shape of the item.
 
const PNS_LAYER_RANGE & Layers() const
 
PnsKind Kind() const
Return the type (kind) of the item.
 
virtual HOLE * Hole() const
 
virtual bool HasHole() const
 
virtual BOARD_ITEM * BoardItem() const
 
virtual int Marker() const
 
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
 
ROUTER_PREVIEW_ITEM(const SHAPE &aShape, PNS::ROUTER_IFACE *aIface, KIGFX::VIEW *aView)
 
static constexpr double LayerDepthFactor
We draw this item on a single layer, but we stack up all the layers from the various components that ...
 
void Update(const PNS::ITEM *aItem)
 
const KIGFX::COLOR4D getLayerColor(int aLayer) const
 
virtual void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
 
void drawLineChain(const SHAPE_LINE_CHAIN_BASE *aL, KIGFX::GAL *aGal) const
 
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
 
void drawShape(const SHAPE *aShape, KIGFX::GAL *aGal) const
 
PNS::ROUTER_IFACE * m_iface
 
EDA_ANGLE GetCentralAngle() const
Get the "central angle" of the arc - this is the angle at the point of the "pie slice".
 
int GetWidth() const override
 
EDA_ANGLE GetStartAngle() const
 
const VECTOR2I & GetCenter() const
 
SHAPE_TYPE Type() const
Return the type of the shape.
 
const VECTOR2I GetCenter() const
 
virtual size_t GetSegmentCount() const =0
 
virtual bool IsClosed() const =0
 
virtual const SEG GetSegment(int aIndex) const =0
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
const std::vector< SHAPE_ARC > & CArcs() const
 
const VECTOR2I & GetPosition() const
 
const VECTOR2I GetSize() const
 
const SEG & GetSeg() const
 
int GetWidth() const override
 
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
 
int PointCount() const
Return the number of points (vertices) in this polygon.
 
const VECTOR2D CDPoint(int aIndex) const
Return a given point as a vector with elements of type double.
 
An abstract shape on 2D plane.
 
virtual SHAPE * Clone() const
Return a dynamically allocated copy of the shape.
 
@ LAYER_SELECT_OVERLAY
Selected items overlay.
 
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
 
The Cairo implementation of the graphics abstraction layer.
 
@ SH_POLY_SET
set of polygons (with holes, etc.)
 
@ SH_RECT
axis-aligned rectangle
 
@ SH_SIMPLE
simple polygon
 
@ SH_NULL
empty shape (no shape...),
 
@ SH_POLY_SET_TRIANGLE
a single triangle belonging to a POLY_SET triangulation
 
@ SH_LINE_CHAIN
line chain (polyline)
 
@ SH_COMPOUND
compound shape, consisting of multiple simple shapes
 
SHAPE_CIRCLE circle(c.m_circle_center, c.m_circle_radius)
 
@ NOT_USED
the 3d code uses this value
 
Casted dyn_cast(From aObject)
A lightweight dynamic downcast.
 
VECTOR2< int32_t > VECTOR2I