Class LayoutFrame
A layout frame definition, including X/Y coordinates and width/height values.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class LayoutFrame : object
Constructors
LayoutFrame(Int32, Int32, Int32, Int32)
Initializes a new instance of the LayoutFrame class.
Declaration
public LayoutFrame(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The X coordinate. |
System.Int32 | y | The Y coordinate. |
System.Int32 | width | The width value. |
System.Int32 | height | The height value. |
Properties
ClientId
Gets or sets the client identifier.
Declaration
public string ClientId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DeviceId
Gets or sets the device identifier.
Declaration
public string DeviceId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Height
Gets or sets the height value.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Orientation
Gets or sets the orientation in degrees.
Declaration
public int Orientation { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
UserId
Gets or sets the user identifier.
Declaration
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ViewId
Gets or sets the view ID.
Declaration
public string ViewId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Width
Gets or sets the width value.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
X
Gets or sets the X coordinate.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Y
Gets or sets the Y coordinate.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
FromJson(String)
Deserializes a layout frame from JSON.
Declaration
public static LayoutFrame FromJson(string layoutFrameJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | layoutFrameJson | The layout frame JSON. |
Returns
Type | Description |
---|---|
LayoutFrame |
GetScaledFrame(LayoutScale, Int32, Int32, Int32, Int32)
Gets a scaled frame.
Declaration
public static LayoutFrame GetScaledFrame(LayoutScale scale, int outerWidth, int outerHeight, int innerWidth, int innerHeight)
Parameters
Type | Name | Description |
---|---|---|
LayoutScale | scale | The scaling algorithm to use. |
System.Int32 | outerWidth | The width of the outer container. |
System.Int32 | outerHeight | The height of the outer container. |
System.Int32 | innerWidth | The width of the inner element. |
System.Int32 | innerHeight | The height of the inner element. |
Returns
Type | Description |
---|---|
LayoutFrame |
IsEquivalent(LayoutFrame)
Determines whether the specified layout frame is equivalent.
Declaration
public bool IsEquivalent(LayoutFrame layoutFrame)
Parameters
Type | Name | Description |
---|---|---|
LayoutFrame | layoutFrame | The layout frame. |
Returns
Type | Description |
---|---|
System.Boolean |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System.String |
ToJson(LayoutFrame)
Serializes a layout frame to JSON.
Declaration
public static string ToJson(LayoutFrame layoutFrame)
Parameters
Type | Name | Description |
---|---|---|
LayoutFrame | layoutFrame | The layout frame. |
Returns
Type | Description |
---|---|
System.String |