C# Class RPG.Color

The RGBA color class. Each component is handled with a value.
Mostrar archivo Open project: borisblizzard/arcreator

Public Methods

Method Description
Color ( ) : System

Creates a Color object with all values initialized as 0.0.

Color ( float red, float green, float blue, float alpha = 255.0f ) : System

Creates a Color object. If alpha is omitted, it is assumed at 255.

ToString ( ) : string

Returns a that represents the current object.

_arc_dump ( ) : byte[]

Serializes and dumps the Color object in ARC format.

_arc_load ( byte bytes ) : Color

Deserializes and loads a Color object saved in ARC format.

set ( float red, float green, float blue ) : void

Sets all components at once. Alpha remains the same.

set ( float red, float green, float blue, float alpha ) : void

Sets all components at once.

Method Details

Color() public method

Creates a Color object with all values initialized as 0.0.
public Color ( ) : System
return System

Color() public method

Creates a Color object. If alpha is omitted, it is assumed at 255.
public Color ( float red, float green, float blue, float alpha = 255.0f ) : System
red float The red value (0-255)
green float The green value (0-255)
blue float The blue value (0-255)
alpha float The alpha value (0-255)
return System

ToString() public method

Returns a that represents the current object.
public ToString ( ) : string
return string

_arc_dump() public method

Serializes and dumps the Color object in ARC format.
public _arc_dump ( ) : byte[]
return byte[]

_arc_load() public static method

Deserializes and loads a Color object saved in ARC format.
public static _arc_load ( byte bytes ) : Color
bytes byte A array containing the serialized data.
return Color

set() public method

Sets all components at once. Alpha remains the same.
public set ( float red, float green, float blue ) : void
red float The red value (0-255)
green float The green value (0-255)
blue float The blue value (0-255)
return void

set() public method

Sets all components at once.
public set ( float red, float green, float blue, float alpha ) : void
red float The red value (0-255)
green float The green value (0-255)
blue float The blue value (0-255)
alpha float The alpha value (0-255)
return void