File: QwtLinearColorMap.3

package info (click to toggle)
qwt 6.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 23,808 kB
  • sloc: cpp: 57,687; xml: 182; makefile: 32
file content (249 lines) | stat: -rw-r--r-- 5,613 bytes parent folder | download | duplicates (2)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
.TH "QwtLinearColorMap" 3 "Wed Jan 2 2019" "Version 6.1.4" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtLinearColorMap \- \fBQwtLinearColorMap\fP builds a color map from color stops\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_color_map\&.h>\fP
.PP
Inherits \fBQwtColorMap\fP\&.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBMode\fP { \fBFixedColors\fP, \fBScaledColors\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtLinearColorMap\fP (\fBQwtColorMap::Format\fP=\fBQwtColorMap::RGB\fP)"
.br
.ti -1c
.RI "\fBQwtLinearColorMap\fP (const QColor &\fBcolor1\fP, const QColor &\fBcolor2\fP, \fBQwtColorMap::Format\fP=\fBQwtColorMap::RGB\fP)"
.br
.ti -1c
.RI "virtual \fB~QwtLinearColorMap\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "void \fBsetMode\fP (\fBMode\fP)"
.br
.RI "Set the mode of the color map\&. "
.ti -1c
.RI "\fBMode\fP \fBmode\fP () const"
.br
.ti -1c
.RI "void \fBsetColorInterval\fP (const QColor &\fBcolor1\fP, const QColor &\fBcolor2\fP)"
.br
.ti -1c
.RI "void \fBaddColorStop\fP (double value, const QColor &)"
.br
.ti -1c
.RI "QVector< double > \fBcolorStops\fP () const"
.br
.ti -1c
.RI "QColor \fBcolor1\fP () const"
.br
.ti -1c
.RI "QColor \fBcolor2\fP () const"
.br
.ti -1c
.RI "virtual QRgb \fBrgb\fP (const \fBQwtInterval\fP &, double value) const"
.br
.ti -1c
.RI "virtual unsigned char \fBcolorIndex\fP (const \fBQwtInterval\fP &, double value) const"
.br
.RI "Map a value of a given interval into a color index\&. "
.in -1c
.SH "Detailed Description"
.PP 
\fBQwtLinearColorMap\fP builds a color map from color stops\&. 

A color stop is a color at a specific position\&. The valid range for the positions is [0\&.0, 1\&.0]\&. When mapping a value into a color it is translated into this interval according to \fBmode()\fP\&. 
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtLinearColorMap::Mode\fP"
Mode of color map 
.PP
\fBSee also:\fP
.RS 4
\fBsetMode()\fP, \fBmode()\fP 
.RE
.PP

.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIFixedColors \fP\fP
Return the color from the next lower color stop\&. 
.TP
\fB\fIScaledColors \fP\fP
Interpolating the colors of the adjacent stops\&. 
.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtLinearColorMap::QwtLinearColorMap (\fBQwtColorMap::Format\fP format = \fC\fBQwtColorMap::RGB\fP\fP)"
Build a color map with two stops at 0\&.0 and 1\&.0\&. The color at 0\&.0 is Qt::blue, at 1\&.0 it is Qt::yellow\&.
.PP
\fBParameters:\fP
.RS 4
\fIformat\fP Preferred format of the color map 
.RE
.PP

.SS "QwtLinearColorMap::QwtLinearColorMap (const QColor & color1, const QColor & color2, \fBQwtColorMap::Format\fP format = \fC\fBQwtColorMap::RGB\fP\fP)"
Build a color map with two stops at 0\&.0 and 1\&.0\&.
.PP
\fBParameters:\fP
.RS 4
\fIcolor1\fP Color used for the minimum value of the value interval 
.br
\fIcolor2\fP Color used for the maximum value of the value interval 
.br
\fIformat\fP Preferred format for the color map 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "void QwtLinearColorMap::addColorStop (double value, const QColor & color)"
Add a color stop
.PP
The value has to be in the range [0\&.0, 1\&.0]\&. F\&.e\&. a stop at position 17\&.0 for a range [10\&.0,20\&.0] must be passed as: (17\&.0 - 10\&.0) / (20\&.0 - 10\&.0)
.PP
\fBParameters:\fP
.RS 4
\fIvalue\fP Value between [0\&.0, 1\&.0] 
.br
\fIcolor\fP Color stop 
.RE
.PP

.SS "QColor QwtLinearColorMap::color1 () const"

.PP
\fBReturns:\fP
.RS 4
the first color of the color range 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetColorInterval()\fP 
.RE
.PP

.SS "QColor QwtLinearColorMap::color2 () const"

.PP
\fBReturns:\fP
.RS 4
the second color of the color range 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetColorInterval()\fP 
.RE
.PP

.SS "unsigned char QwtLinearColorMap::colorIndex (const \fBQwtInterval\fP & interval, double value) const\fC [virtual]\fP"

.PP
Map a value of a given interval into a color index\&. 
.PP
\fBParameters:\fP
.RS 4
\fIinterval\fP Range for all values 
.br
\fIvalue\fP Value to map into a color index
.RE
.PP
\fBReturns:\fP
.RS 4
Index, between 0 and 255 
.RE
.PP

.PP
Implements \fBQwtColorMap\fP\&.
.SS "QVector< double > QwtLinearColorMap::colorStops () const"

.PP
\fBReturns:\fP
.RS 4
Positions of color stops in increasing order 
.RE
.PP

.SS "\fBQwtLinearColorMap::Mode\fP QwtLinearColorMap::mode () const"

.PP
\fBReturns:\fP
.RS 4
Mode of the color map 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetMode()\fP 
.RE
.PP

.SS "QRgb QwtLinearColorMap::rgb (const \fBQwtInterval\fP & interval, double value) const\fC [virtual]\fP"
Map a value of a given interval into a RGB value
.PP
\fBParameters:\fP
.RS 4
\fIinterval\fP Range for all values 
.br
\fIvalue\fP Value to map into a RGB value
.RE
.PP
\fBReturns:\fP
.RS 4
RGB value for value 
.RE
.PP

.PP
Implements \fBQwtColorMap\fP\&.
.SS "void QwtLinearColorMap::setColorInterval (const QColor & color1, const QColor & color2)"
Set the color range
.PP
Add stops at 0\&.0 and 1\&.0\&.
.PP
\fBParameters:\fP
.RS 4
\fIcolor1\fP Color used for the minimum value of the value interval 
.br
\fIcolor2\fP Color used for the maximum value of the value interval
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcolor1()\fP, \fBcolor2()\fP 
.RE
.PP

.SS "void QwtLinearColorMap::setMode (\fBMode\fP mode)"

.PP
Set the mode of the color map\&. FixedColors means the color is calculated from the next lower color stop\&. ScaledColors means the color is calculated by interpolating the colors of the adjacent stops\&.
.PP
\fBSee also:\fP
.RS 4
\fBmode()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.