Abstract class
DefaultArrow
provides support for the graphical decorations that can be placed at an edge's
ends.
Normally, this decoration is some kind of arrowhead that is used to indicate
the edge's direction.
DefaultArrow makes available a number of predefined arrowhead renderings which
can be directly used with the
SourceArrow
and
TargetArrow
properties defined in abstract class AbstractEdgeStyle.
Example 2.27, “Setting arrows with an edge style” shows how to use the static
Create
methods from DefaultArrow to create arrows and set them as the decoration for
the source and target ends of edges.
Example 2.27. Setting arrows with an edge style
PolylineEdgeStyle pes = new PolylineEdgeStyle(Pens.Red);
pes.SourceArrow = DefaultArrow.Create(ArrowType.Circle,
Pens.Red, Brushes.Black, 0);
pes.TargetArrow = DefaultArrow.Create(ArrowType.Default);
The predefined arrows can be accessed by means of the enumerators defined in
the ArrowType
enumeration.
The corresponding renderings are shown in
Table 2.14, “Predefined arrowhead renderings”.
Note that omitting the decoration is done using ArrowType.None, which provides an empty "rendering."
Table 2.14. Predefined arrowhead renderings
| Arrow Type | Rendering |
|---|---|
| Circle |
![]() |
| Cross |
![]() |
| Default |
![]() |
| Diamond |
![]() |
| Short |
![]() |
| Simple |
![]() |
The Custom Styles tutorial shows how to create a custom arrowhead rendering using an IArrow implementation; see especially the steps 20 and 21.
|
Copyright ©2009-2011, yWorks GmbH. All rights reserved. |