Changeset 76 in projects for paper-tape-project/trunk/visualisator/cli.c
- Timestamp:
- Jul 26, 2013, 3:46:35 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
paper-tape-project/trunk/visualisator/cli.c
r73 r76 250 250 long color_value[4]; // interpreted numbers 251 251 char buf[3] = "xy"; // Buffer for strtol <- one color value 252 252 253 253 // remove a "#" char if present 254 254 if(string[0] == '#') … … 260 260 // copy the current character to buffer, first position 261 261 buf[0] = string[x]; 262 263 262 // if short notation (shorter than AABBCC), dublicate 264 263 // current character to buffer second position, else … … 268 267 color_value[color] = strtol(buf, NULL, 16); 269 268 } 270 269 271 270 DPRINTF("Allocating '%s' as #%02x%02x%02x%02x\n", string, 272 271 (unsigned int) color_value[0], (unsigned int) color_value[1], (unsigned int)color_value[2], (color == 4) ? (unsigned int) color_value[3] : 0xFF); 273 272 274 273 return cairo_pattern_create_rgba( 275 274 (double) color_value[0] / (double) 0xFF, … … 416 415 } 417 416 418 if(verbosity!=0)419 lochstreifen_print_debug(l);417 lochstreifen_print_debug(l); 418 exit(0); 420 419 421 420 // setting up the surface and painting...
Note: See TracChangeset
for help on using the changeset viewer.