#include <mi32/color.h>
Public Types | |
| enum | FLAGS { STATUS_ValueSet = 0x0001, STATUS_Reserved = 0x0004, STATUS_Invisible = 0x0008, STATUS_ICMCorrected = 0x0020, STATUS_NonRGB = 0x0080, MASK_Compare = 0xFFE9, MASK_CompareNoTransp = 0x00E5, MASK_Transparency = 0xFF00, LEGACY_Invalid = 0xFFFF } |
| enum | NAME { BLACK = 0x00000000, RED = 0x000000FF, GREEN = 0x0000FF00, BLUE = 0x00FF0000, CYAN = 0x00FFFF00, MAGENTA = 0x00FF00FF, YELLOW = 0x0000FFFF, GRAY25 = 0x003F3F3F, GRAY50 = 0x007F7F7F, GRAY75 = 0x00BFBFBF, GRAY = GRAY50, ORANGE = 0x0000A5FF, BROWN = 0x00A52A2A, PURPLE = 0x00A020F0, DARKRED = 0x00000080, DARKGREEN = 0x00008000, DARKBLUE = 0x00800000, DARKCYAN = 0x00808000, DARKMAGENTA = 0x00A000A0, DARKYELLOW = 0x00008080, FORESTGREEN = 0x00228B22, WHITE = 0x00FFFFFF } |
Public Member Functions | |
| void | Blend (const COLOR &other, UINT8 alpha=128) |
| void | Clear () |
| COLOR (NAME name) | |
| COLOR (UINT32 ColorRef) | |
| COLOR (UINT16 red, UINT16 green, UINT16 blue) | |
| COLOR () | |
| UINT16 | GetBlue (UINT16 range) const |
| UINT16 | GetBlue () const |
| UINT8 | GetBlueByte () const |
| ERRVALUE | GetByColorSpace (COLORSPACE colorspace, void *values) const |
| COLORMODEL | GetColorModel () const |
| UINT32 | GetColorRef () const |
| UINT16 | GetGreen (UINT16 range) const |
| UINT16 | GetGreen () const |
| UINT8 | GetGreenByte () const |
| UINT8 | GetOpacity () const |
| UINT16 | GetRed (UINT16 range) const |
| UINT16 | GetRed () const |
| UINT8 | GetRedByte () const |
| void | GetRGB (UINT16 &red, UINT16 &green, UINT16 &blue) const |
| UINT8 | GetTransparency () const |
| bool | HasTransparency () const |
| bool | HasValue () const |
| bool | IsEqualNoTransp (const COLOR &rhs) const |
| bool | IsEqualTo (const COLOR &rhs) const |
| bool | IsICMCorrected () const |
| bool | IsInvisible () const |
| bool | IsReserved () const |
| COLOR & | operator= (COLOR::NAME name) |
| void | SerialGetString (char *string) const |
| void | SerialSetString (const char *string) |
| ERRVALUE | SetByColorSpace (COLORSPACE colorspace, const void *values) |
| bool | SetByName (const char *string) |
| void | SetCMY (int cyan, int magenta, int yellow, int range) |
| void | SetCMYK (int cyan, int magenta, int yellow, int black, int range) |
| void | SetColorRef (UINT32 ColorRef) |
| void | SetIsICMCorrected (bool bCorrected) |
| void | SetOpacity (UINT8 opacity) |
| void | SetReserved (bool reserved=true) |
| void | SetRGB (int red, int green, int blue, int range) |
| void | SetRGB (const COLOR &color) |
| void | SetRGB (UINT16 red, UINT16 green, UINT16 blue) |
| void | SetTransparency (UINT8 transparency) |
| void | Validate () |
This structure is stored in files and will never change in size.
Definition at line 207 of file color.h.
|
|
|
|
|
Enumerated color names.
|
|
|
Default constructor.
|
|
||||||||||||||||
|
Construct with specified red, green, blue values.
|
|
|
Construct by color reference.
|
|
|
Construct by enumerated name.
|
|
||||||||||||
|
Blend this color with another color. The range of values for alpha is 0-255.
|
|
|
Clear current color setting.
|
|
|
Get Blue in range specified.
|
|
|
Get Blue as UINT16 (0-65535).
|
|
|
Get Blue as byte (0-255).
|
|
||||||||||||
|
Get values in specified COLORSPACE. For colorspaces containing an "alpha" component, "alpha" is considered to be "opacity". Binary, grayscale and indexed colorspaces are not supported and an error will be returned for such.
|
|
|
|
|
|
Get WIN32 color reference (0x00BBGGRR).
|
|
|
Get Green in range specified.
|
|
|
Get Green as UINT16 (0-65535).
|
|
|
Get Green as byte (0-255).
|
|
|
Get opacity value (0-255).
|
|
|
Get Red in range specified.
|
|
|
Get Red as UINT16 (0-65535).
|
|
|
Get Red as byte (0-255).
|
|
||||||||||||||||
|
Get Red, Green, Blue values in single call for efficiency.
|
|
|
Retrieve transparency value.
|
|
|
Determine if has any transparency value (including invisible).
|
|
|
Determine if a color value has been set.
|
|
|
Compare colors for equality, excluding transparency settings.
|
|
|
Compare colors for equality, including transparency, etc.
|
|
|
Determine if the color has been run through an ICM transformation. This is used to insure that the same color isn't translated more than once. |
|
|
Determine if color is 'invisible' (100% transparent).
|
|
|
Determine if color is 'reserved' for application-specific use. In color search and allocation operations 'reserved' colors are not used or changed. |
|
|
Assign by enumerated name. Original flag and transparency values are retained. |
|
|
Get as string for serializer writing.
|
|
|
Set from string for serializer reading.
|
|
||||||||||||
|
Set values using specified COLORSPACE. For colorspaces containing an "alpha" component, "alpha" is considered to be "opacity". Binary, grayscale and indexed colorspaces are not supported and an error will be returned for such.
|
|
|
Set color by name string.
|
|
||||||||||||||||||||
|
Set from Cyan, Magenta, Yellow in specified range.
|
|
||||||||||||||||||||||||
|
Set from Cyan, Magenta, Yellow, Black in specified range.
|
|
|
Set red, green, blue values from WIN32 color reference (0x00BBGGRR). Original flag and transparency values are retained. |
|
|
Specify whether the color has been run through an ICM transformation. This is used to insure that the same color isn't translated more than once. Of course there's no way to specify which target profile it's been corrected to. ICM-corrected colors should never be stored in files unless the whole file is corrected to some target device profile. |
|
|
Set opacity value.
|
|
|
Set whether color is 'reserved' or not.
|
|
||||||||||||||||||||
|
Set from Red, Green, Blue in specified range. Values outside the range will be limited to the range specified.
|
|
|
Set red, green, blue values from COLOR. Original flag and transparency values are retained. |
|
||||||||||||||||
|
Set red, green, blue values in range 0-65535. Original flag and transparency values are retained. |
|
|
Set transparency value.
|
|
|
Validate status for some legacy stored color instances.
|
1.3.8-20040913