File: class_qwt_color_map.html

package info (click to toggle)
qwt5 5.2.2-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,340 kB
  • sloc: cpp: 32,645; makefile: 23; sh: 4
file content (335 lines) | stat: -rw-r--r-- 16,898 bytes parent folder | download
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Qwt User&#39;s Guide: QwtColorMap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Qwt User's Guide&#160;<span id="projectnumber">5.2.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>QwtColorMap Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="QwtColorMap" -->
<p><a class="el" href="class_qwt_color_map.html" title="QwtColorMap is used to map values into colors.">QwtColorMap</a> is used to map values into colors.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qwt__color__map_8h_source.html">qwt_color_map.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QwtColorMap:</div>
<div class="dyncontent">
<div class="center"><img src="class_qwt_color_map__inherit__graph.png" border="0" usemap="#_qwt_color_map_inherit__map" alt="Inheritance graph"/></div>
<map name="_qwt_color_map_inherit__map" id="_qwt_color_map_inherit__map">
<area shape="rect" id="node3" href="class_qwt_alpha_color_map.html" title="QwtAlphaColorMap variies the alpha value of a color." alt="" coords="5,86,139,117"/><area shape="rect" id="node5" href="class_qwt_linear_color_map.html" title="QwtLinearColorMap builds a color map from color stops." alt="" coords="163,86,296,117"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="class_qwt_color_map-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> { <br/>
&#160;&#160;<b>RGB</b>, 
<br/>
&#160;&#160;<b>Indexed</b>
<br/>
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QColor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#af5f3c1df460cee0ec48005e7f161423d">color</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;, double value) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a3b5be7f953330d308eef24351dfa789b">colorIndex</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;interval, double value) const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QVector&lt; QRgb &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a082823238104fbc6cb146e7aafa571f6">colorTable</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_qwt_color_map.html">QwtColorMap</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a97c746ff74f5fe96867dde5bde3e23f5">copy</a> () const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a436802833ae1d4694f376655bc3d75be">format</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a2ab0a6041ea6d37c0609ca2e3bd976ca">QwtColorMap</a> (<a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a>=QwtColorMap::RGB)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QRgb&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#abe172f151f0a8c24f4a7e0908b0b983f">rgb</a> (const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;interval, double value) const =0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#af20e4ffdb3c5d34f5a6dc301bcbb9f7e">~QwtColorMap</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_qwt_color_map.html" title="QwtColorMap is used to map values into colors.">QwtColorMap</a> is used to map values into colors. </p>
<p>For displaying 3D data on a 2D plane the 3rd dimension is often displayed using colors, like f.e in a spectrogram.</p>
<p>Each color map is optimized to return colors for only one of the following image formats:</p>
<ul>
<li>QImage::Format_Indexed8<br/>
</li>
<li>QImage::Format_ARGB32<br/>
</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_plot_spectrogram.html" title="A plot item, which displays a spectrogram.">QwtPlotSpectrogram</a>, <a class="el" href="class_qwt_scale_widget.html" title="A Widget which contains a scale.">QwtScaleWidget</a> </dd></dl>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a9e5570790910fa3894887bca7dc5a670"></a><!-- doxytag: member="QwtColorMap::Format" ref="a9e5570790910fa3894887bca7dc5a670" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">QwtColorMap::Format</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<ul>
<li>RGB<br/>
 The map is intended to map into QRgb values.</li>
<li>Indexed<br/>
 The map is intended to map into 8 bit values, that are indices into the color table.</li>
</ul>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_color_map.html#abe172f151f0a8c24f4a7e0908b0b983f">rgb()</a>, <a class="el" href="class_qwt_color_map.html#a3b5be7f953330d308eef24351dfa789b">colorIndex()</a>, <a class="el" href="class_qwt_color_map.html#a082823238104fbc6cb146e7aafa571f6">colorTable()</a> </dd></dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2ab0a6041ea6d37c0609ca2e3bd976ca"></a><!-- doxytag: member="QwtColorMap::QwtColorMap" ref="a2ab0a6041ea6d37c0609ca2e3bd976ca" args="(Format=QwtColorMap::RGB)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QwtColorMap::QwtColorMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a>&#160;</td>
          <td class="paramname"><em>format</em> = <code>QwtColorMap::RGB</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>

