WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
DirectOutput.General.Color.RGBAColor Class Reference

This class stores information on colors used for toys and effects (e.g. RGBLed). More...

Inheritance diagram for DirectOutput.General.Color.RGBAColor:
DirectOutput.General.Color.RGBAColorNamed

Public Member Functions

RGBAColor Clone ()
 Clones this instance. More...
 
RGBAColor GetRGBAColor ()
 Gets a new RGBAColor instance with the same color values. More...
 
bool SetColor (int Red, int Green, int Blue, int Alpha)
 Sets the RGBA components of the Color. More...
 
bool SetColor (int Red, int Green, int Blue)
 Sets the RGB components of the Color.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255. More...
 
bool SetColor (RGBColor Color)
 Sets the RGB components of the RGBAColor.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255. More...
 
bool SetColor (string Color)
 Sets the RGBA components of the Color.
The parameter string Color ist first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
More...
 
 RGBAColor ()
 Initializes a new instance of the RGBAColor class. More...
 
 RGBAColor (int BrightnessRed, int BrightnessGreen, int BrightnessBlue)
 Initializes a new instance of the RGBAColor class.
If all color components are set to 0, the alpha value will be set to 0, otherwise the alpha value will be set to 255. More...
 
 RGBAColor (int BrightnessRed, int BrightnessGreen, int BrightnessBlue, int Alpha)
 Initializes a new instance of the RGBAColor class. More...
 
 RGBAColor (string Color)
 Initializes a new instance of the RGBAColor class.
The parameter string Color is first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
More...
 
 RGBAColor (RGBColor RGBColor)
 Initializes a new instance of the RGBAColor class. The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255. More...
 
new string ToString ()
 

Properties

int Red [get, set]
 Brightness for Red. More...
 
int Green [get, set]
 Brightness for Green. More...
 
int Blue [get, set]
 Brightness for Blue. More...
 
int Alpha [get, set]
 Alpha value for the color. More...
 
string HexColor [get, set]
 Returns the hexadecimal code for the color. More...
 

Detailed Description

This class stores information on colors used for toys and effects (e.g. RGBLed).

Definition at line 14 of file RGBAColor.cs.

Constructor & Destructor Documentation

DirectOutput.General.Color.RGBAColor.RGBAColor ( )

Initializes a new instance of the RGBAColor class.

Definition at line 240 of file RGBAColor.cs.

DirectOutput.General.Color.RGBAColor.RGBAColor ( int  BrightnessRed,
int  BrightnessGreen,
int  BrightnessBlue 
)

Initializes a new instance of the RGBAColor class.
If all color components are set to 0, the alpha value will be set to 0, otherwise the alpha value will be set to 255.

Parameters
BrightnessRedThe brightness for red.
BrightnessGreenThe brightness for green.
BrightnessBlueThe brightness for blue.

Definition at line 250 of file RGBAColor.cs.

DirectOutput.General.Color.RGBAColor.RGBAColor ( int  BrightnessRed,
int  BrightnessGreen,
int  BrightnessBlue,
int  Alpha 
)

Initializes a new instance of the RGBAColor class.

Parameters
BrightnessRedThe brightness for red.
BrightnessGreenThe brightness for green.
BrightnessBlueThe brightness for blue.
AlphaThe alpha value for the color.

Definition at line 262 of file RGBAColor.cs.

DirectOutput.General.Color.RGBAColor.RGBAColor ( string  Color)

Initializes a new instance of the RGBAColor class.
The parameter string Color is first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:

  • Hexadecimal color code including alpha channel (e.g. #ff0000FF for fully opaque red).
  • Hexadecimal color code without alpha channel (e.g. #ff0000 for red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
  • Comma separated color components including alpha channel (e.g. 255,0,0,128 for half transparent red).
  • Comma separated color components without alpha channel (e.g. 255,0,0 for for fully opque red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
Parameters
ColorThe color string.

Definition at line 279 of file RGBAColor.cs.

DirectOutput.General.Color.RGBAColor.RGBAColor ( RGBColor  RGBColor)

Initializes a new instance of the RGBAColor class. The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.

Parameters
RGBColorRGBColor object.

Definition at line 290 of file RGBAColor.cs.

Member Function Documentation

RGBAColor DirectOutput.General.Color.RGBAColor.Clone ( )

Clones this instance.

Returns
A clone of this RGBAColor instance.

Definition at line 74 of file RGBAColor.cs.

RGBAColor DirectOutput.General.Color.RGBAColor.GetRGBAColor ( )

Gets a new RGBAColor instance with the same color values.

Returns

Definition at line 99 of file RGBAColor.cs.

bool DirectOutput.General.Color.RGBAColor.SetColor ( int  Red,
int  Green,
int  Blue,
int  Alpha 
)

Sets the RGBA components of the Color.

Parameters
RedRed brightness
GreenGreen brightness
BlueBlue brightness
AlphaAlpha value for the color
Returns
true

Definition at line 115 of file RGBAColor.cs.

bool DirectOutput.General.Color.RGBAColor.SetColor ( int  Red,
int  Green,
int  Blue 
)

Sets the RGB components of the Color.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.

Parameters
RedRed brightness
GreenGreen brightness
BlueBlue brightness
Returns
true

Definition at line 132 of file RGBAColor.cs.

bool DirectOutput.General.Color.RGBAColor.SetColor ( RGBColor  Color)

Sets the RGB components of the RGBAColor.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.

Parameters
ColorThe RGB color to be set.
Returns

Definition at line 147 of file RGBAColor.cs.

bool DirectOutput.General.Color.RGBAColor.SetColor ( string  Color)

Sets the RGBA components of the Color.
The parameter string Color ist first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:

  • Hexadecimal color code including alpha channel (e.g. #ff0000FF for fully opaque red).
  • Hexadecimal color code without alpha channel (e.g. #ff0000 for red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
  • Comma separated color components including alpha channel (e.g. 255,0,0,128 for half transparent red).
  • Comma separated color components without alpha channel (e.g. 255,0,0 for for fully opque red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
Parameters
ColorString describing the color.
Returns
true if the parameter string contained a valid color code, otherwise false.

Definition at line 167 of file RGBAColor.cs.

new string DirectOutput.General.Color.RGBAColor.ToString ( )

Definition at line 299 of file RGBAColor.cs.

Property Documentation

int DirectOutput.General.Color.RGBAColor.Alpha
getset

Alpha value for the color.

Alpha value between 0 and 255.

Definition at line 64 of file RGBAColor.cs.

int DirectOutput.General.Color.RGBAColor.Blue
getset

Brightness for Blue.

Brightness between 0 and 255.

Definition at line 52 of file RGBAColor.cs.

int DirectOutput.General.Color.RGBAColor.Green
getset

Brightness for Green.

Brightness between 0 and 255.

Definition at line 40 of file RGBAColor.cs.

string DirectOutput.General.Color.RGBAColor.HexColor
getset

Returns the hexadecimal code for the color.

6 digit hexadecimal color code with leading #(e.g. #ff0000 for red).

Definition at line 84 of file RGBAColor.cs.

int DirectOutput.General.Color.RGBAColor.Red
getset

Brightness for Red.

Brightness between 0 and 255.

Definition at line 27 of file RGBAColor.cs.


The documentation for this class was generated from the following file: