00001
00002 #include "Gdata.h"
00003 #include "NiToolWin.h"
00004
00005
00006 using namespace jbxl;
00007 using namespace jbxwl;
00008
00009
00011
00012
00013 void jbxwl::NiSetUserColor(int label, uByte* ptr, BOOL use_image)
00014 {
00015 if (label==1) {
00016 if (!use_image) ptr[0] = ptr[1] = 0;
00017 ptr[2] = NI_DETECT_COLOR_BRIGHT;
00018 }
00019 else if (label==2) {
00020 if (!use_image) ptr[0] = ptr[2] = 0;
00021 ptr[1] = NI_DETECT_COLOR_BRIGHT;
00022 }
00023 else if (label==3) {
00024 if (!use_image) ptr[1] = ptr[2] = 0;
00025 ptr[0] = NI_DETECT_COLOR_BRIGHT;
00026 }
00027 else if (label==4) {
00028 if (!use_image) ptr[2] = 0;
00029 ptr[0] = ptr[1] = NI_DETECT_COLOR_BRIGHT;
00030 }
00031 else if (label==5) {
00032 if (!use_image) ptr[1] = 0;
00033 ptr[0] = ptr[2] = NI_DETECT_COLOR_BRIGHT;
00034 }
00035 else {
00036 if (!use_image) ptr[0] = 0;
00037 ptr[1] = ptr[2] = NI_DETECT_COLOR_BRIGHT;
00038 }
00039
00040 return;
00041 }
00042
00043
00044
00045 unsigned int jbxwl::NiGetSkeletonColor(int label)
00046 {
00047 unsigned int col;
00048
00049 if (label==1) {
00050 col = BGRA2Int(255, 255, 255-NI_DETECT_COLOR_BRIGHT, 0);
00051 }
00052 else if (label==2) {
00053 col = BGRA2Int(255, 255-NI_DETECT_COLOR_BRIGHT, 255, 0);
00054 }
00055 else if (label==3) {
00056 col = BGRA2Int(255-NI_DETECT_COLOR_BRIGHT, 255, 255, 0);
00057 }
00058 else if (label==4) {
00059 col = BGRA2Int(255-NI_DETECT_COLOR_BRIGHT, 255-NI_DETECT_COLOR_BRIGHT, 255, 0);
00060 }
00061 else if (label==5) {
00062 col = BGRA2Int(255-NI_DETECT_COLOR_BRIGHT, 255, 255-NI_DETECT_COLOR_BRIGHT, 0);
00063 }
00064 else {
00065 col = BGRA2Int(255, 255-NI_DETECT_COLOR_BRIGHT, 255-NI_DETECT_COLOR_BRIGHT, 0);
00066 }
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 return col;
00090 }
00091
00092