FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot-old/src/getcolor.h at Release_4_4_3 · gnuplot/gnuplot-old · GitHub
gnuplot
gnuplot-old
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot-old
/
src
/
getcolor.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (46 loc) · 1.79 KB
Breadcrumbs
gnuplot-old
/
src
/
getcolor.h
Copy path
File metadata and controls
62 lines (46 loc) · 1.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* $Id: getcolor.h,v 1.9.4.1 2010/10/07 05:58:27 sfeam Exp $
*/
/* GNUPLOT - getcolor.h */
/* Routines + constants for mapping interval [0,1] into another [0,1] to be
* used to get RGB triplets from gray (palette of smooth colours).
*
* Note: The code in getcolor.h,.c cannot be inside color.h,.c since gplt_x11.c
* compiles with getcolor.o, so it cannot load the other huge staff.
*
*/
/*[
*
* Petr Mikulik, since December 1998
* Copyright: open source as much as possible
*
]*/
#ifndef
GETCOLOR_H
#define
GETCOLOR_H
#include
"syscfg.h"
#include
"color.h"
enum
color_models_id
{
C_MODEL_RGB
=
'r'
,
C_MODEL_HSV
=
'h'
,
C_MODEL_CMY
=
'c'
,
C_MODEL_YIQ
=
'y'
,
C_MODEL_XYZ
=
'x'
};
/* main gray --> rgb color mapping */
void
rgb1_from_gray
__PROTO
((
double
gray
,
rgb_color
*
color
));
void
rgb255_from_rgb1
__PROTO
((
rgb_color
rgb1
,
rgb255_color
*
rgb255
));
/* main gray --> rgb color mapping as above, with take care of palette maxcolors */
void
rgb1maxcolors_from_gray
__PROTO
((
double
gray
,
rgb_color
*
color
));
void
rgb255maxcolors_from_gray
__PROTO
((
double
gray
,
rgb255_color
*
rgb255
));
double
quantize_gray
__PROTO
((
double
gray
));
/* used to (de-)serialize color/gradient information */
char
*
gradient_entry_to_str
__PROTO
((
gradient_struct
*
gs
));
void
str_to_gradient_entry
__PROTO
((
char
*
s
,
gradient_struct
*
gs
));
/* check if two palettes p1 and p2 differ */
int
palettes_differ
__PROTO
((
t_sm_palette
*
p1
,
t_sm_palette
*
p2
));
/* construct minimal gradient to approximate palette */
gradient_struct
*
approximate_palette
__PROTO
((
t_sm_palette
*
palette
,
int
maxsamples
,
double
allowed_deviation
,
int
*
gradient_num
));
double
GetColorValueFromFormula
__PROTO
((
int
formula
,
double
x
));
extern
const
char
*
ps_math_color_formulae
[];
#endif
/* GETCOLOR_H */
/* eof getcolor.h */
Back
|
FazBrowse Home
|
New Git URL