</div>
</div>
<a class="anchor" id="af20e4ffdb3c5d34f5a6dc301bcbb9f7e"></a><!-- doxytag: member="QwtColorMap::~QwtColorMap" ref="af20e4ffdb3c5d34f5a6dc301bcbb9f7e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QwtColorMap::~QwtColorMap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af5f3c1df460cee0ec48005e7f161423d"></a><!-- doxytag: member="QwtColorMap::color" ref="af5f3c1df460cee0ec48005e7f161423d" args="(const QwtDoubleInterval &amp;, double value) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QColor QwtColorMap::color </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;&#160;</td>
          <td class="paramname"><em>interval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Map a value into a color</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>Valid interval for values </td></tr>
    <tr><td class="paramname">value</td><td>Value</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Color corresponding to value</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>This method is slow for Indexed color maps. If it is necessary to map many values, its better to get the color table once and find the color using <a class="el" href="class_qwt_color_map.html#a3b5be7f953330d308eef24351dfa789b">colorIndex()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a3b5be7f953330d308eef24351dfa789b"></a><!-- doxytag: member="QwtColorMap::colorIndex" ref="a3b5be7f953330d308eef24351dfa789b" args="(const QwtDoubleInterval &amp;interval, double value) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual unsigned char QwtColorMap::colorIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;&#160;</td>
          <td class="paramname"><em>interval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Map a value of a given interval into a color index </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>Range for the values </td></tr>
    <tr><td class="paramname">value</td><td>Value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>color index, corresponding to value </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_linear_color_map.html#acdd4288a6187348cba916fc7dd1d750b">QwtLinearColorMap</a>.</p>

</div>
</div>
<a class="anchor" id="a082823238104fbc6cb146e7aafa571f6"></a><!-- doxytag: member="QwtColorMap::colorTable" ref="a082823238104fbc6cb146e7aafa571f6" args="(const QwtDoubleInterval &amp;) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QwtColorTable QwtColorMap::colorTable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;&#160;</td>
          <td class="paramname"><em>interval</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Build and return a color map of 256 colors</p>
<p>The color table is needed for rendering indexed images in combination with using <a class="el" href="class_qwt_color_map.html#a3b5be7f953330d308eef24351dfa789b">colorIndex()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>Range for the values </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A color table, that can be used for a QImage </dd></dl>

</div>
</div>
<a class="anchor" id="a97c746ff74f5fe96867dde5bde3e23f5"></a><!-- doxytag: member="QwtColorMap::copy" ref="a97c746ff74f5fe96867dde5bde3e23f5" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_qwt_color_map.html">QwtColorMap</a>* QwtColorMap::copy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clone the color map. </p>

<p>Implemented in <a class="el" href="class_qwt_linear_color_map.html#ace66f2146c718e450878e164a727c7a8">QwtLinearColorMap</a>, and <a class="el" href="class_qwt_alpha_color_map.html#a75c4858f181f327778736b6ebb9f2745">QwtAlphaColorMap</a>.</p>

</div>
</div>
<a class="anchor" id="a436802833ae1d4694f376655bc3d75be"></a><!-- doxytag: member="QwtColorMap::format" ref="a436802833ae1d4694f376655bc3d75be" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">QwtColorMap::Format</a> QwtColorMap::format </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>Intended format of the color map </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> </dd></dl>

</div>
</div>
<a class="anchor" id="abe172f151f0a8c24f4a7e0908b0b983f"></a><!-- doxytag: member="QwtColorMap::rgb" ref="abe172f151f0a8c24f4a7e0908b0b983f" args="(const QwtDoubleInterval &amp;interval, double value) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QRgb QwtColorMap::rgb </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_qwt_double_interval.html">QwtDoubleInterval</a> &amp;&#160;</td>
          <td class="paramname"><em>interval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Map a value of a given interval into a rgb value. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>Range for the values </td></tr>
    <tr><td class="paramname">value</td><td>Value </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>rgb value, corresponding to value </dd></dl>

<p>Implemented in <a class="el" href="class_qwt_linear_color_map.html#adb056bd9487fde980a85da8ea5ec6188">QwtLinearColorMap</a>, and <a class="el" href="class_qwt_alpha_color_map.html#aec09e7fc85a746653d4065c736166459">QwtAlphaColorMap</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>