Package | com.yworks.graph.drawing |
Class | public class AbstractEdgeStyleRenderer |
Inheritance | AbstractEdgeStyleRenderer AbstractStyleRenderer Object |
Implements | IPathGeometry, IEdgeStyleRenderer |
Subclasses | PathBasedEdgeStyleRenderer |
IEdgeStyleRenderer
Method | Defined By | ||
---|---|---|---|
Returns a tight rectangular area where the whole rendering
would fit into. | AbstractStyleRenderer | ||
createDisplayObject(context:IDisplayObjectContext):DisplayObject
Creates a new DisplayObject which represents the styled model item. | 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 | ||
Configures the style and item parameters,
calls configure and returns this. | AbstractStyleRenderer | ||
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 | ||
updateDisplayObject(oldDisplayObject:DisplayObject, context:IDisplayObjectContext):DisplayObject
Updates the given DisplayObject. | AbstractStyleRenderer |
Method | Defined By | ||
---|---|---|---|
configure():void
Prepares this instance for subsequent calls after the
style and item have been initialized. | AbstractStyleRenderer | ||
[override]
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 | ||
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 |
override protected 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
|
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.
Parameters
edge: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():int
Returns 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):Boolean
Calculates 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.
Parameters
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):Boolean
Calculate and update the anchor and the source arrow's direction vector.
Abstract method, has to be overridden by implementations.
Parameters
arrow: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):Boolean
Calculates 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.
Parameters
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):Boolean
Calculate and update the anchor and the target arrow's direction vector.
Abstract method, has to be overridden by implementations.
Parameters
arrow: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.
|