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
|
<!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'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 <span id="projectnumber">6.0.0</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related 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 List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<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 <<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="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  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670">Format</a> { <br/>
  <a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a">RGB</a>,
<br/>
  <a class="el" href="class_qwt_color_map.html#a9e5570790910fa3894887bca7dc5a670a304cb055c004223ca77f1a4cbbf27ea2">Indexed</a>
<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"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#af20e4ffdb3c5d34f5a6dc301bcbb9f7e">~QwtColorMap</a> ()</td></tr>
<tr><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#a436802833ae1d4694f376655bc3d75be">format</a> () const </td></tr>
<tr><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><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><td class="memItemLeft" align="right" valign="top">QColor </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_color_map.html#a35f74175e963d18e451a9fd4421ede1f">color</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &, double value) const </td></tr>
<tr><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#af8cea9474cefdcc7431fdf857f1e3593">colorTable</a> (const <a class="el" href="class_qwt_interval.html">QwtInterval</a> &) const </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">
<p>Format for color mapping </p>
<dl class="see"><dt><b>See also:</b></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#af8cea9474cefdcc7431fdf857f1e3593">colorTable()</a> </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a"></a><!-- doxytag: member="RGB" ref="a9e5570790910fa3894887bca7dc5a670a663473fd836d9a84fe48ae1755de326a" args="" -->RGB</em> </td><td>
<p>The map is intended to map into QRgb values. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a9e5570790910fa3894887bca7dc5a670a304cb055c004223ca77f1a4cbbf27ea2"></a><!-- doxytag: member="Indexed" ref="a9e5570790910fa3894887bca7dc5a670a304cb055c004223ca77f1a4cbbf27ea2" args="" -->Indexed</em> </td><td>
<p>The map is intended to map into 8 bit values, that are indices into the color table. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Constructor & 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> </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="a35f74175e963d18e451a9fd4421ede1f"></a><!-- doxytag: member="QwtColorMap::color" ref="a35f74175e963d18e451a9fd4421ede1f" args="(const QwtInterval &, 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_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<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#a762baa2edca8773ec09e0c1c5df2cf04">colorIndex()</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a762baa2edca8773ec09e0c1c5df2cf04"></a><!-- doxytag: member="QwtColorMap::colorIndex" ref="a762baa2edca8773ec09e0c1c5df2cf04" args="(const QwtInterval &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_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<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#aa69528213eb7d484466f095c8a9a6efe">QwtLinearColorMap</a>.</p>
</div>
</div>
<a class="anchor" id="af8cea9474cefdcc7431fdf857f1e3593"></a><!-- doxytag: member="QwtColorMap::colorTable" ref="af8cea9474cefdcc7431fdf857f1e3593" args="(const QwtInterval &) 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_interval.html">QwtInterval</a> & </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#a762baa2edca8773ec09e0c1c5df2cf04">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="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="aaed0bb47b6379696c588732348438136"></a><!-- doxytag: member="QwtColorMap::rgb" ref="aaed0bb47b6379696c588732348438136" args="(const QwtInterval &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_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<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#ac031babccc90d8c857c707d0841ba1eb">QwtLinearColorMap</a>, and <a class="el" href="class_qwt_alpha_color_map.html#a2f0ce2bdaecf7e74b635b8433ed733d5">QwtAlphaColorMap</a>.</p>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
|