FMLiveSwitchRectangle Class Reference

A rectangle (size and origin). More...

Instance Methods

(NSString *) - description
 Returns a string that represents this instance using format "{origin}/{size}". More...
 
(int) - height
 Gets the size height. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchRectangle class. More...
 
(instancetype) - initWithOrigin:size:
 Initializes a new instance of the FMLiveSwitchRectangle class. More...
 
(bool) - isEquivalentWithRectangle:
 Determines whether the specified rectangle is equivalent. More...
 
(FMLiveSwitchPoint *) - origin
 Gets the origin. More...
 
(void) - setOrigin:
 Sets the origin. More...
 
(void) - setSize:
 Sets the size. More...
 
(FMLiveSwitchSize *) - size
 Gets the size. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 
(int) - width
 Gets the size width. More...
 
(int) - x
 Gets the origin X coordinate. More...
 
(int) - y
 Gets the origin Y coordinate. More...
 

Class Methods

(FMLiveSwitchRectangle *) + empty
 Gets the empty rectangle (0,0/0x0). More...
 
(FMLiveSwitchRectangle *) + fromJsonWithRectangleJson:
 Deserializes an instance from JSON. More...
 
(bool) + isEquivalentWithRectangle1:rectangle2:
 Determines whether the two rectangles are equivalent. More...
 
(FMLiveSwitchRectangle *) + rectangle
 Initializes a new instance of the FMLiveSwitchRectangle class. More...
 
(FMLiveSwitchRectangle *) + rectangleWithOrigin:size:
 Initializes a new instance of the FMLiveSwitchRectangle class. More...
 
(NSString *) + toJsonWithRectangle:
 Serializes an instance to JSON. More...
 

Detailed Description

A rectangle (size and origin).

Method Documentation

◆ description

- (NSString*) description

Returns a string that represents this instance using format "{origin}/{size}".

◆ empty

Gets the empty rectangle (0,0/0x0).

◆ fromJsonWithRectangleJson:

+ (FMLiveSwitchRectangle*) fromJsonWithRectangleJson: (NSString *)  rectangleJson

Deserializes an instance from JSON.

Parameters
rectangleJsonThe JSON to deserialize.
Returns
The deserialized rectangle.

◆ height

- (int) height

Gets the size height.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchRectangle class.

◆ initWithOrigin:size:

- (instancetype) initWithOrigin: (FMLiveSwitchPoint *)  origin
size: (FMLiveSwitchSize *)  size 

Initializes a new instance of the FMLiveSwitchRectangle class.

Parameters
originThe origin.
sizeThe size.

◆ isEquivalentWithRectangle1:rectangle2:

+ (bool) isEquivalentWithRectangle1: (FMLiveSwitchRectangle *)  rectangle1
rectangle2: (FMLiveSwitchRectangle *)  rectangle2 

Determines whether the two rectangles are equivalent.

Parameters
rectangle1The first rectangle.
rectangle2The second rectangle.

◆ isEquivalentWithRectangle:

- (bool) isEquivalentWithRectangle: (FMLiveSwitchRectangle *)  rectangle

Determines whether the specified rectangle is equivalent.

Parameters
rectangleThe rectangle.

◆ origin

- (FMLiveSwitchPoint*) origin

Gets the origin.

◆ rectangle

+ (FMLiveSwitchRectangle*) rectangle

Initializes a new instance of the FMLiveSwitchRectangle class.

◆ rectangleWithOrigin:size:

+ (FMLiveSwitchRectangle*) rectangleWithOrigin: (FMLiveSwitchPoint *)  origin
size: (FMLiveSwitchSize *)  size 

Initializes a new instance of the FMLiveSwitchRectangle class.

Parameters
originThe origin.
sizeThe size.

◆ setOrigin:

- (void) setOrigin: (FMLiveSwitchPoint *)  value

Sets the origin.

◆ setSize:

- (void) setSize: (FMLiveSwitchSize *)  value

Sets the size.

◆ size

- (FMLiveSwitchSize*) size

Gets the size.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJsonWithRectangle:

+ (NSString*) toJsonWithRectangle: (FMLiveSwitchRectangle *)  rectangle

Serializes an instance to JSON.

Parameters
rectangleThe rectangle.
Returns
The serialized JSON.

◆ width

- (int) width

Gets the size width.

◆ x

- (int) x

Gets the origin X coordinate.

◆ y

- (int) y

Gets the origin Y coordinate.