Package | com.yworks.canvas.geom |
Class | public class ImmutableRectangle |
Inheritance | ImmutableRectangle Object |
Implements | IRectangle |
IRectangle
whose state cannot
be changed.
Property | Defined By | ||
---|---|---|---|
EMPTY : IRectangle [static]
An immutable empty IRectangle with width and height of -1. | ImmutableRectangle | ||
height : Number [read-only]
Gets the height of the rectangle. | ImmutableRectangle | ||
width : Number [read-only]
Gets the width of the rectangle. | ImmutableRectangle | ||
x : Number [read-only]
Gets the x coordinate of the upper left corner of the rectangle. | ImmutableRectangle | ||
y : Number [read-only]
Gets the y coordinate of the upper left corner of the rectangle. | ImmutableRectangle |
Method | Defined By | ||
---|---|---|---|
ImmutableRectangle(x:Number, y:Number, width:Number, height:Number)
Creates a new immutable instance using the provided values to initialize
the position and size. | ImmutableRectangle | ||
create(x:Number = 0.0, y:Number = 0.0, width:Number = 0.0, height:Number = 0.0):ImmutableRectangle [static]
Creates a new immutable instance using the provided values to initialize
the position and size. | ImmutableRectangle | ||
[static]
Creates a new immutable instance using the provided rectangle to initialize
the position and size. | ImmutableRectangle |
EMPTY | property |
public static var EMPTY:IRectangle
An immutable empty IRectangle with width and height of -1
.
height | property |
height:Number
[read-only] Gets the height of the rectangle.
This instance will always return the same value.
public function get height():Number
width | property |
width:Number
[read-only] Gets the width of the rectangle.
This instance will always return the same value.
public function get width():Number
x | property |
x:Number
[read-only] Gets the x coordinate of the upper left corner of the rectangle.
This instance will always return the same value.
public function get x():Number
y | property |
y:Number
[read-only] Gets the y coordinate of the upper left corner of the rectangle.
This instance will always return the same value.
public function get y():Number
ImmutableRectangle | () | Constructor |
public function ImmutableRectangle(x:Number, y:Number, width:Number, height:Number)
Creates a new immutable instance using the provided values to initialize the position and size.
Parametersx:Number — The x coordinate of the upper left corner of the rectangle.
| |
y:Number — The y coordinate of the upper left corner of the rectangle.
| |
width:Number — The width of the rectangle.
| |
height:Number — The height of the rectangle.
|
create | () | method |
public static function create(x:Number = 0.0, y:Number = 0.0, width:Number = 0.0, height:Number = 0.0):ImmutableRectangle
Creates a new immutable instance using the provided values to initialize the position and size.
Parameters
x:Number (default = 0.0 ) — The x coordinate of the upper left corner of the rectangle.
| |
y:Number (default = 0.0 ) — The y coordinate of the upper left corner of the rectangle.
| |
width:Number (default = 0.0 ) — The width of the rectangle.
| |
height:Number (default = 0.0 ) — The height of the rectangle.
|
ImmutableRectangle |
createFrom | () | method |
public static function createFrom(rectangle:IRectangle):ImmutableRectangle
Creates a new immutable instance using the provided rectangle to initialize the position and size.
Parameters
rectangle:IRectangle — The rectangle to create an instance from
|
ImmutableRectangle |