Class CustomChromaLinkEffect
Custom effect.
Implements
Namespace: Colore.Effects.ChromaLink
Assembly: Colore.dll
Syntax
public sealed class CustomChromaLinkEffect : ValueType, IEquatable<CustomChromaLinkEffect>
Constructors
CustomChromaLinkEffect(Color)
Initializes a new instance of the CustomChromaLinkEffect struct with every position set to a specific color.
Declaration
public CustomChromaLinkEffect(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The Color to set each position to. |
CustomChromaLinkEffect(Color[])
Initializes a new instance of the CustomChromaLinkEffect struct.
Declaration
public CustomChromaLinkEffect(Color[] colors)
Parameters
| Type | Name | Description |
|---|---|---|
| Color[] | colors | The colors to use. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentException | Thrown if the colors array supplied is of an incorrect size. |
CustomChromaLinkEffect(CustomChromaLinkEffect)
Initializes a new instance of the CustomChromaLinkEffect struct with color values copied from another struct of the same type.
Declaration
public CustomChromaLinkEffect(CustomChromaLinkEffect other)
Parameters
| Type | Name | Description |
|---|---|---|
| CustomChromaLinkEffect | other | The struct to copy data from. |
CustomChromaLinkEffect(IList<Color>)
Initializes a new instance of the CustomChromaLinkEffect struct.
Declaration
public CustomChromaLinkEffect(IList<Color> colors)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<Color> | colors | The colors to use. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ArgumentException | Thrown if the colors array supplied is of an invalid size. |
Properties
Item[Int32]
Gets or sets a position in the custom array.
Declaration
public Color this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | The index to access, zero indexed. |
Property Value
| Type | Description |
|---|---|
| Color | The Color at the specified position. |
Methods
Clear()
Clears the colors from the array, setting them to Black.
Declaration
public void Clear()
Clone()
Returns a copy of this struct.
Declaration
public CustomChromaLinkEffect Clone()
Returns
| Type | Description |
|---|---|
| CustomChromaLinkEffect | A copy of this struct. |
Create()
Creates a new empty CustomChromaLinkEffect struct.
Declaration
public static CustomChromaLinkEffect Create()
Returns
| Type | Description |
|---|---|
| CustomChromaLinkEffect | An instance of CustomChromaLinkEffect filled with the color black. |
Equals(CustomChromaLinkEffect)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CustomChromaLinkEffect other)
Parameters
| Type | Name | Description |
|---|---|---|
| CustomChromaLinkEffect | other | A CustomChromaLinkEffect to compare with this object. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | Another object to compare to. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | A 32-bit signed integer that is the hash code for this instance. |
Set(Color)
Sets all LED indices to the specified Color.
Declaration
public void Set(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The Color to set. |
Operators
Equality(CustomChromaLinkEffect, Object)
Compares an instance of CustomChromaLinkEffect with another object for equality.
Declaration
public static bool operator ==(CustomChromaLinkEffect left, object right)
Parameters
| Type | Name | Description |
|---|---|---|
| CustomChromaLinkEffect | left | The left operand, an instance of CustomChromaLinkEffect. |
| Object | right | The right operand, any type of object. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Inequality(CustomChromaLinkEffect, Object)
Compares an instance of CustomChromaLinkEffect with another object for inequality.
Declaration
public static bool operator !=(CustomChromaLinkEffect left, object right)
Parameters
| Type | Name | Description |
|---|---|---|
| CustomChromaLinkEffect | left | The left operand, an instance of CustomChromaLinkEffect. |
| Object | right | The right operand, any type of object. |
Returns
| Type | Description |
|---|---|
| Boolean |
|