GRASS GIS 7 Programmer's Manual
7.8.5(2020)-exported
psdriver/color.c
Go to the documentation of this file.
1
2
#include <grass/gis.h>
3
#include "
psdriver.h
"
4
5
void
PS_Color
(
int
r
,
int
g
,
int
b
)
6
{
7
if
(
ps
.
true_color
)
8
output
(
"%d %d %d COLOR\n"
,
r
,
g
,
b
);
9
else
10
output
(
"%d GRAY\n"
, (
int
)(
r
* 0.299 +
g
* 0.587 +
b
* 0.114));
11
}
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:8
PS_Color
void PS_Color(int r, int g, int b)
Definition:
psdriver/color.c:5
ps
struct ps_state ps
Definition:
psdriver/graph_set.c:25
output
void output(const char *fmt,...)
Definition:
psdriver/graph_set.c:233
psdriver.h
ps_state::true_color
int true_color
Definition:
psdriver.h:14
psdriver
color.c
Generated on Wed Nov 17 2021 12:33:25 for GRASS GIS 7 Programmer's Manual by
1.9.1