#include <HxRgbLabel.h>
Public Types | |
| typedef ValDoubleT | ArithTypeDouble |
| The "double" arithtype. More... | |
Public Methods | |
| HxRgbLabel (HxTagList &) | |
| Constructor : creates LUT. More... | |
| int | doIt (const ValT &pixV) |
| Actual operation for the "standard" arithtype. More... | |
| int | doItDouble (const ValDoubleT &pixV) |
| Actual operation for the "double" arithtype. More... | |
Static Public Methods | |
| HxString | className () |
| The name : "Label". More... | |
PixV is mapped onto 1 of 8 colors.
|
|||||
|
The "double" arithtype.
|
|
||||||||||
|
Constructor : creates LUT.
00058 {
00059 colorTable[0] = (255 << 24) | (127 << 16) | (127 << 8) | 127; // 50% grey
00060 colorTable[1] = (255 << 24) | (255 << 16) | ( 0 << 8) | 0; // red
00061 colorTable[2] = (255 << 24) | ( 0 << 16) | (255 << 8) | 0; // green
00062 colorTable[3] = (255 << 24) | (255 << 16) | (255 << 8) | 0; // yellow
00063 colorTable[4] = (255 << 24) | ( 0 << 16) | ( 0 << 8) | 255; // blue
00064 colorTable[5] = (255 << 24) | (255 << 16) | ( 0 << 8) | 255; // magenta
00065 colorTable[6] = (255 << 24) | ( 0 << 16) | (255 << 8) | 255; // cyan
00066 colorTable[7] = (255 << 24) | (255 << 16) | (255 << 8) | 255; // white
00067 colorTable[8] = (255 << 24) | ( 0 << 16) | ( 0 << 8) | 0; // black
00068 }
|
|
||||||||||
|
Actual operation for the "standard" arithtype.
00033 {
00034 int pix = (int) pixV.x();
00035 int mask = (pix == 0) ? 8 : pix % 8;
00036 return colorTable[mask];
00037 }
|
|
||||||||||
|
Actual operation for the "double" arithtype.
00041 {
00042 int pix = (int) pixV.x();
00043 int mask = (pix == 0) ? 8 : pix % 8;
00044 return colorTable[mask];
00045 }
|
|
|||||||||
|
The name : "Label".
00049 { return HxString("Label"); }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001