Packagecom.yworks.canvas.geom
Interfacepublic interface IOrientedRectangle extends ISize
Implementors YRectangle

Interface for oriented rectangles in 2D coordinate space.

The rectangle described by this interface has its lower left corner at the anchor as described by the anchorX and anchorY properties and is oriented in space so that its upper left corner lies in direction of the (upX,upY) vector. The size of the instance does not describe the bounds of the instance but the lengths of the sides of the rectangle.

An IRectangle would thus be an oriented rectangle, whose anchor is the lower left corner of the rectangle, whose size is the same as that of the rectangle and whose up vector is (0,-1).

This interface provides read access to the features of the oriented rectangle only, however this does not mean that an instance that implements IOrientedRectangle will always return the same values for its properties. Often times the instance provides a dynamic read access to the current state of a rectangle. It depends on the context whether it is allowed to or even necessary to copy the state of the properties or whether the reference to the instance should always be used to query the values.



Public Properties
 PropertyDefined By
  anchorX : Number
[read-only] Returns the x coordinate of the anchor of the oriented rectangle.
IOrientedRectangle
  anchorY : Number
[read-only] Returns the y coordinate of the anchor of the oriented rectangle.
IOrientedRectangle
 Inheritedheight : Number
[read-only] Gets the current height of this instance.
ISize
  upX : Number
[read-only] Returns the x value of the up vector.
IOrientedRectangle
  upY : Number
[read-only] Returns the y value of the up vector.
IOrientedRectangle
 Inheritedwidth : Number
[read-only] Gets the current width of this instance.
ISize
Property Detail
anchorXproperty
anchorX:Number  [read-only]

Returns the x coordinate of the anchor of the oriented rectangle.

The anchor is the lower left corner of the oriented rectangle if the up vector is (0,-1).


Implementation
    public function get anchorX():Number
anchorYproperty 
anchorY:Number  [read-only]

Returns the y coordinate of the anchor of the oriented rectangle.

The anchor is the lower left corner of the oriented rectangle if the up vector is (0,-1).


Implementation
    public function get anchorY():Number
upXproperty 
upX:Number  [read-only]

Returns the x value of the up vector.

The up vector points from the lower left corner to the upper left corner and is always normalized, i.e. it's length is always 1.


Implementation
    public function get upX():Number
upYproperty 
upY:Number  [read-only]

Returns the y value of the up vector.

The up vector points from the lower left corner to the upper left corner and is always normalized, i.e. it's length is always 1.


Implementation
    public function get upY():Number