| Package | com.yworks.graph.drawing |
| Class | public class PolylineEdgeStyleRenderer |
| Inheritance | PolylineEdgeStyleRenderer PathBasedEdgeStyleRenderer AbstractEdgeStyleRenderer AbstractStyleRenderer |
PolylineEdgeStyle.
| Property | Defined by | ||
|---|---|---|---|
![]() | item : IModelItem
Gets the currently configured item.
| AbstractStyleRenderer | |
| selfLoopDistance : Number
Gets or sets the distance between the node's layout and its self loop control points.
| PolylineEdgeStyleRenderer | ||
![]() | style : IVisualStyle
Gets the currently configured style.
| AbstractStyleRenderer | |
![]() | styleDescriptor : ICanvasObjectDescriptor
Gets the ICanvasObjectDescriptor to use for new installations.
| AbstractStyleRenderer | |
| Property | Defined by | ||
|---|---|---|---|
![]() | path : GeneralPath
The path instance that this instance is working with.
| PathBasedEdgeStyleRenderer | |
| stroke : IStroke [read-only]
Gets the pen to use for painting the path.
| PolylineEdgeStyleRenderer | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
Returns a tight rectangular area where the whole rendering
would fit into.
| PathBasedEdgeStyleRenderer | |
|
createRectangleSelfLoop(sx:Number, sy:Number, oppositeX:Number, oppositeY:Number, tx:Number, ty:Number):GeneralPath
[static]
Static utility method that creates a rectangular self loop path.
| PolylineEdgeStyleRenderer | ||
![]() |
Configures the
style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | |
![]() |
Configures the
style and item parameters,
does not call configure and returns this. | AbstractStyleRenderer | |
![]() |
This method is overridden for performance reasons.
| PathBasedEdgeStyleRenderer | |
![]() |
Configures the
style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | |
![]() |
Gets an implementation of the
IPaintable interface that can
handle the provided item and its associated style. | AbstractEdgeStyleRenderer | |
![]() |
Returns a representation of the visible path of the edge in form of a
GeneralPath
| PathBasedEdgeStyleRenderer | |
![]() |
Gets an implementation of the
IPathGeometry interface that can
handle the provided edge and its associated style. | AbstractEdgeStyleRenderer | |
|
getSegmentCount():int
Returns the number of "segments" this edge's path consists of.
| PolylineEdgeStyleRenderer | ||
|
Calculates the tangent on the edge's path at the given segment and ratio point.
| PolylineEdgeStyleRenderer | ||
|
Calculates the tangent on the edge's path at the given ratio point.
| PolylineEdgeStyleRenderer | ||
![]() |
Installs the model in the canvas at the given group using the
styleDescriptor. | AbstractStyleRenderer | |
![]() |
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
This method is overriden for performance reasons.
| PathBasedEdgeStyleRenderer | |
![]() |
Returns
true if the corresponding
item is considered to intersect the given rectangular box.This method may return false if the item cannot be
selected using a selection marquee or optionally if the
item is only partially contained within the box. | PathBasedEdgeStyleRenderer | |
|
Calls
configure and tests the item using the style
for a visible intersection with the clip bounds. | PolylineEdgeStyleRenderer | ||
|
lookup(type:Class):Object
Implements the
ILookup interface. | PolylineEdgeStyleRenderer | ||
![]() |
Paints the
path
| PathBasedEdgeStyleRenderer | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
configure():void
Prepares this instance for subsequent calls after the
style and item have been initialized.
| PathBasedEdgeStyleRenderer | |
|
create simple path using straight lines from the sourceport to the
targetport via the bends.
| PolylineEdgeStyleRenderer | ||
|
Special implementation that will create a self loop path.
| PolylineEdgeStyleRenderer | ||
![]() |
Factory method for the StyleDescriptor property.
| AbstractEdgeStyleRenderer | |
![]() |
cropPath(pathToCrop:GeneralPath):void
Crops the edge's path at the nodes.
| PathBasedEdgeStyleRenderer | |
|
getSmoothing():Number
Gets the smoothing factor
| PolylineEdgeStyleRenderer | ||
![]() |
Calculate and update the anchor and the source arrow's direction vector.
| PathBasedEdgeStyleRenderer | |
|
getStroke():IStroke
Gets the pen to use for painting the path.
| PolylineEdgeStyleRenderer | ||
![]() |
Calculate and update the anchor and the target arrow's direction vector.
| PathBasedEdgeStyleRenderer | |
![]() |
paintArrows(g:YGraphics, ctx:IPaintContext):void
Paints the provided arrows using the graphics context.
| AbstractEdgeStyleRenderer | |
![]() |
setItem(item:IModelItem):void
Called by the various descriptor getters to initialize the item.
| AbstractStyleRenderer | |
![]() |
setStyle(style:IVisualStyle):void
Called by the various descriptor getters to initialize the style.
| AbstractStyleRenderer | |
| selfLoopDistance | property |
selfLoopDistance:Number [read-write]Gets or sets the distance between the node's layout and its self loop control points.
Implementation public function get selfLoopDistance():Number
public function set selfLoopDistance(value:Number):void
| stroke | property |
stroke:IStroke [read-only]Gets the pen to use for painting the path.
Implementation protected function get stroke():IStroke
| createPath | () | method |
protected override function createPath():GeneralPathcreate simple path using straight lines from the sourceport to the targetport via the bends.
ReturnsGeneralPath —
the created path
|
| createRectangleSelfLoop | () | method |
public static function createRectangleSelfLoop(sx:Number, sy:Number, oppositeX:Number, oppositeY:Number, tx:Number, ty:Number):GeneralPathStatic utility method that creates a rectangular self loop path.
Parameterssx:Number — The x coordinate of the source port.
|
|
sy:Number — The y coordinate of the source port.
|
|
oppositeX:Number — The x coordinate of the single control point.
|
|
oppositeY:Number — The y coordinate of the single control point.
|
|
tx:Number — The x coordinate of the target port.
|
|
ty:Number — The y coordinate of the target port.
|
GeneralPath —
A path that describes a rectangular self loop.
|
See also
| createSelfLoopPath | () | method |
protected function createSelfLoopPath():GeneralPathSpecial implementation that will create a self loop path.
ReturnsGeneralPath —
edge path as GeneralPath
|
| getSegmentCount | () | method |
public override function getSegmentCount():intReturns the number of "segments" this edge's path consists of.
Returnsint — the number of segments or -1 if there is no such thing as a segment for this edge.
|
| getSegmentTangent | () | method |
public override function getSegmentTangent(segment:int, ratio:Number, p:YPoint, t:YPoint):BooleanCalculates the tangent on the edge's path at the given segment and ratio point.
The result is provided through the given point parameters.
If the method returns false, no valid result could be calculated and
the values of the point parameters should be ignored.
segment:int — the index of the zero-based segment.
|
|
ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
|
|
p:YPoint — A point in world-coordinate space that denotes the tangent point.
|
|
t:YPoint — The vector which is tangent to the edge's path at the point p.
The tangent vector needs not necessarily be normalized.
|
Boolean — true iff the values written to the given points are valid.
|
| getSmoothing | () | method |
protected override function getSmoothing():NumberGets the smoothing factor
ReturnsNumber — The smoothing factor
|
| getStroke | () | method |
protected override function getStroke():IStrokeGets the pen to use for painting the path.
ReturnsIStroke — the stroke or null.
|
| getTangent | () | method |
public override function getTangent(ratio:Number, p:YPoint, t:YPoint):BooleanCalculates the tangent on the edge's path at the given ratio point.
The result is provided through the given point parameters.
If the method returns false, no valid result could be calculated and
the values of the point parameters should be ignored.
ratio:Number — a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path.
|
|
p:YPoint — A point in world-coordinate space that denotes the tangent point.
|
|
t:YPoint — The vector which is tangent to the edge's path at the point p.
The tangent vector needs not necessarily be normalized.
|
Boolean — true iff the values written to the given points are valid.
|
| isVisible | () | method |
public override function isVisible(clip:IRectangle, ctx:ICanvasContext):Boolean
Calls configure and tests the item using the style
for a visible intersection with the clip bounds.
This simple implementation uses calculateBounds to determine the visibility.
Subclasses may choose to override this behavior for improved performance
but need to make sure to call configure
if they depend on a configured instance.
clip:IRectangle — The clip bounds
|
|
ctx:ICanvasContext — The current canvas context
|
Boolean — true if teh item may be painted within the clip bounds.
|
| lookup | () | method |
public override function lookup(type:Class):Object
Implements the ILookup interface.
This method will be used by default if getContext has been queried for a
lookup implementation.
Note that it cannot be assumed that configure has already been invoked.
However, normally item and style will be correctly configured
if invoked directly after getContext.
Subclass implementations should make sure to configure this instance before they return this as a result
of a successful lookup.
type:Class — The type to query for
|
Object — An implementation of the given type or null
|