Struct D2D1PixelFormat
Contains the data format and alpha mode for a bitmap or render target.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D2D1
Assembly: JeremyAnsel.DirectX.D2D1.dll
Syntax
public struct D2D1PixelFormat : IEquatable<D2D1PixelFormat>
Constructors
| Edit this page View SourceD2D1PixelFormat(DxgiFormat, D2D1AlphaMode)
Initializes a new instance of the D2D1PixelFormat struct.
Declaration
public D2D1PixelFormat(DxgiFormat format, D2D1AlphaMode alphaMode)
Parameters
Type | Name | Description |
---|---|---|
DxgiFormat | format | A value that specifies the size and arrangement of channels in each pixel. |
D2D1AlphaMode | alphaMode | A value that specifies whether the alpha channel is using pre-multiplied alpha, straight alpha, whether it should be ignored and considered opaque, or whether it is unknown. |
Properties
| Edit this page View SourceAlphaMode
Gets or sets a value that specifies whether the alpha channel is using pre-multiplied alpha, straight alpha, whether it should be ignored and considered opaque, or whether it is unknown.
Declaration
public D2D1AlphaMode AlphaMode { get; set; }
Property Value
Type | Description |
---|---|
D2D1AlphaMode |
Default
Gets default format (Unknown, Unknown).
Declaration
public static D2D1PixelFormat Default { get; }
Property Value
Type | Description |
---|---|
D2D1PixelFormat |
Format
Gets or sets a value that specifies the size and arrangement of channels in each pixel.
Declaration
public DxgiFormat Format { get; set; }
Property Value
Type | Description |
---|---|
DxgiFormat |
Methods
| Edit this page View SourceEquals(D2D1PixelFormat)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D2D1PixelFormat other)
Parameters
Type | Name | Description |
---|---|---|
D2D1PixelFormat | 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 ==(D2D1PixelFormat, D2D1PixelFormat)
Compares two D2D1PixelFormat objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D2D1PixelFormat left, D2D1PixelFormat right)
Parameters
Type | Name | Description |
---|---|---|
D2D1PixelFormat | left | The left D2D1PixelFormat to compare. |
D2D1PixelFormat | right | The right D2D1PixelFormat to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D2D1PixelFormat, D2D1PixelFormat)
Compares two D2D1PixelFormat objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D2D1PixelFormat left, D2D1PixelFormat right)
Parameters
Type | Name | Description |
---|---|---|
D2D1PixelFormat | left | The left D2D1PixelFormat to compare. |
D2D1PixelFormat | right | The right D2D1PixelFormat to compare. |
Returns
Type | Description |
---|---|
bool |