Preparation for color printing

this patch adds a 3rd column to the media array of rgba so we now have one
each for screen, b/w & color printing. I have defaulted to using the
same color printing & screen, but this can be altered anytime.

I have checked that the application still compiles and prints.  The print
out (colour option selected) shows the deco ceiling steps in pink but
everything else appears grey scale. Further work will be required to apply
the colours to the print out, although I'm not yet sure what that involves.

Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Amit Chaudhuri 2013-02-11 20:49:39 +00:00 committed by Dirk Hohndel
parent 438299ff55
commit 698a6c5345

View file

@ -77,62 +77,62 @@ typedef enum {
} color_indice_t; } color_indice_t;
typedef struct { typedef struct {
/* media[0] is screen, and media[1] is printer */ /* media[0] is screen, media[1] is b/w printer media[2] is color printer */
struct rgba { struct rgba {
double r,g,b,a; double r,g,b,a;
} media[2]; } media[3];
} color_t; } color_t;
/* [color indice] = {{screen color, printer color}} */ /* [color indice] = {{screen color, b/w printer color, color printer}} printer & screen colours could be different */
static const color_t profile_color[] = { static const color_t profile_color[] = {
[SAC_1] = {{FUNGREEN1, BLACK1_LOW_TRANS}}, [SAC_1] = {{FUNGREEN1, BLACK1_LOW_TRANS, FUNGREEN1}},
[SAC_2] = {{APPLE1, BLACK1_LOW_TRANS}}, [SAC_2] = {{APPLE1, BLACK1_LOW_TRANS, APPLE1}},
[SAC_3] = {{ATLANTIS1, BLACK1_LOW_TRANS}}, [SAC_3] = {{ATLANTIS1, BLACK1_LOW_TRANS, ATLANTIS1}},
[SAC_4] = {{ATLANTIS2, BLACK1_LOW_TRANS}}, [SAC_4] = {{ATLANTIS2, BLACK1_LOW_TRANS, ATLANTIS2}},
[SAC_5] = {{EARLSGREEN1, BLACK1_LOW_TRANS}}, [SAC_5] = {{EARLSGREEN1, BLACK1_LOW_TRANS, EARLSGREEN1}},
[SAC_6] = {{HOKEYPOKEY1, BLACK1_LOW_TRANS}}, [SAC_6] = {{HOKEYPOKEY1, BLACK1_LOW_TRANS, HOKEYPOKEY1}},
[SAC_7] = {{TUSCANY1, BLACK1_LOW_TRANS}}, [SAC_7] = {{TUSCANY1, BLACK1_LOW_TRANS, TUSCANY1}},
[SAC_8] = {{CINNABAR1, BLACK1_LOW_TRANS}}, [SAC_8] = {{CINNABAR1, BLACK1_LOW_TRANS, CINNABAR1}},
[SAC_9] = {{REDORANGE1, BLACK1_LOW_TRANS}}, [SAC_9] = {{REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1}},
[VELO_STABLE] = {{CAMARONE1, BLACK1_LOW_TRANS}}, [VELO_STABLE] = {{CAMARONE1, BLACK1_LOW_TRANS, CAMARONE1}},
[VELO_SLOW] = {{LIMENADE1, BLACK1_LOW_TRANS}}, [VELO_SLOW] = {{LIMENADE1, BLACK1_LOW_TRANS, LIMENADE1}},
[VELO_MODERATE] = {{RIOGRANDE1, BLACK1_LOW_TRANS}}, [VELO_MODERATE] = {{RIOGRANDE1, BLACK1_LOW_TRANS, RIOGRANDE1}},
[VELO_FAST] = {{PIRATEGOLD1, BLACK1_LOW_TRANS}}, [VELO_FAST] = {{PIRATEGOLD1, BLACK1_LOW_TRANS, PIRATEGOLD1}},
[VELO_CRAZY] = {{RED1, BLACK1_LOW_TRANS}}, [VELO_CRAZY] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PO2] = {{APPLE1, APPLE1_MED_TRANS}}, [PO2] = {{APPLE1, APPLE1_MED_TRANS, APPLE1}},
[PO2_ALERT] = {{RED1, APPLE1_MED_TRANS}}, [PO2_ALERT] = {{RED1, APPLE1_MED_TRANS, RED1}},
[PN2] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}}, [PN2] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}},
[PN2_ALERT] = {{RED1, BLACK1_LOW_TRANS}}, [PN2_ALERT] = {{RED1, BLACK1_LOW_TRANS, RED1}},
[PHE] = {{PEANUT, PEANUT_MED_TRANS}}, [PHE] = {{PEANUT, PEANUT_MED_TRANS, PEANUT}},
[PHE_ALERT] = {{RED1, PEANUT_MED_TRANS}}, [PHE_ALERT] = {{RED1, PEANUT_MED_TRANS, RED1}},
[PP_LINES] = {{BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS}}, [PP_LINES] = {{BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS, BLACK1_HIGH_TRANS}},
[TEXT_BACKGROUND] = {{CONCRETE1_LOWER_TRANS, WHITE1}}, [TEXT_BACKGROUND] = {{CONCRETE1_LOWER_TRANS, WHITE1, CONCRETE1_LOWER_TRANS}},
[ALERT_BG] = {{BROOM1_LOWER_TRANS, BLACK1_LOW_TRANS}}, [ALERT_BG] = {{BROOM1_LOWER_TRANS, BLACK1_LOW_TRANS, BROOM1_LOWER_TRANS}},
[ALERT_FG] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}}, [ALERT_FG] = {{BLACK1_LOW_TRANS, BLACK1_LOW_TRANS, BLACK1_LOW_TRANS}},
[EVENTS] = {{REDORANGE1, BLACK1_LOW_TRANS}}, [EVENTS] = {{REDORANGE1, BLACK1_LOW_TRANS, REDORANGE1}},
[SAMPLE_DEEP] = {{PERSIANRED1, BLACK1_LOW_TRANS}}, [SAMPLE_DEEP] = {{PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1}},
[SAMPLE_SHALLOW] = {{PERSIANRED1, BLACK1_LOW_TRANS}}, [SAMPLE_SHALLOW] = {{PERSIANRED1, BLACK1_LOW_TRANS, PERSIANRED1}},
[SMOOTHED] = {{REDORANGE1_HIGH_TRANS, BLACK1_LOW_TRANS}}, [SMOOTHED] = {{REDORANGE1_HIGH_TRANS, BLACK1_LOW_TRANS, REDORANGE1_HIGH_TRANS}},
[MINUTE] = {{MEDIUMREDVIOLET1_HIGHER_TRANS, BLACK1_LOW_TRANS}}, [MINUTE] = {{MEDIUMREDVIOLET1_HIGHER_TRANS, BLACK1_LOW_TRANS, MEDIUMREDVIOLET1_HIGHER_TRANS}},
[TIME_GRID] = {{WHITE1, TUNDORA1_MED_TRANS}}, [TIME_GRID] = {{WHITE1, TUNDORA1_MED_TRANS, WHITE1}},
[TIME_TEXT] = {{FORESTGREEN1, BLACK1_LOW_TRANS}}, [TIME_TEXT] = {{FORESTGREEN1, BLACK1_LOW_TRANS, FORESTGREEN1}},
[DEPTH_GRID] = {{WHITE1, TUNDORA1_MED_TRANS}}, [DEPTH_GRID] = {{WHITE1, TUNDORA1_MED_TRANS, WHITE1}},
[MEAN_DEPTH] = {{REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS}}, [MEAN_DEPTH] = {{REDORANGE1_MED_TRANS, BLACK1_LOW_TRANS, REDORANGE1_MED_TRANS}},
[DEPTH_BOTTOM] = {{GOVERNORBAY1_MED_TRANS, TUNDORA1_MED_TRANS}}, [DEPTH_BOTTOM] = {{GOVERNORBAY1_MED_TRANS, TUNDORA1_MED_TRANS, GOVERNORBAY1_MED_TRANS}},
[DEPTH_TOP] = {{MERCURY1_MED_TRANS, WHITE1_MED_TRANS}}, [DEPTH_TOP] = {{MERCURY1_MED_TRANS, WHITE1_MED_TRANS, MERCURY1_MED_TRANS}},
[TEMP_TEXT] = {{GOVERNORBAY2, BLACK1_LOW_TRANS}}, [TEMP_TEXT] = {{GOVERNORBAY2, BLACK1_LOW_TRANS, GOVERNORBAY2}},
[TEMP_PLOT] = {{ROYALBLUE2_LOW_TRANS, BLACK1_LOW_TRANS}}, [TEMP_PLOT] = {{ROYALBLUE2_LOW_TRANS, BLACK1_LOW_TRANS, ROYALBLUE2_LOW_TRANS}},
[SAC_DEFAULT] = {{WHITE1, BLACK1_LOW_TRANS}}, [SAC_DEFAULT] = {{WHITE1, BLACK1_LOW_TRANS, WHITE1}},
[BOUNDING_BOX] = {{WHITE1, BLACK1_LOW_TRANS}}, [BOUNDING_BOX] = {{WHITE1, BLACK1_LOW_TRANS, WHITE1}},
[PRESSURE_TEXT] = {{KILLARNEY1, BLACK1_LOW_TRANS}}, [PRESSURE_TEXT] = {{KILLARNEY1, BLACK1_LOW_TRANS, KILLARNEY1}},
[BACKGROUND] = {{SPRINGWOOD1, BLACK1_LOW_TRANS}}, [BACKGROUND] = {{SPRINGWOOD1, BLACK1_LOW_TRANS, SPRINGWOOD1}},
[CEILING_SHALLOW] = {{REDORANGE1_HIGH_TRANS, REDORANGE1_HIGH_TRANS}}, [CEILING_SHALLOW] = {{REDORANGE1_HIGH_TRANS, REDORANGE1_HIGH_TRANS, REDORANGE1_HIGH_TRANS}},
[CEILING_DEEP] = {{RED1_MED_TRANS, RED1_MED_TRANS}}, [CEILING_DEEP] = {{RED1_MED_TRANS, RED1_MED_TRANS, RED1_MED_TRANS}},
[CALC_CEILING_SHALLOW] = {{FUNGREEN1_HIGH_TRANS, FUNGREEN1_HIGH_TRANS}}, [CALC_CEILING_SHALLOW] = {{FUNGREEN1_HIGH_TRANS, FUNGREEN1_HIGH_TRANS, FUNGREEN1_HIGH_TRANS}},
[CALC_CEILING_DEEP] = {{APPLE1_HIGH_TRANS, APPLE1_HIGH_TRANS}}, [CALC_CEILING_DEEP] = {{APPLE1_HIGH_TRANS, APPLE1_HIGH_TRANS, APPLE1_HIGH_TRANS}},
}; };