A8 Struct

An 8-bit alpha (coverage) value without color, for alpha masks.

public struct A8 : IEquatable<A8>

Remarks

The pixel has no color: it reads as black with its alpha ((0, 0, 0, A)) in every conversion to another pixel format, and a conversion to A8 keeps the alpha of the source and discards its color.

Implements

Constructors

NameDescription
A8(byte)Initializes a new instance of the A8 struct.

A8(byte)

A8.cs

Initializes a new instance of the A8 struct.

public A8(byte a)

Parameters

a byte
The alpha component.

Methods

NameDescription
Equals(A8)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(A8)

A8.cs

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(A8 other)
Parameters
other A8
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

A8.cs

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

A8.cs

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

ToString()

A8.cs

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string The fully qualified type name.

Operators

NameDescription
operator ==(A8, A8)Compares two pixels for equality.
operator !=(A8, A8)Compares two pixels for inequality.

operator ==(A8, A8)

A8.cs

Compares two pixels for equality.

public static bool operator ==(A8 left, A8 right)

Parameters

left A8
The first pixel.
right A8
The second pixel.

Returns

bool true if the values are equal; otherwise false.

operator !=(A8, A8)

A8.cs

Compares two pixels for inequality.

public static bool operator !=(A8 left, A8 right)

Parameters

left A8
The first pixel.
right A8
The second pixel.

Returns

bool true if the values differ; otherwise false.

Fields

NameDescription
AThe alpha component (0 is fully transparent, 255 is fully opaque).

A

The alpha component (0 is fully transparent, 255 is fully opaque).

public byte A