Represents a curve which can be used to map values (e.g. adjust a brighnetss value of a led to the brightness perception of the human eye).
More...
|
enum | CurveTypeEnum {
Linear
, Linear0To224
, Linear0To192
, Linear0To160
,
Linear0To128
, Linear0To96
, Linear0To64
, Linear0To32
,
Linear0To16
, InvertedLinear
, SwissLizardsLedCurve
} |
| Enumeration of predefined curves. More...
|
|
byte | MapValue (byte CurvePosition) |
| Returns the value from the specified curve position.
|
byte | MapValue (int CurvePosition) |
| Returns the value from the specified curve position.
|
void | SetCurve (CurveTypeEnum CurveType) |
| Sets the the fading curve to one of the predefined curves from the FadingCurveTypeEnum.
|
| Curve () |
| Initializes a new instance of the Curve class.
|
| Curve (CurveTypeEnum CurveType) |
| Initializes a new instance of the Curve class.
|
System.Xml.Schema.XmlSchema | GetSchema () |
| Part of the IXmlSerializable interface. Must always return null.
|
void | ReadXml (System.Xml.XmlReader reader) |
| Set the data of the object from its XML representation.
|
void | WriteXml (System.Xml.XmlWriter writer) |
| Converts the object to its xml representation.
|
|
byte[] | Data [get, set] |
| Gets or sets the curve data array. The curve array must have 256 elements.
|
string | Name [get, set] |
| Name of the named item.
Triggers BeforeNameChange before a new Name is set.
Triggers AfterNameChanged after a new name has been set.
|
Represents a curve which can be used to map values (e.g. adjust a brighnetss value of a led to the brightness perception of the human eye).
◆ CurveTypeEnum
Enumeration of predefined curves.
Enumerator |
---|
Linear | A linear curve, where each element will map to a value which is equal to the element index (0=0, 1=1 .... 254=254,255=255).
|
Linear0To224 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 224.
|
Linear0To192 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 192.
|
Linear0To160 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 160.
|
Linear0To128 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 128.
|
Linear0To96 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 96.
|
Linear0To64 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 64.
|
Linear0To32 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 32.
|
Linear0To16 | A linear curve, which maps 0 to 255 value range into a new range of 0 to 16.
|
InvertedLinear | This is a inverted linear curve where 255=0, 254=1 and so on until 1=254 and 0=255.
|
SwissLizardsLedCurve | A fading curve for leds defined by SwissLizard. This curve is not fully correct when it comes to theoretically needed mapping values, but it is some kind of compromise between possible value range and the desired values.
|
◆ Curve() [1/2]
DirectOutput.General.Curve.Curve |
( |
| ) |
|
Initializes a new instance of the Curve class.
◆ Curve() [2/2]
Initializes a new instance of the Curve class.
- Parameters
-
CurveType | Type of the curve. |
◆ GetSchema()
System.Xml.Schema.XmlSchema DirectOutput.General.Curve.GetSchema |
( |
| ) |
|
Part of the IXmlSerializable interface. Must always return null.
- Returns
- Return always null.
◆ MapValue() [1/2]
byte DirectOutput.General.Curve.MapValue |
( |
byte | CurvePosition | ) |
|
Returns the value from the specified curve position.
- Parameters
-
CurvePosition | The curve position. |
- Returns
- Value from the specified position of the curve.
◆ MapValue() [2/2]
byte DirectOutput.General.Curve.MapValue |
( |
int | CurvePosition | ) |
|
Returns the value from the specified curve position.
- Parameters
-
CurvePosition | The curve position. |
- Returns
- Value from the specified position of the curve.
◆ ReadXml()
void DirectOutput.General.Curve.ReadXml |
( |
System.Xml.XmlReader | reader | ) |
|
Set the data of the object from its XML representation.
- Parameters
-
reader | The T:System.Xml.XmlReader-stream containing the data for ther object. |
◆ SetCurve()
void DirectOutput.General.Curve.SetCurve |
( |
CurveTypeEnum | CurveType | ) |
|
Sets the the fading curve to one of the predefined curves from the FadingCurveTypeEnum.
- Parameters
-
CurveType | Type of the fading curve. |
◆ WriteXml()
void DirectOutput.General.Curve.WriteXml |
( |
System.Xml.XmlWriter | writer | ) |
|
Converts the object to its xml representation.
- Parameters
-
writer | The T:System.Xml.XmlWriter-stream, to which the object is serialized. |
◆ Data
byte [] DirectOutput.General.Curve.Data |
|
getset |
Gets or sets the curve data array. The curve array must have 256 elements.
The curve array (256 elements).
- Exceptions
-
System.Exception | The curve array must have 256 elements, but a array with {0} elements has been supplied. |
The documentation for this class was generated from the following file:
- D:/a/DirectOutput/DirectOutput/DirectOutput/General/Curve.cs