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 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
|
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User's Guide: QwtColorMap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Qwt User's Guide
 <span id="projectnumber">6.1.4</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_qwt_color_map.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="class_qwt_color_map-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">QwtColorMap Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<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="class_qwt_color_map.html#details">More...</a></p>
<p><code>#include <<a class="el" href="qwt__color__map_8h_source.html">qwt_color_map.h</a>></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="node2" href="class_qwt_alpha_color_map.html" title="QwtAlphaColorMap varies the alpha value of a color. " alt="" coords="5,80,144,107"/>
<area shape="rect" id="node3" href="class_qwt_linear_color_map.html" title="QwtLinearColorMap builds a color map from color stops. " alt="" coords="168,80,309,107"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a9e5570790910fa3894887bca7dc5a670"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> { <a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a">RGB</a>,
<a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670a304cb055c004223ca77f1a4cbbf27ea2">Indexed</a>
}</td></tr>
<tr class="separator:a9e5570790910fa3894887bca7dc5a670"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2ab0a6041ea6d37c0609ca2e3bd976ca"><td class="memItemLeft" align="right" valign="top"><a id="a2ab0a6041ea6d37c0609ca2e3bd976ca"></a>
 </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>=<a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a">QwtColorMap::RGB</a>)</td></tr>
<tr class="memdesc:a2ab0a6041ea6d37c0609ca2e3bd976ca"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a2ab0a6041ea6d37c0609ca2e3bd976ca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af20e4ffdb3c5d34f5a6dc301bcbb9f7e"><td class="memItemLeft" align="right" valign="top"><a id="af20e4ffdb3c5d34f5a6dc301bcbb9f7e"></a>
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#af20e4ffdb3c5d34f5a6dc301bcbb9f7e">~QwtColorMap</a> ()</td></tr>
<tr class="memdesc:af20e4ffdb3c5d34f5a6dc301bcbb9f7e"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:af20e4ffdb3c5d34f5a6dc301bcbb9f7e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6a7defcce42e779c1596e277c78986c2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a6a7defcce42e779c1596e277c78986c2">format</a> () const</td></tr>
<tr class="separator:a6a7defcce42e779c1596e277c78986c2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaed0bb47b6379696c588732348438136"><td class="memItemLeft" align="right" valign="top">virtual QRgb </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#aaed0bb47b6379696c588732348438136">rgb</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &interval, double value) const =0</td></tr>
<tr class="separator:aaed0bb47b6379696c588732348438136"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a762baa2edca8773ec09e0c1c5df2cf04"><td class="memItemLeft" align="right" valign="top">virtual unsigned char </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a762baa2edca8773ec09e0c1c5df2cf04">colorIndex</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &interval, double value) const =0</td></tr>
<tr class="separator:a762baa2edca8773ec09e0c1c5df2cf04"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ef0ebd270a05712715bfdfbe59f35d5"><td class="memItemLeft" align="right" valign="top">QColor </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a7ef0ebd270a05712715bfdfbe59f35d5">color</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &, double value) const</td></tr>
<tr class="separator:a7ef0ebd270a05712715bfdfbe59f35d5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2e41c503838aea8ed617958aa9b9e5bf"><td class="memItemLeft" align="right" valign="top">virtual QVector< QRgb > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a2e41c503838aea8ed617958aa9b9e5bf">colorTable</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &) const</td></tr>
<tr class="separator:a2e41c503838aea8ed617958aa9b9e5bf"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">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 />
<dl class="section see"><dt>See also</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>
</li>
</ul>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a9e5570790910fa3894887bca7dc5a670"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e5570790910fa3894887bca7dc5a670">◆ </a></span>Format</h2>
<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">
<p>Format for color mapping </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_color_map.html#aaed0bb47b6379696c588732348438136">rgb()</a>, <a class="el" href="class_qwt_color_map.html#a762baa2edca8773ec09e0c1c5df2cf04">colorIndex()</a>, <a class="el" href="class_qwt_color_map.html#a2e41c503838aea8ed617958aa9b9e5bf">colorTable()</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a"></a>RGB </td><td class="fielddoc"><p>The map is intended to map into RGB values. </p>
</td></tr>
<tr><td class="fieldname"><a id="a9e5570790910fa3894887bca7dc5a670a304cb055c004223ca77f1a4cbbf27ea2"></a>Indexed </td><td class="fielddoc"><p>The map is intended to map into 8 bit values, that are indices into the color table. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7ef0ebd270a05712715bfdfbe59f35d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ef0ebd270a05712715bfdfbe59f35d5">◆ </a></span>color()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QColor QwtColorMap::color </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_qwt_interval.html">QwtInterval</a> & </td>
<td class="paramname"><em>interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Map a value into a color</p>
<dl class="params"><dt>Parameters</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="section return"><dt>Returns</dt><dd>Color corresponding to value</dd></dl>
<dl class="section warning"><dt>Warning</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#a762baa2edca8773ec09e0c1c5df2cf04">colorIndex()</a>. </dd></dl>
</div>
</div>
<a id="a762baa2edca8773ec09e0c1c5df2cf04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a762baa2edca8773ec09e0c1c5df2cf04">◆ </a></span>colorIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<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_interval.html">QwtInterval</a> & </td>
<td class="paramname"><em>interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Map a value of a given interval into a color index</p>
<dl class="params"><dt>Parameters</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="section return"><dt>Returns</dt><dd>color index, corresponding to value </dd></dl>
<p>Implemented in <a class="el" href="class_qwt_linear_color_map.html#a0daffa17d380dd51b6186f75cf207ec6">QwtLinearColorMap</a>.</p>
</div>
</div>
<a id="a2e41c503838aea8ed617958aa9b9e5bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e41c503838aea8ed617958aa9b9e5bf">◆ </a></span>colorTable()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QVector< QRgb > QwtColorMap::colorTable </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_qwt_interval.html">QwtInterval</a> & </td>
<td class="paramname"><em>interval</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </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#a762baa2edca8773ec09e0c1c5df2cf04">colorIndex()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">interval</td><td>Range for the values </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A color table, that can be used for a QImage </dd></dl>
</div>
</div>
<a id="a6a7defcce42e779c1596e277c78986c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a7defcce42e779c1596e277c78986c2">◆ </a></span>format()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<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</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Intended format of the color map </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> </dd></dl>
</div>
</div>
<a id="aaed0bb47b6379696c588732348438136"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaed0bb47b6379696c588732348438136">◆ </a></span>rgb()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual QRgb QwtColorMap::rgb </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_qwt_interval.html">QwtInterval</a> & </td>
<td class="paramname"><em>interval</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Map a value of a given interval into a RGB value.</p>
<dl class="params"><dt>Parameters</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="section return"><dt>Returns</dt><dd>RGB value, corresponding to value </dd></dl>
<p>Implemented in <a class="el" href="class_qwt_alpha_color_map.html#a15815e2d6637941bc8e806afbb99c170">QwtAlphaColorMap</a>, and <a class="el" href="class_qwt_linear_color_map.html#a2b3a87791791eea4b53a94fafd541f9c">QwtLinearColorMap</a>.</p>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_qwt_color_map.html">QwtColorMap</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>
|