diff options
Diffstat (limited to 'src/color.h')
| -rw-r--r-- | src/color.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/color.h b/src/color.h new file mode 100644 index 0000000..e2b4cc0 --- /dev/null +++ b/src/color.h @@ -0,0 +1,18 @@ + int set_color(cairo_t *c, char *str) { + if (strcmp("BLACK", str) == 0) { + cairo_set_source_rgb (c, 0.0, 0.0, 0.0); + } + if (strcmp("RED", str) == 0) { + cairo_set_source_rgb (c, 255.0, 0.0, 0.0); + } + if (strcmp("GREEN", str) == 0) { + cairo_set_source_rgb (c, 0.0, 255.0, 0.0); + } + if (strcmp("BLUE", str) == 0) { + cairo_set_source_rgb (c, 0.0, 0.0, 255.0); + } + if (strcmp("GREY", str) == 0) { + cairo_set_source_rgb (c, 128.0, 128.0, 128.0); + } + return(0); + } |
