PDFsharp-net6

Pixel

Namespace: PdfSharp.BigGustave

A pixel in a Png image.

public struct Pixel

Inheritance ObjectValueTypePixel

Properties

R

The red value for the pixel.

public byte R { get; }

Property Value

Byte

G

The green value for the pixel.

public byte G { get; }

Property Value

Byte

B

The blue value for the pixel.

public byte B { get; }

Property Value

Byte

A

The alpha transparency value for the pixel.

public byte A { get; }

Property Value

Byte

IsGrayscale

Whether the pixel is grayscale (if Pixel.R, Pixel.G and Pixel.B will all have the same value).

public bool IsGrayscale { get; }

Property Value

Boolean

Constructors

Pixel(Byte, Byte, Byte, Byte, Boolean)

Create a new Pixel.

Pixel(byte r, byte g, byte b, byte a, bool isGrayscale)

Parameters

r Byte
The red value for the pixel.

g Byte
The green value for the pixel.

b Byte
The blue value for the pixel.

a Byte
The alpha transparency value for the pixel.

isGrayscale Boolean
Whether the pixel is grayscale.

Pixel(Byte, Byte, Byte)

Create a new Pixel which has Pixel.IsGrayscale false and is fully opaque.

Pixel(byte r, byte g, byte b)

Parameters

r Byte
The red value for the pixel.

g Byte
The green value for the pixel.

b Byte
The blue value for the pixel.

Pixel(Byte)

Create a new grayscale Pixel.

Pixel(byte grayscale)

Parameters

grayscale Byte
The grayscale value.

Methods

Equals(Object)

bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

Equals(Pixel)

Whether the pixel values are equal.

bool Equals(Pixel other)

Parameters

other Pixel
The other pixel.

Returns

Boolean
if all pixel values are equal otherwise .

GetHashCode()

int GetHashCode()

Returns

Int32

ToString()

string ToString()

Returns

String