62 const int nodeRad = aSize / 8;
73 const int nodeRadius = aSize / 8;
74 const VECTOR2I lineStart = aPosition -
VECTOR2I( aSize / 2 - nodeRadius, 0 );
82 const int nodeRadius = aSize / 8;
90 const int ringRadius = aSize / 4;
100 const int nodeRadius = aSize / 8;
102 const VECTOR2I quadPoint = aPosition -
VECTOR2I( 0, aSize / 2 - nodeRadius );
103 const int arcRadius = aSize - nodeRadius * 2;
109 aGal.
DrawArc( arcCenter, arcRadius,
EDA_ANGLE( -160, EDA_ANGLE_T::DEGREES_T ),
110 EDA_ANGLE( 140, EDA_ANGLE_T::DEGREES_T ) );
115 const int nodeRadius = aSize / 8;
122 aGal.
DrawLine( aPosition - xLeg, aPosition + xLeg );
124 aGal.
DrawLine( aPosition - xLeg, aPosition + xLeg );
129 const int nodeRadius = aSize / 8;
149 const int size = aView->
ToWorld( 16 );
172 else if(
m_snapTypes & POINT_TYPE::PT_INTERSECTION )
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
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 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.
COLOR4D m_color
Marker symbol.
VECTOR2D m_position
< Marker coordinates.
void ViewDraw(int aLayer, VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
View item to draw an origin marker with an optional snap type indicator.
void ViewDraw(int aLayer, VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
SNAP_INDICATOR(const COLOR4D &aColor=COLOR4D::WHITE, int aSize=16, const VECTOR2D &aPosition=VECTOR2D(0, 0))
SNAP_INDICATOR * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
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.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
The Cairo implementation of the graphics abstraction layer.
static void DrawCentrePointIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawIntersectionIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawLineEndpointIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawQuadrantPointIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawOnElementIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawSnapNode(GAL &aGal, const VECTOR2I &aPosition, int aNodeRadius)
static void DrawCornerIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
static void DrawMidpointIcon(GAL &aGal, const VECTOR2I &aPosition, int aSize)
VECTOR2< int32_t > VECTOR2I