Represents a visual connection line between two connection points that can be drawn on a Skia canvas. This class implements the IConnectionLine interface and provides functionality for drawing lines, arrows, labels, animations, and user interaction handling.

Members

MemberKindDescription
ConnectionLine(Action invalidateVisualAction)MethodInitializes a new instance of the ConnectionLine class with an invalidate visual action. The action to call when the visual needs to be invalidated.
IConnectionPoint StartPropertyGets or sets the starting connection point of this line.
IConnectionPoint EndPropertyGets or sets the ending connection point of this line.
SKPoint EndPointPropertyGets or sets the end point coordinates when not connected to an end connection point.
bool IsConnectedPropertyGets or sets a value indicating whether this connection line is connected.
bool IsSelectedPropertyGets or sets a value indicating whether this connection line is selected.
bool IsVisiblePropertyGets or sets whether this line is visible. Hidden lines are skipped by the renderer.
bool IsAnimatedPropertyGets or sets a value indicating whether this connection line should be animated.
bool IsDataFlowAnimatedPropertyGets or sets a value indicating whether data flow animation is enabled.
float DataFlowSpeedPropertyGets or sets the speed of the data flow animation (pixels per second).
float DataFlowParticleSizePropertyGets or sets the size of the data flow particles.
SKColor DataFlowColorPropertyGets or sets the color of the data flow particles.
bool ShowStartArrowPropertyGets or sets a value indicating whether to show an arrow at the start of the line.
bool ShowEndArrowPropertyGets or sets a value indicating whether to show an arrow at the end of the line.
SKPaint PaintPropertyGets or sets the paint object used for drawing the connection line.
string Label1PropertyGets or sets the first label text to display on the connection line.
string Label2PropertyGets or sets the second label text to display on the connection line.
string Label3PropertyGets or sets the third label text to display on the connection line.
string DataTypeLabelPropertyGets or sets the data type label to display on the connection line. If not set, will automatically use the data type from the start connection point.
string GuardConditionPropertyOptional guard condition evaluated before a state-machine transition fires.
string TransitionActionPropertyOptional action executed when a state-machine transition fires.
string TriggerEventPropertyOptional trigger event name that causes the transition to fire.
event EventHandler<ConnectionArgs> StartArrowClickedEventOccurs when the start arrow of the connection line is clicked.
event EventHandler<ConnectionArgs> EndArrowClickedEventOccurs when the end arrow of the connection line is clicked.
event EventHandler<LineArgs> LineClickedEventOccurs when the connection line itself is clicked.
SKColor LineColorPropertyGets or sets the color of the connection line.
ConnectionLine(IConnectionPoint start, IConnectionPoint end, Action invalidateVisualAction)MethodInitializes a new instance of the ConnectionLine class with start and end connection points. The starting connection point. The ending connection point. The action to call when the visual needs to be invalidated. Thrown when start, end, or invalidateVisualAction is null.
ConnectionLine(IConnectionPoint start, SKPoint end, Action invalidateVisualAction)MethodInitializes a new instance of the ConnectionLine class with a start connection point and end coordinates. The starting connection point. The ending point coordinates. The action to call when the visual needs to be invalidated. Thrown when start or invalidateVisualAction is null.
void Draw(SKCanvas canvas)MethodDraws the connection line on the specified Skia canvas. The canvas to draw on.
bool LineContainsPoint(SKPoint point)MethodDetermines whether the specified point lies on the connection line within the click threshold. The point to test. true if the point is on the line; otherwise, false.
bool ArrowContainsPoint(SKPoint point, bool startArrow)MethodDetermines whether the specified point lies within an arrow of the connection line. The point to test. true to test the start arrow; false to test the end arrow. true if the point is within the arrow; otherwise, false.
void OnClick(SKPoint clickPoint)MethodHandles click events on the connection line, determining whether an arrow or the line itself was clicked. The point where the click occurred.
void StartAnimation()MethodStarts the animation of the connection line if it is set to be animated.
void StopAnimation()MethodStops the animation of the connection line.
void Dispose()MethodReleases all resources used by the connection line.

Related