GdipSetImageAttributesRemapTable

 

 

Description

Sets the color-remap table for a specified category.

Syntax

GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(

    GpImageAttributes *imageattr,

    ColorAdjustType type,

    BOOL enableFlag,

    UINT mapSize,

    GDIPCONST ColorMap *map

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetImageAttributesRemapTable ( _

    BYVAL imageattr AS DWORD, _

    BYVAL pType AS LONG, _

    BYVAL enableFlag AS LONG, _

    BYVAL mapSize AS DWORD, _

    BYREF map AS ColorMap _

) AS LONG

Parameters

 

imageattr

[in] Pointer to the ImageAttributes object.

type

[in] Element of the ColorAdjustType enumeration that specifies the category for which the color-remap table is set. The default value is ColorAdjustTypeDefault.

enableFlag

[in]  Boolean value that specifies whether a separate color remap table is enabled for the category specified by the type parameter.

mapSize

[in] Long integer value that specifies the number of elements in the map array.

map

[in] Pointer to an array of ColorMap structures that defines the color map.

Remarks

A color-remap table is an array of ColorMap structures. Each ColorMap structure has two ARGB colors: one that specifies an old color and one that specifies a corresponding new color. During rendering, any color that matches one of the old colors in the remap table is changed to the corresponding new color.

 

An ImageAttributes object maintains color and grayscale settings for five adjustment categories: default, bitmap, brush, pen, and text. For example, you can specify a color remap for the default category, a color-remap table for the bitmap category, and still a different color-remap table for the pen category.

 

The default color- and grayscale-adjustment settings apply to all categories that don't have adjustment settings of their own. For example, if you never specify any adjustment settings for the pen category, then the default settings apply to the pen category.

 

As soon as you specify a color- or grayscale-adjustment setting for a certain category, the default adjustment settings no longer apply to that category. For example, suppose you specify a collection of adjustment settings for the default category. If you set the color-remap table for the pen category by passing ColorAdjustTypePen to the GdipSetImageAttributesRemapTable function, then none of the default adjustment settings will apply to pens.

 

Valid HTML 4.01 Transitional