GRASS GIS 8 Programmer's Manual
8.4.1(2025)-45ca3179ab
Loading...
Searching...
No Matches
psdriver/color.c
Go to the documentation of this file.
1
#include <grass/gis.h>
2
#include "
psdriver.h
"
3
4
void
PS_Color
(
int
r
,
int
g
,
int
b
)
5
{
6
if
(
ps
.true_color)
7
output
(
"%d %d %d COLOR\n"
,
r
,
g
,
b
);
8
else
9
output
(
"%d GRAY\n"
, (
int
)(
r
* 0.299 +
g
* 0.587 +
b
* 0.114));
10
}
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:232
psdriver.h
psdriver
color.c
Generated on Sat Jun 21 2025 21:07:27 for GRASS GIS 8 Programmer's Manual by
1.13.2