WireShape

References
public abstract class WireShape
A shape representing a wire connecting two parameters.

Constructors

WireShape

#
protected WireShape(PointF source, PointF target)
Create a wire between two parameters.
source (PointF)Source parameter.
target (PointF)Target parameter.

Properties

Bounds

#
public abstract RectangleF Bounds { get; }
Gets the bounds of the spline shape.

ShapeType

#
public static Type ShapeType { get; set; }
Gets or sets the type which defines wire shapes. If unset, the fallback logic will revert to WireShapeDefault. If you assign a type, it must derive from WireShape and provide a public constructor which takes two PointF structs.

Source

#
public PointF Source { get; }
Gets the instance ID of the source parameter.

Target

#
public PointF Target { get; }
Gets the instance ID of the target parameter.

Methods

Create

#
public static WireShape Create(IParameterAttributes source, IParameterAttributes target)
Create a new wire shape between two parameter attributes. This relies on the type assigned to the static ShapeType property.
source (IParameterAttributes)
target (IParameterAttributes)

Create

#
public static WireShape Create(PointF source, PointF target)
Create a new wire shape between two parameter attributes. This relies on the type assigned to the static ShapeType property.
source (PointF)
target (PointF)

DistanceTo

#
public abstract float DistanceTo(PointF point)
Measure the minimum distance between this wire and some point.
point (PointF)

Draw

#
public abstract void Draw(Graphics graphics, Pen edge)
Draw this shape using the given pen.
graphics (Graphics)
edge (Pen)

Intersects

#
public abstract bool Intersects(RectangleF box)
Test whether this wire-shape intersect the given box.
box (RectangleF)

IsCoincident

#
public bool IsCoincident(PointF point, float tolerance)
Test whether this wire is coincident with some point within some tolerance.
point (PointF)
tolerance (float)

Project

#
public abstract PointF Project(PointF point)
Find the point on the wire closest to a search point.
point (PointF)