Package | com.yworks.canvas.geom |
Interface | public interface IOrientedRectangle extends ISize |
Implementors | YRectangle |
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.
Property | Defined 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 | ||
height : 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 | ||
width : Number [read-only]
Gets the current width of this instance. | ISize |
anchorX | property |
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)
.
public function get anchorX():Number
anchorY | property |
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)
.
public function get anchorY():Number
upX | property |
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.
public function get upX():Number
upY | property |
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.
public function get upY():Number