Class LedLayout
Represents the serializable layout of a Led.
Implements
Inherited Members
Namespace: RGB.NET.Layout
Assembly: RGB.NET.Layout.dll
Syntax
[Serializable]
public class LedLayout : ILedLayout
Properties
| Edit this page View SourceCustomData
Gets the the custom data associated with the LED.
Declaration
public object? CustomData { get; set; }
Property Value
Type | Description |
---|---|
object |
DescriptiveHeight
Gets or sets the descriptive height of the LedLayout. This property is for XML-serialization only and should not be directly accessed.
Declaration
public string DescriptiveHeight { get; set; }
Property Value
Type | Description |
---|---|
string |
DescriptiveShape
Gets or sets the descriptive Shape of the LedLayout. This property is for XML-serialization only and should not be directly accessed.
Declaration
public string DescriptiveShape { get; set; }
Property Value
Type | Description |
---|---|
string |
DescriptiveWidth
Gets or sets the descriptive width of the LedLayout. This property is for XML-serialization only and should not be directly accessed.
Declaration
public string DescriptiveWidth { get; set; }
Property Value
Type | Description |
---|---|
string |
DescriptiveX
Gets or sets the descriptive x-position of the LedLayout. This property is for XML-serialization only and should not be directly accessed.
Declaration
public string DescriptiveX { get; set; }
Property Value
Type | Description |
---|---|
string |
DescriptiveY
Gets or sets the descriptive y-position of the LedLayout. This property is for XML-serialization only and should not be directly accessed.
Declaration
public string DescriptiveY { get; set; }
Property Value
Type | Description |
---|---|
string |
Height
Gets the height of the LedLayout.
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
float |
Id
Gets or sets the Id of the LedLayout.
Declaration
public string? Id { get; set; }
Property Value
Type | Description |
---|---|
string |
InternalCustomData
Gets or sets the internal custom data of this layout. Normally you should use CustomData to access or set this data.
Declaration
public object? InternalCustomData { get; set; }
Property Value
Type | Description |
---|---|
object |
Shape
Declaration
public Shape Shape { get; set; }
Property Value
Type | Description |
---|---|
Shape |
ShapeData
Gets or sets the vecor-data representing a custom-shape of the LedLayout.
Declaration
public string? ShapeData { get; set; }
Property Value
Type | Description |
---|---|
string |
Width
Gets the width of the LedLayout.
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
float |
X
Gets the x-position of the LedLayout.
Declaration
public float X { get; }
Property Value
Type | Description |
---|---|
float |
Y
Gets the y-position of the LedLayout.
Declaration
public float Y { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceCalculateValues(DeviceLayout, LedLayout?)
Calculates the position- and size-data from the respective descriptive values.
Declaration
public virtual void CalculateValues(DeviceLayout device, LedLayout? lastLed)
Parameters
Type | Name | Description |
---|---|---|
DeviceLayout | device | The DeviceLayout this LedLayout belongs to. |
LedLayout | lastLed | The LedLayout previously calculated. |
GetLocationValue(string, float, float, float)
Gets the calculated location-value from the internal representation.
Declaration
protected virtual float GetLocationValue(string value, float lastValue, float currentSize, float lastSize)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value provided by the layout. |
float | lastValue | The location of the last calculated LED. |
float | currentSize | The size of the current LED. |
float | lastSize | The size of the last loaded LED. |
Returns
Type | Description |
---|---|
float | The location-value of the LED. |
GetSizeValue(string, float)
Gets the calculated size-value from the internal representation.
Declaration
protected virtual float GetSizeValue(string value, float unitSize)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value provided by the layout. |
float | unitSize | The absolute size of one 'unit'. |
Returns
Type | Description |
---|---|
float | The size-value of the LED. |