Loading...
Searching...
No Matches
psdriver/color.c
Go to the documentation of this file.
#include <grass/gis.h>
#include "psdriver.h"
void PS_Color(int r, int g, int b)
{
if (ps.true_color)
output("%d %d %d COLOR\n", r, g, b);
else
output("%d GRAY\n", (int)(r * 0.299 + g * 0.587 + b * 0.114));
}
b
double b
Definition driver/set_window.c:5
r
double r
Definition driver/set_window.c:5
g
float g
Definition named_colr.c:7
PS_Color
void PS_Color(int r, int g, int b)
Definition psdriver/color.c:4
ps
struct ps_state ps
Definition psdriver/graph_set.c:26
output
void output(const char *fmt,...)
Definition psdriver/graph_set.c:233
psdriver.h