Table of Contents

Class ArrowGeometryHelper

Namespace
FlowGraph.Avalonia.Rendering
Assembly
FlowGraph.Avalonia.dll

Helper class for calculating arrow geometry points. Provides shared calculations for both retained-mode (PathGeometry) and immediate-mode (DrawingContext) rendering.

public static class ArrowGeometryHelper
Inheritance
ArrowGeometryHelper
Inherited Members

Methods

CalculateArrowPoints(Point, double, double)

Calculates the two back points of an arrow given the tip, angle, and size.

public static (Point p1, Point p2) CalculateArrowPoints(Point tip, double angle, double size = 0)

Parameters

tip Point

The tip (point) of the arrow.

angle double

The angle the arrow is pointing in radians (0 = pointing right).

size double

The size of the arrow (default uses GraphDefaults.EdgeArrowSize).

Returns

(Point p1, Point p2)

Two points that form the back of the arrow.

Remarks

The arrow spreads at 30 degrees (π/6) on each side from the direction. This is used by both EdgePathHelper.CreateArrowMarker and DirectCanvasRenderer.DrawArrow.