C# Class Axiom.Core.ColorEx

Datei anzeigen Open project: WolfgangSt/axiom Class Usage Examples

Public Properties

Property Type Description
a float
b float
g float
r float

Public Methods

Method Description
Clone ( ) : ColorEx

Creates a new object that is a copy of the current instance.

ColorEx ( ColorEx other ) : System

Copy constructor.

ColorEx ( float r, float g, float b ) : System

Constructor taking RGB values

ColorEx ( float a, float r, float g, float b ) : System

Constructor taking all component values.

CompareTo ( object obj ) : int

Used to compare 2 ColorEx objects for equality.

Equals ( object obj ) : bool
GetHashCode ( ) : int

Override GetHashCode.

Done mainly to quash warnings, no real need for it.

Parse_0_255_String ( string parsableText ) : ColorEx
Saturate ( ) : void

Clamps color value to the range [0, 1]

SaturateCopy ( ) : ColorEx

Clamps color value to the range [0, 1] in a copy

ToABGR ( ) : int

Converts this color value to packed ABGR format.

ToARGB ( ) : int

Converts this color value to packed ARBG format.

ToArrayRGBA ( float vals ) : void

Populates the color components in a 4 elements array in RGBA order.

Primarily used to help in OpenGL.

ToRGBA ( ) : int
ToString ( ) : string
To_0_255_String ( ) : string
operator ( ) : ColorEx
operator ( ) : bool

Method Details

Clone() public method

Creates a new object that is a copy of the current instance.
public Clone ( ) : ColorEx
return ColorEx

ColorEx() public method

Copy constructor.
public ColorEx ( ColorEx other ) : System
other ColorEx The ColorEx instance to copy
return System

ColorEx() public method

Constructor taking RGB values
public ColorEx ( float r, float g, float b ) : System
r float Red color component.
g float Green color component.
b float Blue color component.
return System

ColorEx() public method

Constructor taking all component values.
public ColorEx ( float a, float r, float g, float b ) : System
a float Alpha value.
r float Red color component.
g float Green color component.
b float Blue color component.
return System

CompareTo() public method

Used to compare 2 ColorEx objects for equality.
public CompareTo ( object obj ) : int
obj object An instance of a ColorEx object to compare to this instance.
return int

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

Override GetHashCode.
Done mainly to quash warnings, no real need for it.
public GetHashCode ( ) : int
return int

Parse_0_255_String() public static method

public static Parse_0_255_String ( string parsableText ) : ColorEx
parsableText string
return ColorEx

Saturate() public method

Clamps color value to the range [0, 1]
public Saturate ( ) : void
return void

SaturateCopy() public method

Clamps color value to the range [0, 1] in a copy
public SaturateCopy ( ) : ColorEx
return ColorEx

ToABGR() public method

Converts this color value to packed ABGR format.
public ToABGR ( ) : int
return int

ToARGB() public method

Converts this color value to packed ARBG format.
public ToARGB ( ) : int
return int

ToArrayRGBA() public method

Populates the color components in a 4 elements array in RGBA order.
Primarily used to help in OpenGL.
public ToArrayRGBA ( float vals ) : void
vals float
return void

ToRGBA() public method

public ToRGBA ( ) : int
return int

ToString() public method

public ToString ( ) : string
return string

To_0_255_String() public method

public To_0_255_String ( ) : string
return string

operator() public static method

public static operator ( ) : ColorEx
return ColorEx

operator() public static method

public static operator ( ) : bool
return bool

Property Details

a public_oe property

Alpha value [0,1].
public float a
return float

b public_oe property

Blue color component [0,1].
public float b
return float

g public_oe property

Green color component [0,1].
public float g
return float

r public_oe property

Red color component [0,1].
public float r
return float