Struct D2D1ColorF
Describes the red, green, blue, and alpha components of a color.
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
public struct D2D1ColorF : IEquatable<D2D1ColorF>
Constructors
|
Edit this page
View Source
D2D1ColorF(D2D1KnownColor)
Initializes a new instance of the D2D1ColorF struct.
Declaration
public D2D1ColorF(D2D1KnownColor knownColor)
Parameters
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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.
|
|
Edit this page
View Source
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 Source
A
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
|
Edit this page
View Source
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
|
Edit this page
View Source
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
|
Edit this page
View Source
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
Methods
|
Edit this page
View Source
Equals(D2D1ColorF)
Declaration
public readonly bool Equals(D2D1ColorF other)
Parameters
Returns
|
Edit this page
View Source
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
NativeReadFrom(nint)
Declaration
public static D2D1ColorF NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<D2D1ColorF>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D2D1ColorF> objects)
Parameters
|
Edit this page
View Source
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
|
Edit this page
View Source
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
|
Returns
|
Edit this page
View Source
NativeWriteTo(nint, in D2D1ColorF)
Declaration
public static void NativeWriteTo(nint buffer, in D2D1ColorF obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<D2D1ColorF>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D2D1ColorF> objects)
Parameters
Operators
|
Edit this page
View Source
operator ==(D2D1ColorF, D2D1ColorF)
Declaration
public static bool operator ==(D2D1ColorF left, D2D1ColorF right)
Parameters
Returns
|
Edit this page
View Source
operator !=(D2D1ColorF, D2D1ColorF)
Declaration
public static bool operator !=(D2D1ColorF left, D2D1ColorF right)
Parameters
Returns
Implements