Microsoft SDK for Java

createPalette

The createPalette method of the DirectDraw Class contains the following signatures:

createPalette(int flags, byte[] pe)
createPalette(int flags)
createPalette(int flags, Color[] pe)
createPalette(int flags, PaletteEntry[] pe)

createPalette(int flags, byte[] pe)

Creates a DirectDrawPalette object for this DirectDraw object.

Syntax

public DirectDrawPalette createPalette(int flags, byte[] pe);

Return Value

Returns the DirectDrawPalette object if successful; otherwise, returns null.

Parameters

flags One or more values of the DDPCAPS_ type.
pe The array variable that contains the data describing the initial value for each palette entry.

createPalette(int flags)

Creates a palette and fills it with standard halftone entries.

Syntax

public DirectDrawPalette createPalette(int flags);

Return Value

Returns the DirectDrawPalette object if successful; otherwise, returns null. Currently, only DDPCAPS_8BIT and DDPCAPS_INITIALIZE are valid arguments for the flags parameter.

Parameters

flags One or more values of DDPCAPS_ type.

createPalette(int flags, Color[] pe)

Creates a DirectDrawPalette object for this DirectDraw object.

Syntax

public DirectDrawPalette createPalette(int flags, Color[] pe);

Return Value

Returns the DirectDrawPalette object if successful; otherwise, returns null.

Parameters

flags One or more values of the DDPCAPS_ type.
pe The array variable that contains the data describing the initial color value for each palette entry.

createPalette(int flags, PaletteEntry[] pe)

Creates a DirectDrawPalette object for this DirectDraw object.

Syntax

public DirectDrawPalette createPalette(int flags, PaletteEntry[] pe);

Return Value

Returns the DirectDrawPalette object if successful; otherwise, returns null.

Parameters

flags One or more values of DDPCAPS_ type.
pe The array variable that contains a PaletteEntry object describing each palette entry.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.