C# Класс RPG.Color

The RGBA color class. Each component is handled with a value.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Color() публичный Метод

Creates a Color object with all values initialized as 0.0.
public Color ( ) : System
Результат System

Color() публичный Метод

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)
Результат System

ToString() публичный Метод

Returns a that represents the current object.
public ToString ( ) : string
Результат string

_arc_dump() публичный Метод

Serializes and dumps the Color object in ARC format.
public _arc_dump ( ) : byte[]
Результат byte[]

_arc_load() публичный статический Метод

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.
Результат Color

set() публичный Метод

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)
Результат void

set() публичный Метод

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)
Результат void