Struct D2D1ColorF
Describes the red, green, blue, and alpha components of a color.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D2D1
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
public struct D2D1ColorF : IEquatable<D2D1ColorF>
Constructors
| Edit this page View SourceD2D1ColorF(D2D1KnownColor)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(D2D1KnownColor knownColor)
Parameters
Type | Name | Description |
---|---|---|
D2D1KnownColor | knownColor | A known color. |
D2D1ColorF(D2D1KnownColor, float)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(D2D1KnownColor knownColor, float a)
Parameters
Type | Name | Description |
---|---|---|
D2D1KnownColor | knownColor | A known color. |
float | a | Floating-point value that specifies the alpha component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates fully transparent, while a value of 1.0 indicates fully opaque. |
D2D1ColorF(float, float, float)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(float r, float g, float b)
Parameters
Type | Name | Description |
---|---|---|
float | r | Floating-point value that specifies the red component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the red component, while a value of 1.0 indicates that red is fully present. |
float | g | Floating-point value that specifies the green component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the green component, while a value of 1.0 indicates that green is fully present. |
float | b | Floating-point value that specifies the blue component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the blue component, while a value of 1.0 indicates that blue is fully present. |
D2D1ColorF(float, float, float, float)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(float r, float g, float b, float a)
Parameters
Type | Name | Description |
---|---|---|
float | r | Floating-point value that specifies the red component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the red component, while a value of 1.0 indicates that red is fully present. |
float | g | Floating-point value that specifies the green component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the green component, while a value of 1.0 indicates that green is fully present. |
float | b | Floating-point value that specifies the blue component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the blue component, while a value of 1.0 indicates that blue is fully present. |
float | a | Floating-point value that specifies the alpha component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates fully transparent, while a value of 1.0 indicates fully opaque. |
D2D1ColorF(uint)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(uint rgb)
Parameters
Type | Name | Description |
---|---|---|
uint | rgb | The red, green, blue components. |
D2D1ColorF(uint, float)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(uint rgb, float a)
Parameters
Type | Name | Description |
---|---|---|
uint | rgb | The red, green, blue components. |
float | a | Floating-point value that specifies the alpha component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates fully transparent, while a value of 1.0 indicates fully opaque. |
Properties
| Edit this page View SourceA
Gets or sets a floating-point value that specifies the alpha component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates fully transparent, while a value of 1.0 indicates fully opaque.
Declaration
public float A { get; set; }
Property Value
Type | Description |
---|---|
float |
B
Gets or sets a floating-point value that specifies the blue component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the blue component, while a value of 1.0 indicates that blue is fully present.
Declaration
public float B { get; set; }
Property Value
Type | Description |
---|---|
float |
G
Gets or sets a floating-point value that specifies the green component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the green component, while a value of 1.0 indicates that green is fully present.
Declaration
public float G { get; set; }
Property Value
Type | Description |
---|---|
float |
R
Gets or sets a floating-point value that specifies the red component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the red component, while a value of 1.0 indicates that red is fully present.
Declaration
public float R { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(D2D1ColorF)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D2D1ColorF other)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(D2D1ColorF, D2D1ColorF)
Compares two D2D1ColorF objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D2D1ColorF left, D2D1ColorF right)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | left | The left D2D1ColorF to compare. |
D2D1ColorF | right | The right D2D1ColorF to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D2D1ColorF, D2D1ColorF)
Compares two D2D1ColorF objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D2D1ColorF left, D2D1ColorF right)
Parameters
Type | Name | Description |
---|---|---|
D2D1ColorF | left | The left D2D1ColorF to compare. |
D2D1ColorF | right | The right D2D1ColorF to compare. |
Returns
Type | Description |
---|---|
bool |