/ fm / liveswitch / Size
Class: Size
fm.liveswitch.Size
A size (width and height).
Table of contents
Constructors
Methods
- fmliveswitchSizeInit
- getHeight
- getTypeString
- getWidth
- isEquivalent
- setHeight
- setWidth
- toJson
- toString
- fromJson
- getEmpty
- isEquivalent
- toJson
Constructors
constructor
+ new Size(): Size
Initializes a new instance of the [[fm.liveswitch.size]] class.
Returns: Size
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:23
+ new Size(width
: number, height
: number): Size
Initializes a new instance of the [[fm.liveswitch.size]] class.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width. |
height |
number | The height. |
Returns: Size
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:29
Methods
fmliveswitchSizeInit
▸ Private
fmliveswitchSizeInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:19
getHeight
▸ getHeight(): number
Gets the height.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:157
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:9
getWidth
▸ getWidth(): number
Gets the width.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:169
isEquivalent
▸ isEquivalent(size
: Size): boolean
Determines whether the specified size is equivalent.
Parameters:
Name | Type | Description |
---|---|---|
size |
Size | The size. |
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:182
setHeight
▸ setHeight(value
: number): void
Sets the height.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:194
setWidth
▸ setWidth(value
: number): void
Sets the width.
Parameters:
Name | Type |
---|---|
value |
number |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:210
toJson
▸ toJson(): string
Serializes this instance to JSON.
Returns: string
The serialized JSON.
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:229
toString
▸ toString(): string
Returns a string that represents this instance using format "{width}x{height}".
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:241
fromJson
▸ Static
fromJson(sizeJson
: string): Size
Deserializes an instance from JSON.
Parameters:
Name | Type | Description |
---|---|---|
sizeJson |
string | The JSON to deserialize. |
Returns: Size
The deserialized size.
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:66
getEmpty
▸ Static
getEmpty(): Size
Gets the empty size (0x0).
Returns: Size
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:91
isEquivalent
▸ Static
isEquivalent(size1
: Size, size2
: Size): boolean
Determines whether the two sizes are equivalent.
Parameters:
Name | Type | Description |
---|---|---|
size1 |
Size | The first size. |
size2 |
Size | The second size. |
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:108
toJson
▸ Static
toJson(size
: Size): string
Serializes an instance to JSON.
Parameters:
Name | Type | Description |
---|---|---|
size |
Size | The size. |
Returns: string
The serialized JSON.
Defined in: Generated/TypeScript/fm.liveswitch/Size.ts:138