Size$Typings extension

on

Properties

height num
Gets or sets the height value of the Size. The value must not be negative.
getter/setter pair
width num
Gets or sets the width value of the Size. The value must not be negative.
getter/setter pair

Methods

copy() Size
Create a copy of this Size, with the same values. @expose @return {Size}
equals(Size s) bool
Indicates whether the given Size is equal to the current Size. @param {Size} s The Size to compare to the current Size. @return {boolean} True if the Sizes have the same width and height, false otherwise. @see #equalTo
equalsApprox(Size s) bool
(undocumented) True when the given Size is nearly equal to this Size. @param {Size} s The Size to compare to the current Size. @return {boolean} True if the two Sizes have Width and Height values that are equal with a tolerance of 0.5, false otherwise.
equalTo(num w, num h) bool
Indicates whether the given size is equal to this Size. @param {number} w the width. @param {number} h the height. @return {boolean} True if the Sizes have the same width and height, false otherwise. @see #equals
inflate(num w, num h) Size
Modify this Size so that its width and height are changed by the given distances. When the arguments are negative, this operation deflates this Size, but not beyond zero. @param {number} w The additional width, which must be a real number; may be negative. @param {number} h The additional height, which must be a real number; may be negative. @return {Rect} this.
isReal() bool
True if this Size has Width and Height values that are real numbers and not infinity. @return {boolean}
set(Size s) Size
Modify this Size so that its Width and Height values are the same as the given Size. @param {Size} s the given Size. @return {Size} this.
setTo(num w, num h) Size
Modify this Size with new Width and Height values. @param {number} w the width. @param {number} h the height. @return {Size} this.