new Size(width, height) [source]
Parameter | Type | Description |
---|---|---|
width
|
Number | width value |
height
|
Number | height value |
Members
width
Properties:
Name | Type | Description |
---|---|---|
width
|
Number | width |
- Source:
height
Properties:
Name | Type | Description |
---|---|---|
height
|
Number | height |
- Source:
Methods
copy() [source]
Returns a copy of the size
Returns:
Size: copyadd(size) [source]
Returns the result of addition of another size.
Parameter | Type | Description |
---|---|---|
size
|
Size | size to add |
Returns:
Size: resultequals(size) [source]
Compare with another size to see whether they are equal.
Parameter | Type | Description |
---|---|---|
size
|
Size | size to compare |
Returns:
Boolean:multi(ratio) [source]
Returns the result of multiplication of the current size by the given number.
Parameter | Type | Description |
---|---|---|
ratio
|
Number | ratio to multi |
Returns:
Size: resulttoPoint() [source]
Converts the size object to a [Point]{Point}
Returns:
Point: pointtoArray() [source]
Converts the size object to an array [width, height]
Returns:
Array.<Number>:toJSON() [source]
Convert the size object to a json object {width : .., height : ..}