DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
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:

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...
 

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).

Constructor & Destructor Documentation

DirectOutput.General.Color.RGBAColor.RGBAColor ( )

Initializes a new instance of the RGBAColor class.

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.
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.
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.
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.

Member Function Documentation

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

Clones this instance.

Returns
A clone of this RGBAColor instance.
RGBAColor DirectOutput.General.Color.RGBAColor.GetRGBAColor ( )

Gets a new RGBAColor instance with the same color values.

Returns
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
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
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
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.

Property Documentation

int DirectOutput.General.Color.RGBAColor.Alpha
getset

Alpha value for the color.

Alpha value between 0 and 255.

int DirectOutput.General.Color.RGBAColor.Blue
getset

Brightness for Blue.

Brightness between 0 and 255.

int DirectOutput.General.Color.RGBAColor.Green
getset

Brightness for Green.

Brightness between 0 and 255.

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).

int DirectOutput.General.Color.RGBAColor.Red
getset

Brightness for Red.

Brightness between 0 and 255.


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