LaFloat Struct
A pixel with a single-precision floating-point gray level and a straight (non-premultiplied) alpha component, in 8 bytes per pixel.
public struct LaFloat : IEquatable<LaFloat>Remarks
The gray level has the meaning of the colors of RgbaFloat: linear light where 1 is the reference white, with values outside [0, 1] allowed (highlights above 1). 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), and the components are stored in native endianness.
Converting a color to it gives the Rec. 709 luma of the color, 0.2126 R + 0.7152 G + 0.0722 B (the luma of a gray color is that gray), and converting it to a color format repeats the gray level in the three colors. Converting it to an integer pixel format follows the rules of RgbaFloat.
- Implements
Constructors
| Name | Description |
|---|---|
| LaFloat(float) | Initializes a new instance of the LaFloat struct with a fully opaque alpha. |
| LaFloat(float, float) | Initializes a new instance of the LaFloat struct. |
Methods
| Name | Description |
|---|---|
| Equals(LaFloat) | 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(LaFloat)
LaFloat.csIndicates whether the current object is equal to another object of the same type.
Parameters
otherLaFloat- 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?)
LaFloat.csGetHashCode()
LaFloat.csToString()
LaFloat.csOperators
| Name | Description |
|---|---|
| operator ==(LaFloat, LaFloat) | Compares two pixels for equality. |
| operator !=(LaFloat, LaFloat) | Compares two pixels for inequality. |
operator ==(LaFloat, LaFloat)
LaFloat.csoperator !=(LaFloat, LaFloat)
LaFloat.csFields
| Name | Description |
|---|---|
| A | The straight alpha component (0 is fully transparent, 1 is fully opaque). |
| L | The gray level. |
A
The straight alpha component (0 is fully transparent, 1 is fully opaque).
public float AL
The gray level.
public float L