ReadonlybottomReadonlyleftReadonlyrightReadonlytopApplies a transformation to the inset. We will transform each of the corners represented by the inset and then find the max and min values to generate the resulting inset.
Returns a new instance of this Record type with all values set to their default values.
Returns a new instance of this Record type with the value for the specific key set to its default value.
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
OptionalnotSetValue: anyReturns a new inset with the provided scale applied to all properties.
The scale to apply to the inset.
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Shallowly converts this Record to equivalent native JavaScript Object.
Shallowly converts this Record to equivalent JavaScript Object.
StaticapplyReturns a new Rect by adding the provided inset values to the provided Rect.
An Inset instance.
A Rect instance.
A new Rect.
StaticfromStaticfromReturns a new inset using the provided vale for all properties.
An inset value to be applied to all the properties.
A new Inset.
An inset describes a rectangle by enumerating the distance from each side to the corresponding side of a reference rectangle. Therefore it does not hold coordinates, nor dimensions, only relative values for
left,top,rightandbottom. Provided values are defined in same units used by the page, point units. Point units are only equal to pixels when zoom value is1.It is an Immutable.Record and thus can be updated using
set(key, value), for example:inset.set("right", 15).Example
Create and update an inset.
Param: args
An object used to initialize the Point. If
left,top,rightorbottomis omitted,0will be used instead.Default