| 1 | #ifndef GUI_DRAW_H |
|---|
| 2 | #define GUI_DRAW_H |
|---|
| 3 | |
|---|
| 4 | #include "camera.h" // ensure the camera defintion is loaded |
|---|
| 5 | |
|---|
| 6 | #include "gui.h" // for color, coord definitions |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | // Common colors that are the same in all palettes |
|---|
| 10 | #define COLOR_TRANSPARENT 0x00 |
|---|
| 11 | #define COLOR_BLACK 0xFF |
|---|
| 12 | |
|---|
| 13 | //------------------------------------------------------------------- |
|---|
| 14 | |
|---|
| 15 | // Moved from gui_bench.c, gui_debug.c, gui_calendar.c, gui_reversi.c & gui_sokoban.c so it can be overridden |
|---|
| 16 | // Default value is white in SX30 & G12 palette making white text hard to read |
|---|
| 17 | #define SCREEN_COLOR 0xF7 |
|---|
| 18 | |
|---|
| 19 | //------------------------------------------------------------------- |
|---|
| 20 | |
|---|
| 21 | //------------------------------------------------------------------- |
|---|
| 22 | |
|---|
| 23 | #if CAM_BITMAP_PALETTE==1 |
|---|
| 24 | |
|---|
| 25 | // Default palette used unless overridden - see list of cameras using each palette below |
|---|
| 26 | |
|---|
| 27 | #define COLOR_WHITE 0x11 |
|---|
| 28 | #define COLOR_RED 0x22 |
|---|
| 29 | #define COLOR_GREY 0x3F |
|---|
| 30 | #define COLOR_GREEN 0x55 |
|---|
| 31 | #define COLOR_BLUE_LT 0xDD |
|---|
| 32 | #define COLOR_BLUE 0xDF |
|---|
| 33 | #define COLOR_YELLOW 0xEE |
|---|
| 34 | #define COLOR_BG 0x44 |
|---|
| 35 | #define COLOR_FG COLOR_WHITE |
|---|
| 36 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 37 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 38 | #define COLOR_ALT_BG 0xD4 |
|---|
| 39 | #define COLOR_SPLASH_RED 0x2E |
|---|
| 40 | #define COLOR_SPLASH_PINK 0x21 |
|---|
| 41 | #define COLOR_SPLASH_GREY 0x1F |
|---|
| 42 | // colors for blended histo |
|---|
| 43 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 44 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 45 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 46 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 47 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 48 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 49 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 50 | #define COLOR_HISTO_RB 0x66 |
|---|
| 51 | #define COLOR_HISTO_RB_PLAY 0xE2 |
|---|
| 52 | #define COLOR_HISTO_B_PLAY 0xCC |
|---|
| 53 | #define COLOR_HISTO_BG_PLAY 0x99 |
|---|
| 54 | #define COLOR_HISTO_RG_PLAY 0x66 |
|---|
| 55 | |
|---|
| 56 | // Icon colors |
|---|
| 57 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 58 | // Separate definitions for record and playback mode |
|---|
| 59 | // to cater for cameras with variable palettes |
|---|
| 60 | #if defined(CAMERA_ixus70_sd1000) || defined(CAMERA_ixus75_sd750) |
|---|
| 61 | #define COLOR_ICON_REC_RED 0x88 |
|---|
| 62 | #define COLOR_ICON_REC_RED_DK 0x83 |
|---|
| 63 | #define COLOR_ICON_REC_RED_LT 0x81 |
|---|
| 64 | #define COLOR_ICON_REC_GREEN 0x55 |
|---|
| 65 | #define COLOR_ICON_REC_GREEN_DK 0x53 |
|---|
| 66 | #define COLOR_ICON_REC_GREEN_LT 0x51 |
|---|
| 67 | #define COLOR_ICON_REC_YELLOW 0x66 |
|---|
| 68 | #define COLOR_ICON_REC_YELLOW_DK 0x36 |
|---|
| 69 | #define COLOR_ICON_REC_YELLOW_LT 0x61 |
|---|
| 70 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 71 | #define COLOR_ICON_REC_GREY_DK 0x33 |
|---|
| 72 | #define COLOR_ICON_REC_GREY_LT 0x11 |
|---|
| 73 | #endif |
|---|
| 74 | #if defined (CAMERA_a610) |
|---|
| 75 | #define COLOR_ICON_REC_RED 0x22 |
|---|
| 76 | #define COLOR_ICON_REC_RED_DK 0x2F |
|---|
| 77 | #define COLOR_ICON_REC_RED_LT 0x26 |
|---|
| 78 | #define COLOR_ICON_REC_GREEN 0x5F |
|---|
| 79 | #define COLOR_ICON_REC_GREEN_DK 0x25 |
|---|
| 80 | #define COLOR_ICON_REC_GREEN_LT 0x51 |
|---|
| 81 | #define COLOR_ICON_REC_YELLOW 0x9F |
|---|
| 82 | #define COLOR_ICON_REC_YELLOW_DK 0x9F |
|---|
| 83 | #define COLOR_ICON_REC_YELLOW_LT 0x99 |
|---|
| 84 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 85 | #define COLOR_ICON_REC_GREY_DK 0x33 |
|---|
| 86 | #define COLOR_ICON_REC_GREY_LT 0x13 |
|---|
| 87 | #endif |
|---|
| 88 | |
|---|
| 89 | #elif CAM_BITMAP_PALETTE==2 |
|---|
| 90 | |
|---|
| 91 | // Used by :- G10, IXUS95_SD1200, IXUS980_SD990 |
|---|
| 92 | |
|---|
| 93 | #define COLOR_WHITE 0xD3 |
|---|
| 94 | #define COLOR_RED 0x64 |
|---|
| 95 | #define COLOR_GREY 0x12 |
|---|
| 96 | #define COLOR_GREEN 0xC4 |
|---|
| 97 | #define COLOR_BLUE_LT 0x6A |
|---|
| 98 | #define COLOR_BLUE 0x87 |
|---|
| 99 | #define COLOR_YELLOW 0x44 |
|---|
| 100 | #define COLOR_BG 0x22 |
|---|
| 101 | #define COLOR_FG COLOR_WHITE |
|---|
| 102 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 103 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 104 | #define COLOR_ALT_BG 0x22 |
|---|
| 105 | #define COLOR_SPLASH_RED 0x58 |
|---|
| 106 | #define COLOR_SPLASH_PINK 0x4C |
|---|
| 107 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 108 | // colors for blended histo |
|---|
| 109 | // many of these probably wrong on this cam |
|---|
| 110 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 111 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 112 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 113 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 114 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 115 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 116 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 117 | #define COLOR_HISTO_RB 0x66 |
|---|
| 118 | #define COLOR_HISTO_RB_PLAY 0xE2 |
|---|
| 119 | #define COLOR_HISTO_B_PLAY 0xCC |
|---|
| 120 | #define COLOR_HISTO_BG_PLAY 0x99 |
|---|
| 121 | #define COLOR_HISTO_RG_PLAY 0x66 |
|---|
| 122 | #undef SCREEN_COLOR |
|---|
| 123 | #define SCREEN_COLOR 0x15 // try for a dark color in both record and play mode |
|---|
| 124 | |
|---|
| 125 | // Icon colors |
|---|
| 126 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 127 | // Separate definitions for record and playback mode |
|---|
| 128 | // to cater for cameras with variable palettes |
|---|
| 129 | #if defined (CAMERA_g10) |
|---|
| 130 | #define COLOR_ICON_REC_RED 0x5F |
|---|
| 131 | #define COLOR_ICON_REC_RED_DK 0x69 |
|---|
| 132 | #define COLOR_ICON_REC_RED_LT 0x55 |
|---|
| 133 | #define COLOR_ICON_REC_GREEN 0x80 |
|---|
| 134 | #define COLOR_ICON_REC_GREEN_DK 0x87 |
|---|
| 135 | #define COLOR_ICON_REC_GREEN_LT 0x79 |
|---|
| 136 | #define COLOR_ICON_REC_YELLOW 0x40 |
|---|
| 137 | #define COLOR_ICON_REC_YELLOW_DK 0x47 |
|---|
| 138 | #define COLOR_ICON_REC_YELLOW_LT 0x3D |
|---|
| 139 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 140 | #define COLOR_ICON_REC_GREY_DK 0x15 |
|---|
| 141 | #define COLOR_ICON_REC_GREY_LT 0x08 |
|---|
| 142 | #define COLOR_ICON_PLY_RED COLOR_ICON_REC_RED |
|---|
| 143 | #define COLOR_ICON_PLY_RED_DK COLOR_ICON_REC_RED_DK |
|---|
| 144 | #define COLOR_ICON_PLY_RED_LT COLOR_ICON_REC_RED_LT |
|---|
| 145 | #define COLOR_ICON_PLY_GREEN 0xCD |
|---|
| 146 | #define COLOR_ICON_PLY_GREEN_DK 0xD2 |
|---|
| 147 | #define COLOR_ICON_PLY_GREEN_LT 0xC4 |
|---|
| 148 | #define COLOR_ICON_PLY_YELLOW COLOR_ICON_REC_YELLOW |
|---|
| 149 | #define COLOR_ICON_PLY_YELLOW_DK COLOR_ICON_REC_YELLOW_DK |
|---|
| 150 | #define COLOR_ICON_PLY_YELLOW_LT COLOR_ICON_REC_YELLOW_LT |
|---|
| 151 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 152 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 153 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 154 | #endif |
|---|
| 155 | |
|---|
| 156 | #elif CAM_BITMAP_PALETTE==3 |
|---|
| 157 | |
|---|
| 158 | // Used by :- IXUS120_SD940, SX200IS |
|---|
| 159 | |
|---|
| 160 | #define COLOR_WHITE 0x01 |
|---|
| 161 | #define COLOR_RED 0x2B |
|---|
| 162 | #define COLOR_GREY 0x17 |
|---|
| 163 | #define COLOR_GREEN 0x99 |
|---|
| 164 | #define COLOR_BLUE_LT 0x2D |
|---|
| 165 | #define COLOR_BLUE 0x3B |
|---|
| 166 | #define COLOR_YELLOW 0x9A |
|---|
| 167 | #define COLOR_BG 0x81 |
|---|
| 168 | #define COLOR_FG COLOR_WHITE |
|---|
| 169 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 170 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 171 | #define COLOR_ALT_BG COLOR_GREY |
|---|
| 172 | #define COLOR_SPLASH_RED 0x29 |
|---|
| 173 | #define COLOR_SPLASH_PINK 0x1E |
|---|
| 174 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 175 | // colors for blended histo |
|---|
| 176 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 177 | #define COLOR_HISTO_R_PLAY COLOR_HISTO_R |
|---|
| 178 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 179 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 180 | #define COLOR_HISTO_G_PLAY COLOR_HISTO_G |
|---|
| 181 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 182 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 183 | #define COLOR_HISTO_RB COLOR_BLACK // there isn't purplish on this cam I guess |
|---|
| 184 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 185 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 186 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 187 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 188 | |
|---|
| 189 | // Icon colors |
|---|
| 190 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 191 | // Separate definitions for record and playback mode |
|---|
| 192 | // to cater for cameras with variable palettes |
|---|
| 193 | #if defined (CAMERA_sx200is) |
|---|
| 194 | #define COLOR_ICON_REC_RED 0x2C |
|---|
| 195 | #define COLOR_ICON_REC_RED_DK 0x2C |
|---|
| 196 | #define COLOR_ICON_REC_RED_LT 0x20 |
|---|
| 197 | #define COLOR_ICON_REC_GREEN 0x68 |
|---|
| 198 | #define COLOR_ICON_REC_GREEN_DK 0x68 |
|---|
| 199 | #define COLOR_ICON_REC_GREEN_LT 0x60 |
|---|
| 200 | #define COLOR_ICON_REC_YELLOW 0x8F |
|---|
| 201 | #define COLOR_ICON_REC_YELLOW_DK 0x93 |
|---|
| 202 | #define COLOR_ICON_REC_YELLOW_LT 0x87 |
|---|
| 203 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 204 | #define COLOR_ICON_REC_GREY_DK 0x15 |
|---|
| 205 | #define COLOR_ICON_REC_GREY_LT 0x10 |
|---|
| 206 | #define COLOR_ICON_PLY_RED COLOR_ICON_REC_RED |
|---|
| 207 | #define COLOR_ICON_PLY_RED_DK COLOR_ICON_REC_RED_DK |
|---|
| 208 | #define COLOR_ICON_PLY_RED_LT COLOR_ICON_REC_RED_LT |
|---|
| 209 | #define COLOR_ICON_PLY_GREEN 0xA0 |
|---|
| 210 | #define COLOR_ICON_PLY_GREEN_DK 0xA0 |
|---|
| 211 | #define COLOR_ICON_PLY_GREEN_LT 0xA0 |
|---|
| 212 | #define COLOR_ICON_PLY_YELLOW 0x6A |
|---|
| 213 | #define COLOR_ICON_PLY_YELLOW_DK 0x6C |
|---|
| 214 | #define COLOR_ICON_PLY_YELLOW_LT 0x66 |
|---|
| 215 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 216 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 217 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 218 | #endif |
|---|
| 219 | #if defined (CAMERA_ixus120_sd940) |
|---|
| 220 | #define COLOR_ICON_REC_RED 0xE7 |
|---|
| 221 | #define COLOR_ICON_REC_RED_DK 0xEA |
|---|
| 222 | #define COLOR_ICON_REC_RED_LT 0xE3 |
|---|
| 223 | #define COLOR_ICON_REC_GREEN 0x7F |
|---|
| 224 | #define COLOR_ICON_REC_GREEN_DK 0x86 |
|---|
| 225 | #define COLOR_ICON_REC_GREEN_LT 0x78 |
|---|
| 226 | #define COLOR_ICON_REC_YELLOW 0x92 |
|---|
| 227 | #define COLOR_ICON_REC_YELLOW_DK 0x87 |
|---|
| 228 | #define COLOR_ICON_REC_YELLOW_LT 0xA9 |
|---|
| 229 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 230 | #define COLOR_ICON_REC_GREY_DK 0x1A |
|---|
| 231 | #define COLOR_ICON_REC_GREY_LT 0x11 |
|---|
| 232 | |
|---|
| 233 | #define COLOR_ICON_PLY_RED 0x15 |
|---|
| 234 | #define COLOR_ICON_PLY_RED_DK 0x1E |
|---|
| 235 | #define COLOR_ICON_PLY_RED_LT 0x2c |
|---|
| 236 | #define COLOR_ICON_PLY_GREEN 0x9E |
|---|
| 237 | #define COLOR_ICON_PLY_GREEN_DK 0x9E |
|---|
| 238 | #define COLOR_ICON_PLY_GREEN_LT 0x9E |
|---|
| 239 | #define COLOR_ICON_PLY_YELLOW 0xCC |
|---|
| 240 | #define COLOR_ICON_PLY_YELLOW_DK 0xCD |
|---|
| 241 | #define COLOR_ICON_PLY_YELLOW_LT 0xCB |
|---|
| 242 | #define COLOR_ICON_PLY_GREY COLOR_GREY |
|---|
| 243 | #define COLOR_ICON_PLY_GREY_DK 0x1A |
|---|
| 244 | #define COLOR_ICON_PLY_GREY_LT 0x11 |
|---|
| 245 | #endif |
|---|
| 246 | |
|---|
| 247 | #elif CAM_BITMAP_PALETTE==4 |
|---|
| 248 | |
|---|
| 249 | // Used by :- G11, S90, SX120IS |
|---|
| 250 | |
|---|
| 251 | #define COLOR_WHITE 0x01 |
|---|
| 252 | #define COLOR_RED 0x2B |
|---|
| 253 | #define COLOR_GREY 0x17 |
|---|
| 254 | #define COLOR_GREEN 0x99 |
|---|
| 255 | #define COLOR_BLUE_LT 0xA9 |
|---|
| 256 | #define COLOR_BLUE 0xA1 |
|---|
| 257 | #define COLOR_YELLOW 0x9A |
|---|
| 258 | #define COLOR_BG 0x61 |
|---|
| 259 | #define COLOR_FG COLOR_WHITE |
|---|
| 260 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 261 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 262 | #define COLOR_ALT_BG COLOR_GREY |
|---|
| 263 | #define COLOR_SPLASH_RED 0x29 |
|---|
| 264 | #define COLOR_SPLASH_PINK 0x1E |
|---|
| 265 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 266 | // colors for blended histo |
|---|
| 267 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 268 | #define COLOR_HISTO_R_PLAY COLOR_HISTO_R |
|---|
| 269 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 270 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 271 | #define COLOR_HISTO_G_PLAY COLOR_HISTO_G |
|---|
| 272 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 273 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 274 | #define COLOR_HISTO_RB COLOR_BLACK // there isn't purplish on this cam I guess |
|---|
| 275 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 276 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 277 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 278 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 279 | |
|---|
| 280 | // Icon colors |
|---|
| 281 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 282 | // Separate definitions for record and playback mode |
|---|
| 283 | // to cater for cameras with variable palettes |
|---|
| 284 | #if defined (CAMERA_sx120is) |
|---|
| 285 | #define COLOR_ICON_REC_RED 0x1E |
|---|
| 286 | #define COLOR_ICON_REC_RED_DK 0xA0 |
|---|
| 287 | #define COLOR_ICON_REC_RED_LT 0x26 |
|---|
| 288 | #define COLOR_ICON_REC_GREEN 0x47 |
|---|
| 289 | #define COLOR_ICON_REC_GREEN_DK 0x4A |
|---|
| 290 | #define COLOR_ICON_REC_GREEN_LT 0x44 |
|---|
| 291 | #define COLOR_ICON_REC_YELLOW 0x69 |
|---|
| 292 | #define COLOR_ICON_REC_YELLOW_DK 0x9A |
|---|
| 293 | #define COLOR_ICON_REC_YELLOW_LT 0x78 |
|---|
| 294 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 295 | #define COLOR_ICON_REC_GREY_DK 0x10 |
|---|
| 296 | #define COLOR_ICON_REC_GREY_LT 0x19 |
|---|
| 297 | #define COLOR_ICON_PLY_RED 0x27 |
|---|
| 298 | #define COLOR_ICON_PLY_RED_DK 0x2C |
|---|
| 299 | #define COLOR_ICON_PLY_RED_LT 0x20 |
|---|
| 300 | #define COLOR_ICON_PLY_GREEN 0xCB |
|---|
| 301 | #define COLOR_ICON_PLY_GREEN_DK 0xCB |
|---|
| 302 | #define COLOR_ICON_PLY_GREEN_LT 0xCB |
|---|
| 303 | #define COLOR_ICON_PLY_YELLOW 0xBE |
|---|
| 304 | #define COLOR_ICON_PLY_YELLOW_DK 0x76 |
|---|
| 305 | #define COLOR_ICON_PLY_YELLOW_LT 0x5A |
|---|
| 306 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 307 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 308 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 309 | #endif |
|---|
| 310 | |
|---|
| 311 | #elif CAM_BITMAP_PALETTE==5 |
|---|
| 312 | |
|---|
| 313 | // Used by :- D10, IXUS100_SD780 |
|---|
| 314 | |
|---|
| 315 | #define COLOR_WHITE 0xD3 |
|---|
| 316 | #define COLOR_RED 0x6A |
|---|
| 317 | #define COLOR_GREY 0x12 |
|---|
| 318 | #define COLOR_GREEN 0xBF |
|---|
| 319 | #define COLOR_BLUE_LT 0x7C |
|---|
| 320 | #define COLOR_BLUE 0x90 |
|---|
| 321 | #define COLOR_YELLOW 0x53 |
|---|
| 322 | #define COLOR_BG 0x22 |
|---|
| 323 | #define COLOR_FG COLOR_WHITE |
|---|
| 324 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 325 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 326 | #define COLOR_ALT_BG 0x22 |
|---|
| 327 | #define COLOR_SPLASH_RED 0x72 |
|---|
| 328 | #define COLOR_SPLASH_PINK 0x5C |
|---|
| 329 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 330 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 331 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 332 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 333 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 334 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 335 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 336 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 337 | #define COLOR_HISTO_RB 0x72 |
|---|
| 338 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 339 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 340 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 341 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 342 | #undef SCREEN_COLOR |
|---|
| 343 | #define SCREEN_COLOR 0x1D |
|---|
| 344 | |
|---|
| 345 | #elif CAM_BITMAP_PALETTE==6 |
|---|
| 346 | |
|---|
| 347 | // Used by :- SX20 |
|---|
| 348 | |
|---|
| 349 | #define COLOR_WHITE 0x01 |
|---|
| 350 | #define COLOR_RED 0x2B |
|---|
| 351 | #define COLOR_GREY 0x0F |
|---|
| 352 | #define COLOR_GREEN 0xA9 |
|---|
| 353 | #define COLOR_BLUE_LT 0x2D |
|---|
| 354 | #define COLOR_BLUE 0x3B |
|---|
| 355 | #define COLOR_YELLOW 0x8B |
|---|
| 356 | #define COLOR_BG 0xFE |
|---|
| 357 | #define COLOR_FG COLOR_WHITE |
|---|
| 358 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 359 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 360 | #define COLOR_ALT_BG COLOR_BG |
|---|
| 361 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 362 | #define COLOR_SPLASH_PINK 0xEA |
|---|
| 363 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 364 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 365 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 366 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 367 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 368 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 369 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 370 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 371 | #define COLOR_HISTO_RB COLOR_RED |
|---|
| 372 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 373 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 374 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 375 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 376 | |
|---|
| 377 | // Icon colors |
|---|
| 378 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 379 | // Separate definitions for record and playback mode |
|---|
| 380 | // to cater for cameras with variable palettes |
|---|
| 381 | #define COLOR_ICON_REC_RED 0x2C |
|---|
| 382 | #define COLOR_ICON_REC_RED_DK 0x91 |
|---|
| 383 | #define COLOR_ICON_REC_RED_LT 0x26 |
|---|
| 384 | #define COLOR_ICON_REC_GREEN 0xB0 |
|---|
| 385 | #define COLOR_ICON_REC_GREEN_DK 0xB7 |
|---|
| 386 | #define COLOR_ICON_REC_GREEN_LT 0xA9 |
|---|
| 387 | #define COLOR_ICON_REC_YELLOW 0xDB |
|---|
| 388 | #define COLOR_ICON_REC_YELLOW_DK 0xD9 |
|---|
| 389 | #define COLOR_ICON_REC_YELLOW_LT 0xDD |
|---|
| 390 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 391 | #define COLOR_ICON_REC_GREY_DK 0x11 |
|---|
| 392 | #define COLOR_ICON_REC_GREY_LT 0x10 |
|---|
| 393 | #define COLOR_ICON_PLY_RED 0x25 |
|---|
| 394 | #define COLOR_ICON_PLY_RED_DK 0x2C |
|---|
| 395 | #define COLOR_ICON_PLY_RED_LT 0x1E |
|---|
| 396 | #define COLOR_ICON_PLY_GREEN 0xA5 |
|---|
| 397 | #define COLOR_ICON_PLY_GREEN_DK 0xAC |
|---|
| 398 | #define COLOR_ICON_PLY_GREEN_LT 0x9E |
|---|
| 399 | #define COLOR_ICON_PLY_YELLOW 0x75 |
|---|
| 400 | #define COLOR_ICON_PLY_YELLOW_DK 0x7A |
|---|
| 401 | #define COLOR_ICON_PLY_YELLOW_LT 0x71 |
|---|
| 402 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 403 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 404 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 405 | |
|---|
| 406 | #elif CAM_BITMAP_PALETTE==7 |
|---|
| 407 | |
|---|
| 408 | // Used by :- S95, SX130IS |
|---|
| 409 | |
|---|
| 410 | #define COLOR_WHITE 0x01 |
|---|
| 411 | #define COLOR_RED 0x1e |
|---|
| 412 | #define COLOR_GREY 0x1a |
|---|
| 413 | #define COLOR_GREEN 0x17 |
|---|
| 414 | #define COLOR_BLUE_LT 0x10 |
|---|
| 415 | #define COLOR_BLUE 0x14 |
|---|
| 416 | #define COLOR_YELLOW 0x60 |
|---|
| 417 | #define COLOR_BG 0x62 |
|---|
| 418 | #define COLOR_FG COLOR_WHITE |
|---|
| 419 | #define COLOR_SELECTED_BG 0x0e |
|---|
| 420 | #define COLOR_SELECTED_FG COLOR_BLACK |
|---|
| 421 | #define COLOR_ALT_BG COLOR_BG |
|---|
| 422 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 423 | #define COLOR_SPLASH_PINK 0x1e // Orange |
|---|
| 424 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 425 | #define COLOR_HISTO_R 0x66 |
|---|
| 426 | #define COLOR_HISTO_R_PLAY 0xA0 |
|---|
| 427 | #define COLOR_HISTO_B 0x61 |
|---|
| 428 | #define COLOR_HISTO_B_PLAY 0xA2 |
|---|
| 429 | #define COLOR_HISTO_G 0x5F |
|---|
| 430 | #define COLOR_HISTO_G_PLAY 0xA1 |
|---|
| 431 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 432 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 433 | #define COLOR_HISTO_RB COLOR_RED |
|---|
| 434 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 435 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 436 | #define COLOR_HISTO_RG_PLAY 0x80 |
|---|
| 437 | #undef SCREEN_COLOR |
|---|
| 438 | #define SCREEN_COLOR 0x1D |
|---|
| 439 | |
|---|
| 440 | #if defined(CAMERA_sx130is) |
|---|
| 441 | #define COLOR_ICON_REC_RED 0x66 |
|---|
| 442 | #define COLOR_ICON_REC_RED_DK 0x66 |
|---|
| 443 | #define COLOR_ICON_REC_RED_LT 0x66 |
|---|
| 444 | #define COLOR_ICON_REC_GREEN 0x6B |
|---|
| 445 | #define COLOR_ICON_REC_GREEN_DK 0x6B |
|---|
| 446 | #define COLOR_ICON_REC_GREEN_LT 0x69 |
|---|
| 447 | #define COLOR_ICON_REC_YELLOW 0x60 |
|---|
| 448 | #define COLOR_ICON_REC_YELLOW_DK 0x45 |
|---|
| 449 | #define COLOR_ICON_REC_YELLOW_LT 0x6C |
|---|
| 450 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 451 | #define COLOR_ICON_REC_GREY_DK 0x19 |
|---|
| 452 | #define COLOR_ICON_REC_GREY_LT 0x10 |
|---|
| 453 | #define COLOR_ICON_PLY_RED 0xA0 |
|---|
| 454 | #define COLOR_ICON_PLY_RED_DK 0xA0 |
|---|
| 455 | #define COLOR_ICON_PLY_RED_LT 0xA0 |
|---|
| 456 | #define COLOR_ICON_PLY_GREEN 0xA1 |
|---|
| 457 | #define COLOR_ICON_PLY_GREEN_DK 0xA1 |
|---|
| 458 | #define COLOR_ICON_PLY_GREEN_LT 0xA1 |
|---|
| 459 | #define COLOR_ICON_PLY_YELLOW 0x6A |
|---|
| 460 | #define COLOR_ICON_PLY_YELLOW_DK 0x6F |
|---|
| 461 | #define COLOR_ICON_PLY_YELLOW_LT 0x63 |
|---|
| 462 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 463 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 464 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 465 | #endif |
|---|
| 466 | |
|---|
| 467 | #elif CAM_BITMAP_PALETTE==8 |
|---|
| 468 | |
|---|
| 469 | // Used by :- A490, A495 |
|---|
| 470 | |
|---|
| 471 | #define COLOR_WHITE 0x01 |
|---|
| 472 | #define COLOR_RED 0x66 |
|---|
| 473 | #define COLOR_GREY 0x6D |
|---|
| 474 | #define COLOR_GREEN 0x69 |
|---|
| 475 | #define COLOR_BLUE_LT 0x68 |
|---|
| 476 | #define COLOR_BLUE 0x67 |
|---|
| 477 | #define COLOR_YELLOW 0x60 |
|---|
| 478 | #define COLOR_BG 0x20 |
|---|
| 479 | #define COLOR_FG COLOR_WHITE |
|---|
| 480 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 481 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 482 | #define COLOR_ALT_BG 0x20 |
|---|
| 483 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 484 | #define COLOR_SPLASH_PINK COLOR_GREY |
|---|
| 485 | #define COLOR_SPLASH_GREY 0xDE |
|---|
| 486 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 487 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 488 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 489 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 490 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 491 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 492 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 493 | #define COLOR_HISTO_RB COLOR_RED |
|---|
| 494 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 495 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 496 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 497 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 498 | |
|---|
| 499 | #elif CAM_BITMAP_PALETTE==9 |
|---|
| 500 | |
|---|
| 501 | // Used by :- SX220HS, SX230HS |
|---|
| 502 | |
|---|
| 503 | #define COLOR_WHITE 0x01 |
|---|
| 504 | #define COLOR_RED 0x9f |
|---|
| 505 | #define COLOR_GREY 0x1a |
|---|
| 506 | #define COLOR_GREY_LIGHT 0x0B |
|---|
| 507 | #define COLOR_GREY_DARK 0x19 |
|---|
| 508 | #define COLOR_GREEN 0xa0 |
|---|
| 509 | #define COLOR_BLUE_LT 0x96 |
|---|
| 510 | #define COLOR_BLUE 0xa1 |
|---|
| 511 | #define COLOR_YELLOW 0x92 |
|---|
| 512 | #define COLOR_BG 0x4B |
|---|
| 513 | #define COLOR_FG COLOR_WHITE |
|---|
| 514 | #define COLOR_SELECTED_BG 0x0e |
|---|
| 515 | #define COLOR_SELECTED_FG COLOR_BLACK |
|---|
| 516 | #define COLOR_ALT_BG COLOR_BG |
|---|
| 517 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 518 | #define COLOR_SPLASH_PINK 0x1e // Orange |
|---|
| 519 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 520 | #define COLOR_HISTO_R 0x6C |
|---|
| 521 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 522 | #define COLOR_HISTO_B 0x6D |
|---|
| 523 | #define COLOR_HISTO_B_PLAY COLOR_BLUE |
|---|
| 524 | #define COLOR_HISTO_G 0x90 |
|---|
| 525 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 526 | #define COLOR_HISTO_BG 0x52 // COLOR_BLUE_LT |
|---|
| 527 | #define COLOR_HISTO_RG 0x51 // COLOR_YELLOW |
|---|
| 528 | #define COLOR_HISTO_RB 0x3D // COLOR_RED |
|---|
| 529 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 530 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 531 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 532 | #undef SCREEN_COLOR |
|---|
| 533 | #define SCREEN_COLOR 0x1D |
|---|
| 534 | |
|---|
| 535 | // Icon colors |
|---|
| 536 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 537 | // Separate definitions for record and playback mode |
|---|
| 538 | // to cater for cameras with variable palettes |
|---|
| 539 | #define COLOR_ICON_REC_RED 0x3D |
|---|
| 540 | #define COLOR_ICON_REC_RED_DK 0x6C |
|---|
| 541 | #define COLOR_ICON_REC_RED_LT 0x1E |
|---|
| 542 | #define COLOR_ICON_REC_GREEN 0x90 |
|---|
| 543 | #define COLOR_ICON_REC_GREEN_DK 0x5A |
|---|
| 544 | #define COLOR_ICON_REC_GREEN_LT 0x59 |
|---|
| 545 | #define COLOR_ICON_REC_YELLOW 0x2D |
|---|
| 546 | #define COLOR_ICON_REC_YELLOW_DK 0x1E |
|---|
| 547 | #define COLOR_ICON_REC_YELLOW_LT 0x20 |
|---|
| 548 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 549 | #define COLOR_ICON_REC_GREY_DK 0x1A |
|---|
| 550 | #define COLOR_ICON_REC_GREY_LT 0x11 |
|---|
| 551 | #define COLOR_ICON_PLY_RED 0x9F |
|---|
| 552 | #define COLOR_ICON_PLY_RED_DK 0x9F |
|---|
| 553 | #define COLOR_ICON_PLY_RED_LT 0x1E |
|---|
| 554 | #define COLOR_ICON_PLY_GREEN 0xA0 |
|---|
| 555 | #define COLOR_ICON_PLY_GREEN_DK 0xA0 |
|---|
| 556 | #define COLOR_ICON_PLY_GREEN_LT 0x9E |
|---|
| 557 | #define COLOR_ICON_PLY_YELLOW 0x55 |
|---|
| 558 | #define COLOR_ICON_PLY_YELLOW_DK 0x55 |
|---|
| 559 | #define COLOR_ICON_PLY_YELLOW_LT 0x4C |
|---|
| 560 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 561 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 562 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 563 | |
|---|
| 564 | #elif CAM_BITMAP_PALETTE==10 |
|---|
| 565 | |
|---|
| 566 | // Used by :- A1100 |
|---|
| 567 | |
|---|
| 568 | #define COLOR_WHITE 0x0A |
|---|
| 569 | #define COLOR_RED 0x6B |
|---|
| 570 | #define COLOR_GREY 0x17 |
|---|
| 571 | #define COLOR_GREEN 0x96 |
|---|
| 572 | #define COLOR_BLUE_LT 0x79 |
|---|
| 573 | #define COLOR_BLUE 0x8A |
|---|
| 574 | #define COLOR_YELLOW 0x54 |
|---|
| 575 | #define COLOR_BG 0x1F |
|---|
| 576 | #define COLOR_FG COLOR_WHITE |
|---|
| 577 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 578 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 579 | #define COLOR_ALT_BG 0x87 |
|---|
| 580 | #define COLOR_SPLASH_RED 0x60 |
|---|
| 581 | #define COLOR_SPLASH_PINK 0xBD |
|---|
| 582 | #define COLOR_SPLASH_GREY 0x16 |
|---|
| 583 | // colors for blended histo |
|---|
| 584 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 585 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 586 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 587 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 588 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 589 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 590 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 591 | #define COLOR_HISTO_RB 0x66 |
|---|
| 592 | #define COLOR_HISTO_RB_PLAY 0xE2 |
|---|
| 593 | #define COLOR_HISTO_B_PLAY 0xCC |
|---|
| 594 | #define COLOR_HISTO_BG_PLAY 0x99 |
|---|
| 595 | #define COLOR_HISTO_RG_PLAY 0x66 |
|---|
| 596 | #undef SCREEN_COLOR |
|---|
| 597 | #define SCREEN_COLOR 0x1D |
|---|
| 598 | |
|---|
| 599 | #elif CAM_BITMAP_PALETTE==11 |
|---|
| 600 | |
|---|
| 601 | // Used by :- IXUS300_SD4000 |
|---|
| 602 | |
|---|
| 603 | // pallete changes almost completely depenting on mode and if canon menu is active or not |
|---|
| 604 | // playback, playback with menu, photo record mode, photo record mode with menu, ... |
|---|
| 605 | #define COLOR_WHITE 0x01 // always the same |
|---|
| 606 | #define COLOR_RED 0x1E // always the same, bright orange (red is only available in record more without menu) |
|---|
| 607 | #define COLOR_GREY 0x16 // always the same |
|---|
| 608 | #define COLOR_GREEN 0x9F // playback only, without menu |
|---|
| 609 | #define COLOR_BLUE_LT 0x0C // playback: light brown |
|---|
| 610 | #define COLOR_BLUE 0x12 // playback: dark brown (almost like sh.t) |
|---|
| 611 | #define COLOR_YELLOW 0x90 // playback only, without menu |
|---|
| 612 | #define COLOR_BG 0x1D // greyisch |
|---|
| 613 | #define COLOR_FG COLOR_WHITE |
|---|
| 614 | #define COLOR_SELECTED_BG COLOR_RED // always the same, light grey |
|---|
| 615 | #define COLOR_SELECTED_FG COLOR_BLACK |
|---|
| 616 | #define COLOR_ALT_BG COLOR_BG |
|---|
| 617 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 618 | #define COLOR_SPLASH_PINK COLOR_BLUE |
|---|
| 619 | #define COLOR_SPLASH_GREY 0x16 // darker grey |
|---|
| 620 | #define COLOR_HISTO_R 0x66 // record only, without menu |
|---|
| 621 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 622 | #define COLOR_HISTO_B 0x3C |
|---|
| 623 | #define COLOR_HISTO_B_PLAY 0x50 // playback without menu dont have blue at all, bright Orange |
|---|
| 624 | #define COLOR_HISTO_G 0x6B |
|---|
| 625 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 626 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 627 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 628 | #define COLOR_HISTO_RB COLOR_RED |
|---|
| 629 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 630 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 631 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 632 | |
|---|
| 633 | #elif CAM_BITMAP_PALETTE==12 |
|---|
| 634 | |
|---|
| 635 | // Used by :- G12, SX30, SX40HS, IXUS310_ELPH500HS |
|---|
| 636 | |
|---|
| 637 | // Default Canon colors |
|---|
| 638 | #define COLOR_WHITE 0x01 |
|---|
| 639 | #define COLOR_GREY_DK 0x1a |
|---|
| 640 | #define COLOR_GREY 0x16 |
|---|
| 641 | #define COLOR_GREY_LT 0x0E |
|---|
| 642 | #undef SCREEN_COLOR |
|---|
| 643 | #define SCREEN_COLOR 0x1D |
|---|
| 644 | |
|---|
| 645 | // CHDK colors loaded into these locations in the camera palette by load_chdk_palette() |
|---|
| 646 | #define COLOR_RED (CHDK_COLOR_BASE+0) |
|---|
| 647 | #define COLOR_RED_DK (CHDK_COLOR_BASE+1) |
|---|
| 648 | #define COLOR_RED_LT (CHDK_COLOR_BASE+2) |
|---|
| 649 | #define COLOR_GREEN (CHDK_COLOR_BASE+3) |
|---|
| 650 | #define COLOR_GREEN_DK (CHDK_COLOR_BASE+4) |
|---|
| 651 | #define COLOR_GREEN_LT (CHDK_COLOR_BASE+5) |
|---|
| 652 | #define COLOR_BLUE (CHDK_COLOR_BASE+6) |
|---|
| 653 | #define COLOR_BLUE_DK (CHDK_COLOR_BASE+7) |
|---|
| 654 | #define COLOR_BLUE_LT (CHDK_COLOR_BASE+8) |
|---|
| 655 | #define COLOR_MAGENTA (CHDK_COLOR_BASE+9) |
|---|
| 656 | #define COLOR_YELLOW (CHDK_COLOR_BASE+10) |
|---|
| 657 | #define COLOR_YELLOW_DK (CHDK_COLOR_BASE+11) |
|---|
| 658 | #define COLOR_YELLOW_LT (CHDK_COLOR_BASE+12) |
|---|
| 659 | |
|---|
| 660 | #define COLOR_CYAN COLOR_BLUE_LT |
|---|
| 661 | #define COLOR_BG COLOR_GREY_DK |
|---|
| 662 | #define COLOR_FG COLOR_WHITE |
|---|
| 663 | #define COLOR_SELECTED_BG COLOR_GREY_LT |
|---|
| 664 | #define COLOR_SELECTED_FG COLOR_BLACK |
|---|
| 665 | #define COLOR_ALT_BG COLOR_BG |
|---|
| 666 | |
|---|
| 667 | #define COLOR_SPLASH_RED COLOR_RED_DK |
|---|
| 668 | #define COLOR_SPLASH_PINK COLOR_RED_LT |
|---|
| 669 | #define COLOR_SPLASH_GREY COLOR_GREY_LT |
|---|
| 670 | |
|---|
| 671 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 672 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 673 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 674 | #define COLOR_HISTO_B_PLAY COLOR_BLUE |
|---|
| 675 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 676 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 677 | #define COLOR_HISTO_BG COLOR_CYAN |
|---|
| 678 | #define COLOR_HISTO_BG_PLAY COLOR_CYAN |
|---|
| 679 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 680 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 681 | #define COLOR_HISTO_RB COLOR_MAGENTA |
|---|
| 682 | #define COLOR_HISTO_RB_PLAY COLOR_MAGENTA |
|---|
| 683 | |
|---|
| 684 | // Icon colors |
|---|
| 685 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 686 | // Separate definitions for record and playback mode |
|---|
| 687 | // to cater for cameras with variable palettes |
|---|
| 688 | #define COLOR_ICON_REC_RED COLOR_RED |
|---|
| 689 | #define COLOR_ICON_REC_RED_DK COLOR_RED_DK |
|---|
| 690 | #define COLOR_ICON_REC_RED_LT COLOR_RED_LT |
|---|
| 691 | #define COLOR_ICON_REC_GREEN COLOR_GREEN |
|---|
| 692 | #define COLOR_ICON_REC_GREEN_DK COLOR_GREEN_DK |
|---|
| 693 | #define COLOR_ICON_REC_GREEN_LT COLOR_GREEN_LT |
|---|
| 694 | #define COLOR_ICON_REC_YELLOW COLOR_YELLOW |
|---|
| 695 | #define COLOR_ICON_REC_YELLOW_DK COLOR_YELLOW_DK |
|---|
| 696 | #define COLOR_ICON_REC_YELLOW_LT COLOR_YELLOW_LT |
|---|
| 697 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 698 | #define COLOR_ICON_REC_GREY_DK COLOR_GREY_DK |
|---|
| 699 | #define COLOR_ICON_REC_GREY_LT COLOR_GREY_LT |
|---|
| 700 | |
|---|
| 701 | #elif CAM_BITMAP_PALETTE==13 |
|---|
| 702 | |
|---|
| 703 | // Used by :- A3000IS |
|---|
| 704 | |
|---|
| 705 | #define COLOR_TRANSPARENT 0x00 |
|---|
| 706 | #define COLOR_WHITE 0x01 |
|---|
| 707 | #define COLOR_RED 0x22 |
|---|
| 708 | #define COLOR_GREY 0xF3 |
|---|
| 709 | #define COLOR_GREEN 0xcF |
|---|
| 710 | #define COLOR_BLUE_LT 0x61 |
|---|
| 711 | #define COLOR_BLUE 0xE7 |
|---|
| 712 | #define COLOR_YELLOW 0xDD |
|---|
| 713 | #define COLOR_BLACK 0xFF |
|---|
| 714 | #define COLOR_BG 0x0F |
|---|
| 715 | #define COLOR_FG COLOR_WHITE |
|---|
| 716 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 717 | #define COLOR_SELECTED_FG COLOR_GREY |
|---|
| 718 | #define COLOR_ALT_BG 0xf0 |
|---|
| 719 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 720 | #define COLOR_SPLASH_PINK 0x4E |
|---|
| 721 | #define COLOR_SPLASH_GREY 0x6F |
|---|
| 722 | // colors for blended histo |
|---|
| 723 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 724 | #define COLOR_HISTO_R_PLAY COLOR_RED |
|---|
| 725 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 726 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 727 | #define COLOR_HISTO_G_PLAY COLOR_GREEN |
|---|
| 728 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 729 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 730 | #define COLOR_HISTO_RB COLOR_RED |
|---|
| 731 | #define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB |
|---|
| 732 | #define COLOR_HISTO_B_PLAY COLOR_HISTO_B |
|---|
| 733 | #define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT |
|---|
| 734 | #define COLOR_HISTO_RG_PLAY COLOR_YELLOW |
|---|
| 735 | |
|---|
| 736 | // Used by :- A3300IS |
|---|
| 737 | #elif CAM_BITMAP_PALETTE==14 |
|---|
| 738 | |
|---|
| 739 | #define COLOR_TRANS 0x4C |
|---|
| 740 | #define COLOR_WHITE 0x01 |
|---|
| 741 | #define COLOR_RED 0x6C |
|---|
| 742 | #define COLOR_GREY 0x1D |
|---|
| 743 | #define COLOR_GREEN 0x5A |
|---|
| 744 | #define COLOR_BLUE_LT 0x58 |
|---|
| 745 | #define COLOR_BLUE 0x6D |
|---|
| 746 | #define COLOR_YELLOW 0x51 |
|---|
| 747 | #define COLOR_BG COLOR_TRANS |
|---|
| 748 | #define COLOR_FG COLOR_WHITE |
|---|
| 749 | #define COLOR_SELECTED_BG COLOR_RED |
|---|
| 750 | #define COLOR_SELECTED_FG COLOR_WHITE |
|---|
| 751 | #define COLOR_ALT_BG COLOR_TRANS |
|---|
| 752 | #define COLOR_SPLASH_RED COLOR_RED |
|---|
| 753 | #define COLOR_SPLASH_PINK COLOR_YELLOW |
|---|
| 754 | #define COLOR_SPLASH_GREY COLOR_GREY |
|---|
| 755 | // colors for blended histo |
|---|
| 756 | #define COLOR_HISTO_R COLOR_RED |
|---|
| 757 | #define COLOR_HISTO_R_PLAY 0x9F |
|---|
| 758 | #define COLOR_HISTO_B COLOR_BLUE |
|---|
| 759 | #define COLOR_HISTO_G COLOR_GREEN |
|---|
| 760 | #define COLOR_HISTO_G_PLAY 0xA0 |
|---|
| 761 | #define COLOR_HISTO_BG COLOR_BLUE_LT |
|---|
| 762 | #define COLOR_HISTO_RG COLOR_YELLOW |
|---|
| 763 | #define COLOR_HISTO_RB 0x66 |
|---|
| 764 | #define COLOR_HISTO_RB_PLAY 0x9F |
|---|
| 765 | #define COLOR_HISTO_B_PLAY 0xA1 |
|---|
| 766 | #define COLOR_HISTO_BG_PLAY 0xA0 |
|---|
| 767 | #define COLOR_HISTO_RG_PLAY 0x9F |
|---|
| 768 | #undef SCREEN_COLOR |
|---|
| 769 | #define SCREEN_COLOR 0x4C |
|---|
| 770 | |
|---|
| 771 | // Icon colors |
|---|
| 772 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 773 | // Separate definitions for record and playback mode |
|---|
| 774 | // to cater for cameras with variable palettes |
|---|
| 775 | // Record mode colors |
|---|
| 776 | #define COLOR_ICON_REC_RED COLOR_RED |
|---|
| 777 | #define COLOR_ICON_REC_RED_DK COLOR_RED |
|---|
| 778 | #define COLOR_ICON_REC_RED_LT COLOR_RED |
|---|
| 779 | #define COLOR_ICON_REC_GREEN 0x90 |
|---|
| 780 | #define COLOR_ICON_REC_GREEN_DK COLOR_GREEN |
|---|
| 781 | #define COLOR_ICON_REC_GREEN_LT 0x50 |
|---|
| 782 | #define COLOR_ICON_REC_YELLOW 0x6B |
|---|
| 783 | #define COLOR_ICON_REC_YELLOW_DK COLOR_YELLOW |
|---|
| 784 | #define COLOR_ICON_REC_YELLOW_LT 0x6B |
|---|
| 785 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 786 | #define COLOR_ICON_REC_GREY_DK COLOR_GREY |
|---|
| 787 | #define COLOR_ICON_REC_GREY_LT 0x13 |
|---|
| 788 | // Playback mode colors |
|---|
| 789 | #define COLOR_ICON_PLY_RED 0x9F |
|---|
| 790 | #define COLOR_ICON_PLY_RED_DK 0x9F |
|---|
| 791 | #define COLOR_ICON_PLY_RED_LT 0x9F |
|---|
| 792 | #define COLOR_ICON_PLY_GREEN 0xA0 |
|---|
| 793 | #define COLOR_ICON_PLY_GREEN_DK 0xA0 |
|---|
| 794 | #define COLOR_ICON_PLY_GREEN_LT 0x9E |
|---|
| 795 | #define COLOR_ICON_PLY_YELLOW 0x92 |
|---|
| 796 | #define COLOR_ICON_PLY_YELLOW_DK 0x92 |
|---|
| 797 | #define COLOR_ICON_PLY_YELLOW_LT 0x90 |
|---|
| 798 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 799 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 800 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 801 | |
|---|
| 802 | |
|---|
| 803 | #else |
|---|
| 804 | #error CAM_BITMAP_PALETTE not defined |
|---|
| 805 | #endif |
|---|
| 806 | |
|---|
| 807 | // Define default icon colors if not already defined above |
|---|
| 808 | // 3 shades of Red, Green, Yellow and Grey |
|---|
| 809 | // Separate definitions for record and playback mode |
|---|
| 810 | // to cater for cameras with variable palettes |
|---|
| 811 | #if !defined(COLOR_ICON_REC_RED) // Record mode colors |
|---|
| 812 | #define COLOR_ICON_REC_RED 0x22 |
|---|
| 813 | #define COLOR_ICON_REC_RED_DK 0x2F |
|---|
| 814 | #define COLOR_ICON_REC_RED_LT 0x26 |
|---|
| 815 | #define COLOR_ICON_REC_GREEN 0x5F |
|---|
| 816 | #define COLOR_ICON_REC_GREEN_DK 0x25 |
|---|
| 817 | #define COLOR_ICON_REC_GREEN_LT 0x51 |
|---|
| 818 | #define COLOR_ICON_REC_YELLOW 0x6F |
|---|
| 819 | #define COLOR_ICON_REC_YELLOW_DK 0x6F |
|---|
| 820 | #define COLOR_ICON_REC_YELLOW_LT 0x66 |
|---|
| 821 | #define COLOR_ICON_REC_GREY COLOR_GREY |
|---|
| 822 | #define COLOR_ICON_REC_GREY_DK 0x33 |
|---|
| 823 | #define COLOR_ICON_REC_GREY_LT 0x13 |
|---|
| 824 | #endif |
|---|
| 825 | #if !defined(COLOR_ICON_PLY_RED) // Playback mode colors |
|---|
| 826 | #define COLOR_ICON_PLY_RED COLOR_ICON_REC_RED |
|---|
| 827 | #define COLOR_ICON_PLY_RED_DK COLOR_ICON_REC_RED_DK |
|---|
| 828 | #define COLOR_ICON_PLY_RED_LT COLOR_ICON_REC_RED_LT |
|---|
| 829 | #define COLOR_ICON_PLY_GREEN COLOR_ICON_REC_GREEN |
|---|
| 830 | #define COLOR_ICON_PLY_GREEN_DK COLOR_ICON_REC_GREEN_DK |
|---|
| 831 | #define COLOR_ICON_PLY_GREEN_LT COLOR_ICON_REC_GREEN_LT |
|---|
| 832 | #define COLOR_ICON_PLY_YELLOW COLOR_ICON_REC_YELLOW |
|---|
| 833 | #define COLOR_ICON_PLY_YELLOW_DK COLOR_ICON_REC_YELLOW_DK |
|---|
| 834 | #define COLOR_ICON_PLY_YELLOW_LT COLOR_ICON_REC_YELLOW_LT |
|---|
| 835 | #define COLOR_ICON_PLY_GREY COLOR_ICON_REC_GREY |
|---|
| 836 | #define COLOR_ICON_PLY_GREY_DK COLOR_ICON_REC_GREY_DK |
|---|
| 837 | #define COLOR_ICON_PLY_GREY_LT COLOR_ICON_REC_GREY_LT |
|---|
| 838 | #endif |
|---|
| 839 | |
|---|
| 840 | #define FONT_WIDTH 8 |
|---|
| 841 | #define FONT_HEIGHT 16 |
|---|
| 842 | |
|---|
| 843 | //------------------------------------------------------------------- |
|---|
| 844 | extern void draw_init(); |
|---|
| 845 | extern void draw_set_draw_proc(void (*pixel_proc)(unsigned int offset, color cl)); |
|---|
| 846 | |
|---|
| 847 | #ifdef CAM_DETECT_SCREEN_ERASE |
|---|
| 848 | extern void draw_set_guard(); |
|---|
| 849 | extern int draw_test_guard(); |
|---|
| 850 | extern int draw_test_pixel(coord x, coord y, color c); |
|---|
| 851 | #endif |
|---|
| 852 | |
|---|
| 853 | extern color draw_get_pixel(coord x, coord y); |
|---|
| 854 | |
|---|
| 855 | extern void draw_pixel(coord x, coord y, color cl); |
|---|
| 856 | |
|---|
| 857 | extern void draw_line(coord x1, coord y1, coord x2, coord y2, color cl); |
|---|
| 858 | extern void draw_hline(coord x, coord y, int len, color cl); |
|---|
| 859 | extern void draw_vline(coord x, coord y, int len, color cl); |
|---|
| 860 | |
|---|
| 861 | // draw frame |
|---|
| 862 | extern void draw_rect(coord x1, coord y1, coord x2, coord y2, color cl); |
|---|
| 863 | extern void draw_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness); |
|---|
| 864 | extern void draw_rect_shadow(coord x1, coord y1, coord x2, coord y2, color cl, int thickness); |
|---|
| 865 | extern void draw_round_rect(coord x1, coord y1, coord x2, coord y2, color cl); |
|---|
| 866 | extern void draw_round_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness); |
|---|
| 867 | // color: hi_byte - BG; lo_byte - FG |
|---|
| 868 | extern void draw_filled_rect(coord x1, coord y1, coord x2, coord y2, color cl); |
|---|
| 869 | extern void draw_filled_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness); |
|---|
| 870 | extern void draw_filled_round_rect(coord x1, coord y1, coord x2, coord y2, color cl); |
|---|
| 871 | extern void draw_filled_round_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness); |
|---|
| 872 | |
|---|
| 873 | extern void draw_char(coord x, coord y, const char ch, color cl); |
|---|
| 874 | extern void draw_string(coord x, coord y, const char *s, color cl); |
|---|
| 875 | |
|---|
| 876 | extern void draw_txt_rect(coord col, coord row, unsigned int length, unsigned int height, color cl); |
|---|
| 877 | extern void draw_txt_rect_exp(coord col, coord row, unsigned int length, unsigned int height, unsigned int exp, color cl); |
|---|
| 878 | extern void draw_txt_filled_rect(coord col, coord row, unsigned int length, unsigned int height, color cl); |
|---|
| 879 | extern void draw_txt_filled_rect_exp(coord col, coord row, unsigned int length, unsigned int height, unsigned int exp, color cl); |
|---|
| 880 | extern void draw_txt_string(coord col, coord row, const char *str, color cl); |
|---|
| 881 | extern void draw_txt_char(coord col, coord row, const char ch, color cl); |
|---|
| 882 | |
|---|
| 883 | extern void draw_clear(); |
|---|
| 884 | extern void draw_restore(); |
|---|
| 885 | |
|---|
| 886 | extern void draw_fill(coord x, coord y, color cl_fill, color cl_bound); |
|---|
| 887 | extern void draw_circle(coord x, coord y, const unsigned int r, color cl); |
|---|
| 888 | extern void draw_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl); |
|---|
| 889 | extern void draw_filled_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl); |
|---|
| 890 | |
|---|
| 891 | #if defined(CAM_USE_COLORED_ICONS) |
|---|
| 892 | extern void draw_get_icon_colors(); |
|---|
| 893 | extern color icon_green[3], icon_red[3], icon_yellow[3], icon_grey[3]; |
|---|
| 894 | #endif |
|---|
| 895 | |
|---|
| 896 | //------------------------------------------------------------------- |
|---|
| 897 | #endif |
|---|