/* * File: colors.h * Project: DXF to RIB * (c) SPDsoft Tuesday, June 21, 1994, GTIC */ /* * Color table for dxf "Color number" entries * 4 spaces/tab */ #define MAX_COLOR 9 #define DEF_COLOR 7 #define get_red(a) (color_table[a>MAX_COLOR?DEF_COLOR:a][0]) #define get_green(a) (color_table[a>MAX_COLOR?DEF_COLOR:a][1]) #define get_blue(a) (color_table[a>MAX_COLOR?DEF_COLOR:a][2]) static float color_table[256][3]= { /* r g b */ { 0.0, 0.0, 0.0 }, /* Black */ { 1.0, 0.0, 0.0 }, /* Red */ { 1.0, 1.0, 0.0 }, /* Yellow */ { 0.0, 1.0, 0.0 }, /* Green */ { 0.0, 1.0, 1.0 }, /* Cyan */ { 0.0, 0.0, 1.0 }, /* Blue */ { 1.0, 0.0, 1.0 }, /* Magenta */ { 1.0, 1.0, 1.0 }, /* White */ { 0.5, 0.5, 0.5 }, /* Dark Grey */ { 0.75, 0.75, 0.75 }, /* Light Grey */ };