导航:  GdiPlus Classes > Structures >

ColorMap

上一页返回章节概述下一页

The ColorMap structure contains two COLORREF values. Several of the  ImageAttributes functions adjust image colors by using a color remap table, which is an array of ColorMap structures.

 

C++ Syntax

 

typedef struct {

Color爋ldColor;

Color爊ewColor;

} ColorMap;

 

FreeBASIC 语法

 

TYPE ColorMap

oldColor AS Color

newColor AS Color

END TYPE

 

成员

 

oldColor

 

The original color.

 

newColor

 

The new color.

 

备注

 

Because the FreeBasic 32-bit headers don't define the GDI+ ColorMap structure ad use the GDI ColorMap one, that has different member names, there is a conflict. To solve it, I have defined an union that can be used to replace ColorMap in both 32 and 64-bit.

 

UNION GDIP_COLORMAP

  ' // For compatibility with GDI+

  TYPE

     oldColor AS COLORREF

     newColor AS COLORREF

  END TYPE

  ' // For compatibility with GDI

  TYPE

     from AS COLORREF

     to AS COLORREF

  END TYPE

END UNION