| Package | com.yworks.graph.drawing |
| Class | public class AbstractEdgeStyleRenderer |
| Inheritance | AbstractEdgeStyleRenderer AbstractStyleRenderer |
| Implements | IEdgeStyleRenderer, IPathGeometry |
| Subclasses | PathBasedEdgeStyleRenderer |
IEdgeStyleRenderer
| Method | Defined by | ||
|---|---|---|---|
![]() |
Returns a tight rectangular area where the whole rendering
would fit into.
| AbstractStyleRenderer | |
![]() |
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 | |
![]() |
Configures the
style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | |
![]() |
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
| AbstractEdgeStyleRenderer | ||
|
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.
| AbstractEdgeStyleRenderer | ||
|
Calculates the tangent on the edge's path at the given segment and ratio point.
| AbstractEdgeStyleRenderer | ||
|
Calculates the tangent on the edge's path at the given ratio point.
| AbstractEdgeStyleRenderer | ||
![]() |
Installs the model in the canvas at the given group using the
styleDescriptor. | AbstractStyleRenderer | |
![]() |
isHit(x:Number, y:Number, ctx:ICanvasContext):Boolean
Hit tests the item by trying to apply the flash internal hit testing.
| AbstractStyleRenderer | |
![]() |
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. | AbstractStyleRenderer | |
![]() |
Calls
configure and tests the item using the style
for a visible intersection with the clip bounds. | AbstractStyleRenderer | |
![]() |
lookup(type:Class):Object
Implements the
ILookup interface. | AbstractStyleRenderer | |
![]() |
Performs the actual painting into the given graphics context.
| AbstractStyleRenderer | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
configure():void
Prepares this instance for subsequent calls after the
style and item have been initialized.
| AbstractStyleRenderer | |
|
Factory method for the StyleDescriptor property.
| AbstractEdgeStyleRenderer | ||
|
Calculate and update the anchor and the source arrow's direction vector.
| AbstractEdgeStyleRenderer | ||
|
Calculate and update the anchor and the target arrow's direction vector.
| AbstractEdgeStyleRenderer | ||
|
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 | |
| createStyleDescriptor | () | method |
protected override function createStyleDescriptor():ICanvasObjectDescriptor
Factory method for the StyleDescriptor property. This method will be called
upon first access to the styleDescriptor property.
ICanvasObjectDescriptor —
An ICanvasObjectDescriptor instance that will delegate to this
instance's methods
|
| getPaintable | () | method |
public override function getPaintable(item:IModelItem, edgeStyle:IVisualStyle):IPaintable
Gets an implementation of the IPaintable interface that can
handle the provided item and its associated style.
This method may return a flyweight implementation.
Parametersitem:IModelItem — The item to provide an instance for.
|
|
edgeStyle:IVisualStyle — The style to use for the painting.
|
IPaintable —
An implementation that may be used to subsequently paint
the item. Clients should not cache this instance and must always call
this method immediately before using the value returned. This enables the
use of the flyweight design pattern for implementations
|
| getPath | () | method |
public function getPath():GeneralPath
Returns a representation of the visible path of the edge in form of a GeneralPath
GeneralPath —
An instance that describes the visible path or null if this is not applicable for the current geometry.
|
| getPathGeometry | () | method |
public function getPathGeometry(edge:IEdge, style:IEdgeStyle):IPathGeometry
Gets an implementation of the IPathGeometry interface that can
handle the provided edge and its associated style.
This method may return a flyweight implementation.
Parametersedge:IEdge — The edge to provide an instance for.
|
|
style:IEdgeStyle — The style to use for the painting.
|
IPathGeometry —
An implementation that may be used to subsequently query geometry information from.
Clients should not cache this instance and must always call
this method immediately before using the value returned. This enables the
use of the flyweight design pattern for implementations
|
| getSegmentCount | () | method |
public 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 function getSegmentTangent(segment:int, ratio:Number, c:YPoint, up: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.
|
|
c:YPoint — A point in world-coordinate space that denotes the tangent point.
|
|
up: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.
|
| getSourceArrowAnchor | () | method |
protected function getSourceArrowAnchor(arrow:IArrow, anchorPoint:IPointSetter, arrowDirection:IPointSetter):BooleanCalculate and update the anchor and the source arrow's direction vector.
Abstract method, has to be overriden by implementations.
Parametersarrow:IArrow — The arrow to calculate the anchor for.
|
|
anchorPoint:IPointSetter — The tip of the arrow.
|
|
arrowDirection:IPointSetter — The direction vector of the arrow.
|
Boolean — Whether an anchor has been successfully determined.
|
| getTangent | () | method |
public function getTangent(ratio:Number, c:YPoint, up: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.
|
|
c:YPoint — A point in world-coordinate space that denotes the tangent point.
|
|
up: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.
|
| getTargetArrowAnchor | () | method |
protected function getTargetArrowAnchor(arrow:IArrow, anchorPoint:IPointSetter, arrowDirection:IPointSetter):BooleanCalculate and update the anchor and the target arrow's direction vector.
Abstract method, has to be overriden by implementations.
Parametersarrow:IArrow — The arrow to calculate the anchor for.
|
|
anchorPoint:IPointSetter — The tip of the arrow.
|
|
arrowDirection:IPointSetter — The direction vector of the arrow.
|
Boolean — Whether an anchor has been successfully determined.
|
| paintArrows | () | method |
protected function paintArrows(g:YGraphics, ctx:IPaintContext):voidPaints the provided arrows using the graphics context.
This method relies on the getSourceArrowAnchor and
and getTargetArrowAnchor methods to operate correctly.
g:YGraphics — The graphics context
|
|
ctx:IPaintContext — the painting context
|