[]
        
(Showing Draft Content)

C1.Util.DX.ColorF.-ctor

ColorF Constructor

ColorF(float)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(float value)
Parameters
Type Name Description
float value

The value that will be assigned to all components.

ColorF(float, float, float, float)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(float red, float green, float blue, float alpha = 1)
Parameters
Type Name Description
float red

The red component of the color.

float green

The green component of the color.

float blue

The blue component of the color.

float alpha

The alpha component of the color.

ColorF(uint)

Initializes a new instance of the ColorF struct.

Declaration
[CLSCompliant(false)]
public ColorF(uint argb)
Parameters
Type Name Description
uint argb

A packed unsigned integer containing all four color components in ARGB order.

ColorF(uint, float)

Initializes a new instance of the ColorF struct.

Declaration
[CLSCompliant(false)]
public ColorF(uint rgb, float alpha)
Parameters
Type Name Description
uint rgb

A packed unsigned integer containing three color components in RGB order.

float alpha

The alpha component of the color.

ColorF(ColorF, float)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(ColorF value, float alpha = 1)
Parameters
Type Name Description
ColorF value

The source ColorF.

float alpha

The alpha component of the color.

ColorF(Color)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(Color color)
Parameters
Type Name Description
Color color

The System.Drawing.Color value.

ColorF(Vector3, float)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(Vector3 value, float alpha = 1)
Parameters
Type Name Description
Vector3 value

The red, green, and blue components of the color.

float alpha

The alpha component of the color.

ColorF(Vector4)

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(Vector4 value)
Parameters
Type Name Description
Vector4 value

The red, green, blue, and alpha components of the color.

ColorF(float[])

Initializes a new instance of the ColorF struct.

Declaration
public ColorF(float[] values)
Parameters
Type Name Description
float[] values

The values to assign to the red, green, blue, and alpha components of the color. This must be an array with four elements.

Exceptions
Type Condition
ArgumentNullException

Thrown when values is null.

ArgumentOutOfRangeException

Thrown when values contains more or less than four elements.