[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.PaletteEntry

Struct PaletteEntry

Namespace
GrapeCity.Documents.Imaging
Assembly
GcDocs.Imaging.dll

Represents a palette color for an indexed bitmap.

public struct PaletteEntry : IEquatable<PaletteEntry>, IFormattable
Implements
System.IEquatable<T><PaletteEntry>
System.IFormattable
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

PaletteEntry(int, int, int, int)

Creates a PaletteEntry with given (premultiplied by alpha) values for the color channels.

public PaletteEntry(int r, int g, int b, int a)

Parameters

r int

The Red channel value (0..65535), premultiplied by the associated alpha component.

g int

The Green channel value (0..65535), premultiplied by the associated alpha component.

b int

The Blue channel value (0..65535), premultiplied by the associated alpha component.

a int

The Alpha channel value (0..65535).

PaletteEntry(int, int, int)

Creates a PaletteEntry with given values for the color channels.

public PaletteEntry(int r, int g, int b)

Parameters

r int

The Red channel value (0..65535).

g int

The Green channel value (0..65535).

b int

The Blue channel value (0..65535).

Properties

A

Gets or sets a value of the Alpha channel (if applicable).

public ushort A { get; set; }

Property Value

ushort

B

Gets or sets a value of the Blue channel.

If applicable, the value must be premultiplied by the associated alpha component.

public ushort B { get; set; }

Property Value

ushort

G

Gets or sets a value of the Green channel.

If applicable, the value must be premultiplied by the associated alpha component.

public ushort G { get; set; }

Property Value

ushort

R

Gets or sets a value of the Red channel.

If applicable, the value must be premultiplied by the associated alpha component.

public ushort R { get; set; }

Property Value

ushort

Methods

Equals(PaletteEntry)

Determines whether the specified PaletteEntry is equal to this instance.

public bool Equals(PaletteEntry other)

Parameters

other PaletteEntry

Returns

bool

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object value)

Parameters

value object

Returns

bool

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

ToString(IFormatProvider)

Returns a string that represents this instance.

public string ToString(IFormatProvider formatProvider)

Parameters

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string, IFormatProvider)

Returns a string that represents this instance.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format.

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string)

Returns a string that represents this instance.

public string ToString(string format)

Parameters

format string

The format.

Returns

string

A string that represents this instance.

Operators

operator ==(PaletteEntry, PaletteEntry)

Determines if the specified values are equal.

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

Parameters

left PaletteEntry
right PaletteEntry

Returns

bool

operator !=(PaletteEntry, PaletteEntry)

Determines if the specified values are not equal.

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

Parameters

left PaletteEntry
right PaletteEntry

Returns

bool