C# Class OpenBveApi.Colors.Color32

Represents a 32-bit color with red, green, blue and alpha channels at 8 bits each.
显示文件 Open project: leezer3/OpenBVE Class Usage Examples

Public Properties

Property Type Description
A byte
B byte
Black Color32
Blue Color32
Cyan Color32
G byte
Green Color32
Magenta Color32
R byte
Red Color32
Transparent Color32
White Color32
Yellow Color32

Public Methods

Method Description
Color32 ( Color24 color ) : System

Creates a new color.

The alpha component is set to full opacity.

Color32 ( Color24 color, byte a ) : System

Creates a new color.

Color32 ( byte r, byte g, byte b ) : System

Creates a new color.

The alpha component is set to full opacity.

Color32 ( byte r, byte g, byte b, byte a ) : System

Creates a new color.

operator ( ) : bool

Checks whether two colors are equal.

Method Details

Color32() public method

Creates a new color.
The alpha component is set to full opacity.
public Color32 ( Color24 color ) : System
color Color24 The solid color.
return System

Color32() public method

Creates a new color.
public Color32 ( Color24 color, byte a ) : System
color Color24 The solid color.
a byte The alpha component.
return System

Color32() public method

Creates a new color.
The alpha component is set to full opacity.
public Color32 ( byte r, byte g, byte b ) : System
r byte The red component.
g byte The green component.
b byte The blue component.
return System

Color32() public method

Creates a new color.
public Color32 ( byte r, byte g, byte b, byte a ) : System
r byte The red component.
g byte The green component.
b byte The blue component.
a byte The alpha component.
return System

operator() public static method

Checks whether two colors are equal.
public static operator ( ) : bool
return bool

Property Details

A public_oe property

The alpha component.
public byte A
return byte

B public_oe property

The blue component.
public byte B
return byte

Black public_oe static_oe property

Represents a black color.
public static Color32,OpenBveApi.Colors Black
return Color32

Blue public_oe static_oe property

Represents a blue color.
public static Color32,OpenBveApi.Colors Blue
return Color32

Cyan public_oe static_oe property

Represents a cyan color.
public static Color32,OpenBveApi.Colors Cyan
return Color32

G public_oe property

The green component.
public byte G
return byte

Green public_oe static_oe property

Represents a green color.
public static Color32,OpenBveApi.Colors Green
return Color32

Magenta public_oe static_oe property

Represents a magenta color.
public static Color32,OpenBveApi.Colors Magenta
return Color32

R public_oe property

The red component.
public byte R
return byte

Red public_oe static_oe property

Represents a red color.
public static Color32,OpenBveApi.Colors Red
return Color32

Transparent public_oe static_oe property

Represents a transparent black color.
public static Color32,OpenBveApi.Colors Transparent
return Color32

White public_oe static_oe property

Represents a white color.
public static Color32,OpenBveApi.Colors White
return Color32

Yellow public_oe static_oe property

Represents a yellow color.
public static Color32,OpenBveApi.Colors Yellow
return Color32