[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.WIC.Palette

Class Palette

Namespace
GrapeCity.Documents.DX.WIC
Assembly
GcDocs.DX.Windows.dll

IWICPalette

[Guid("00000040-a8f2-4877-ba0a-fd2b6645fb94")]
public class Palette : ComObject, IDisposable, IUnknown
Inheritance
object
Palette
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Palette(IntPtr)

Initializes a new instance of the Palette class.

public Palette(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Colors

Gets the colors.

public int[] Colors { get; }

Property Value

int[]

Methods

Create(ImagingFactory)

Initializes a new instance of the Palette class.

public static Palette Create(ImagingFactory factory)

Parameters

factory ImagingFactory

The factory.

Returns

Palette

GetColorCount()

HRESULT IWICPalette::GetColorCount([Out] unsigned int* pcCount)

public int GetColorCount()

Returns

int

GetColors(int, IntPtr)

HRESULT IWICPalette::GetColors([In] unsigned int cCount,[Out, Buffer] void* pColors,[Out] unsigned int* pcActualColors)

public int GetColors(int count, IntPtr colorsRef)

Parameters

count int
colorsRef System.IntPtr

Returns

int

GetTypeInfo()

HRESULT IWICPalette::GetType([Out] WICBitmapPaletteType* pePaletteType)

public BitmapPaletteType GetTypeInfo()

Returns

BitmapPaletteType

HasAlpha()

HRESULT IWICPalette::HasAlpha([Out] BOOL* pfHasAlpha)

public bool HasAlpha()

Returns

bool

Initialize(ColorF[])

Initializes with the specified colors.

public void Initialize(ColorF[] colors)

Parameters

colors ColorF[]

The colors.

Initialize(BitmapPaletteType, Bool)

HRESULT IWICPalette::InitializePredefined([In] WICBitmapPaletteType ePaletteType,[In] BOOL fAddTransparentColor)

public void Initialize(BitmapPaletteType ePaletteType, Bool fAddTransparentColor)

Parameters

ePaletteType BitmapPaletteType
fAddTransparentColor Bool

Initialize(BitmapSource, int, Bool)

HRESULT IWICPalette::InitializeFromBitmap([In] IWICBitmapSource* pISurface,[In] unsigned int cCount,[In] BOOL fAddTransparentColor)

public void Initialize(BitmapSource surfaceRef, int count, Bool fAddTransparentColor)

Parameters

surfaceRef BitmapSource
count int
fAddTransparentColor Bool

Initialize(Palette)

HRESULT IWICPalette::InitializeFromPalette([In, Optional] IWICPalette* pIPalette)

public void Initialize(Palette paletteRef)

Parameters

paletteRef Palette

Initialize(int[])

Initializes with the specified colors.

public void Initialize(int[] colors)

Parameters

colors int[]

The colors.

Initialize(IntPtr, int)

HRESULT IWICPalette::InitializeCustom([In, Buffer] void* pColors,[In] unsigned int cCount)

public void Initialize(IntPtr colorsRef, int count)

Parameters

colorsRef System.IntPtr
count int

IsBlackWhite()

HRESULT IWICPalette::IsBlackWhite([Out] BOOL* pfIsBlackWhite)

public bool IsBlackWhite()

Returns

bool

IsGrayscale()

HRESULT IWICPalette::IsGrayscale([Out] BOOL* pfIsGrayscale)

public bool IsGrayscale()

Returns

bool

Operators

explicit operator Palette(IntPtr)

Performs an explicit conversion from System.IntPtr to Palette.

public static explicit operator Palette(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Palette