2
* Identify a color that has been set in the reset_color() (found in Reset_clr.c
3
* file in this directory). Subsequent graphics calls will use this color.
6
* Color() in ../lib/Color.c
10
#include "pngdriver.h"
12
void PNG_color(int number)
14
if (number >= NCOLORS || number < 0) {
15
G_warning("Color: can't set color %d\n", number);
20
int r = (number >> 16) & 0xFF;
21
int g = (number >> 8) & 0xFF;
22
int b = (number >> 0) & 0xFF;
24
currentColor = get_color(r, g, b, 0);
27
currentColor = number;