GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
Main Page
Related Pages
+
Data Structures
Data Structures
Class Hierarchy
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
z
+
Enumerations
a
c
d
e
h
l
m
n
o
p
r
s
t
v
y
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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
}
ps
struct ps_state ps
Definition:
psdriver/graph_set.c:26
psdriver.h
gis.h
ps_state::true_color
int true_color
Definition:
psdriver.h:15
b
double b
Definition:
r_raster.c:39
g
float g
Definition:
named_colr.c:8
PS_Color
void PS_Color(int r, int g, int b)
Definition:
psdriver/color.c:5
output
void output(const char *fmt,...)
Definition:
psdriver/graph_set.c:236
r
double r
Definition:
r_raster.c:39
lib
psdriver
color.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13