Optionalleft: numberOptionalright: numberOptionaltop: numberOptionalbottom: numberProtected_bottomProtected_leftProtected_rightProtected_topThe total horizontal offset.
The total vertical offset.
Copies all properties defined by the prototype of RectOffset from other to this instance.
Clones this instance and returns a new RectOffset with identical values.
Determines if this RectOffset instance is equal to the other instance.
StaticisDetermines if both RectOffset instances are equal.
StaticwithCreates a rect offset with a uniform offset.
The RectOffset implements a rectangle represented in the form of integer (pixel) offsets from a parent rectangle. The class follows the 'copy-on-write' pattern, which means that mutable operations return a copy of the object with updates values. It also implies that the values of the object cannot be directly modified.
The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.