Table of Contents

Class LinkDrawer

Namespace
H.Controls.Diagram.LinkDrawers
Assembly
H.Controls.Diagram.dll
public abstract class LinkDrawer : BindableBase, INotifyPropertyChanged, ILinkDrawer
Inheritance
LinkDrawer
Implements
Derived
Inherited Members
Extension Methods

Properties

ArrowAngle

[Display(Name = "箭头角度", GroupName = "基础信息", Order = 0)]
public double ArrowAngle { get; set; }

Property Value

double

ArrowLength

[Display(Name = "箭头长度", GroupName = "基础信息", Order = 0)]
public double ArrowLength { get; set; }

Property Value

double

Diagram

[JsonIgnore]
public Diagram Diagram { get; set; }

Property Value

Diagram

DisplayName

[Display(Name = "显示名称", GroupName = "基础信息", Order = 0)]
public string DisplayName { get; set; }

Property Value

string

IsLinkCrossBound

[Display(Name = "连线环绕边框", GroupName = "基础信息", Order = 0)]
public bool IsLinkCrossBound { get; set; }

Property Value

bool

IsUseArrow

[Display(Name = "显示箭头", GroupName = "基础信息", Order = 0)]
public bool IsUseArrow { get; set; }

Property Value

bool

Methods

public abstract Geometry DrawPath(Link link, out Point center)

Parameters

link Link
center Point

Returns

Geometry

GetArrowGeometry(Geometry, Point, Point)

protected Geometry GetArrowGeometry(Geometry geo, Point start, Point end)

Parameters

geo Geometry
start Point
end Point

Returns

Geometry

GetArrowPoints(Point, Point, double, double, bool)

public Tuple<Point, Point> GetArrowPoints(Point from, Point to, double len = 10, double angle = 20, bool isTail = false)

Parameters

from Point
to Point
len double
angle double
isTail bool

Returns

Tuple<Point, Point>

GetPolyLineGeometry(bool, bool, params Point[])

protected Geometry GetPolyLineGeometry(bool filled, bool closed, params Point[] points)

Parameters

filled bool
closed bool
points Point[]

Returns

Geometry

GetPolyLineGeometry(params Point[])

protected Geometry GetPolyLineGeometry(params Point[] points)

Parameters

points Point[]

Returns

Geometry

Intersects(Rect, Point, Point)

矩形和线段求交点

protected Vector? Intersects(Rect rect, Point start, Point end)

Parameters

rect Rect
start Point
end Point

Returns

Vector?

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.