Packagecom.yworks.graph.drawing.common
Classpublic class VoidShapeGeometry
InheritanceVoidShapeGeometry Inheritance Object
Implements IShapeGeometry

A void implementation of the IShapeGeometry interface that does nothing and behaves like an empty geometry.

Use the shared static instance of this class instead of null were null is not allowed. The VoidNodeStyleRenderer does so for example.

See also

com.yworks.graph.drawing.common.VoidNodeStyleRenderer


Public Properties
 PropertyDefined By
  instance : VoidShapeGeometry
[static] [read-only] The static shared instance.
VoidShapeGeometry
Public Methods
 MethodDefined By
  
getIntersection(innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersectionPoint:IPointSetter):Boolean
Returns the intersection for the given line with this shape's geometry.
VoidShapeGeometry
  
Returns the outline of the shape or null.
VoidShapeGeometry
  
isInside(x:Number, y:Number):Boolean
Checks whether the given coordinate is deemed to lie within the shape's geometric bounds.
VoidShapeGeometry
Property Detail
instanceproperty
instance:VoidShapeGeometry  [read-only]

The static shared instance.


Implementation
    public static function get instance():VoidShapeGeometry
Method Detail
getIntersection()method
public function getIntersection(innerX:Number, innerY:Number, outerX:Number, outerY:Number, intersectionPoint:IPointSetter):Boolean

Returns the intersection for the given line with this shape's geometry.

Parameters

innerX:Number — The X coordinate of the first point of the line that is inside the shape.
 
innerY:Number — The Y coordinate of the first point of the line that is inside the shape.
 
outerX:Number — The X coordinate of the second point of the line that is outside the shape.
 
outerY:Number — The Y coordinate of the second point of the line that is outside the shape.
 
intersectionPoint:IPointSetter — The intersection point that is set if this method returns true.

Returns
Boolean — Whether an intersection was found.
getOutline()method 
public function getOutline():GeneralPath

Returns the outline of the shape or null.

Returns
GeneralPath — The outline or null if no outline can be provided.
isInside()method 
public function isInside(x:Number, y:Number):Boolean

Checks whether the given coordinate is deemed to lie within the shape's geometric bounds.

Parameters

x:Number — The x coordinate to test.
 
y:Number — The y coordinate to test.

Returns
Boolean — True if the point lies within the shape.