RgbaFloat Struct
A pixel with single-precision floating-point red, green, blue and straight (non-premultiplied) alpha components, for scene-referred and high dynamic range data.
public struct RgbaFloat : IEquatable<RgbaFloat>Remarks
The color components are not limited to [0, 1]: 1 is the reference white of a standard dynamic range, values above it are brighter, and negative values are colors outside the gamut of the primaries. Alpha is a coverage from 0 (fully transparent) to 1 (fully opaque). A new image of this pixel type is labeled as linear light (ColorTransferFunction.Linear); a conversion keeps the label of its source, since it never converts colors.
Converting to an integer pixel format rejects samples that are not numbers, and samples outside [0, 1] unless PixelConversionOptions.OutOfRangeSamples or PixelConversionOptions.ToneMapping says how to bring them into range.
- Implements
Constructors
| Name | Description |
|---|---|
| RgbaFloat(float, float, float, float) | Initializes a new instance of the RgbaFloat struct. |
RgbaFloat(float, float, float, float)
RgbaFloat.csMethods
| Name | Description |
|---|---|
| Equals(RgbaFloat) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Equals overloads
Equals(RgbaFloat)
RgbaFloat.csIndicates whether the current object is equal to another object of the same type.
Parameters
otherRgbaFloat- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Remarks
Components are compared with Single.Equals: a component that is not a number equals itself.
Equals(object?)
RgbaFloat.csGetHashCode()
RgbaFloat.csToString()
RgbaFloat.csOperators
| Name | Description |
|---|---|
| operator ==(RgbaFloat, RgbaFloat) | Compares two pixels for equality. |
| operator !=(RgbaFloat, RgbaFloat) | Compares two pixels for inequality. |
operator ==(RgbaFloat, RgbaFloat)
RgbaFloat.csoperator !=(RgbaFloat, RgbaFloat)
RgbaFloat.csFields
| Name | Description |
|---|---|
| A | The straight alpha component (0 is fully transparent, 1 is fully opaque). |
| B | The blue component. |
| G | The green component. |
| R | The red component. |
A
The straight alpha component (0 is fully transparent, 1 is fully opaque).
public float AB
The blue component.
public float BG
The green component.
public float GR
The red component.
public float R