This file is indexed.

/usr/share/doc/libqcustomplot-doc/html/classQCPColorGradient.html is in libqcustomplot-doc 1.3.2+dfsg1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<!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 name="author" content="Emanuel Eichhammer" />
<meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
<title>QCPColorGradient Class Reference</title>
<link href="qt.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top">
<a class="headerLink"  href="index.html">Main Page</a> &middot;
<a class="headerLink"  href="classoverview.html">Class Overview</a> &middot;
<a class="headerLink"  href="hierarchy.html">Hierarchy</a> &middot;
<a class="headerLink"  href="annotated.html">All Classes</a> &middot;
<a class="headerLink"  href="pages.html">Special Pages</a>
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Functions</a> &#124;
<a href="#pro-methods">Protected Functions</a>  </div>
  <div class="headertitle">
<div class="title">QCPColorGradient Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Defines a color gradient for use with e.g. <a class="el" href="classQCPColorMap.html">QCPColorMap</a>.  
 <a href="classQCPColorGradient.html#details">More...</a></p>
<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:ac5dca17cc24336e6ca176610e7f77fc1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#ac5dca17cc24336e6ca176610e7f77fc1">ColorInterpolation</a> </td></tr>
<tr class="separator:ac5dca17cc24336e6ca176610e7f77fc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed6569828fee337023670272910c9072"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a> </td></tr>
<tr class="separator:aed6569828fee337023670272910c9072"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Functions</h2></td></tr>
<tr class="memitem:a546e44df5fa1846400a582c041361c85"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a546e44df5fa1846400a582c041361c85">QCPColorGradient</a> (<a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a> preset=<a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072aec8c001f62c0d5cb853db5fd85309557">gpCold</a>)</td></tr>
<tr class="separator:a546e44df5fa1846400a582c041361c85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aada47d8206bf2cec77462653bf471c13"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aada47d8206bf2cec77462653bf471c13"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator==</b> (const <a class="el" href="classQCPColorGradient.html">QCPColorGradient</a> &amp;other) const </td></tr>
<tr class="separator:aada47d8206bf2cec77462653bf471c13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac641f5d2dc1686201d3cb602c871791d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac641f5d2dc1686201d3cb602c871791d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="classQCPColorGradient.html">QCPColorGradient</a> &amp;other) const </td></tr>
<tr class="separator:ac641f5d2dc1686201d3cb602c871791d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7537a8e6d0fed3f1928328062bb0f4e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7537a8e6d0fed3f1928328062bb0f4e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>levelCount</b> () const </td></tr>
<tr class="separator:ae7537a8e6d0fed3f1928328062bb0f4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64f8aba7826f9c6363aacff8376cef37"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64f8aba7826f9c6363aacff8376cef37"></a>
QMap&lt; double, QColor &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>colorStops</b> () const </td></tr>
<tr class="separator:a64f8aba7826f9c6363aacff8376cef37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a731616fabe6f2e33f71f58dd382359d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a731616fabe6f2e33f71f58dd382359d8"></a>
<a class="el" href="classQCPColorGradient.html#ac5dca17cc24336e6ca176610e7f77fc1">ColorInterpolation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>colorInterpolation</b> () const </td></tr>
<tr class="separator:a731616fabe6f2e33f71f58dd382359d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a860b7048f877195d2a0fb8d5a7cf5d73"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a860b7048f877195d2a0fb8d5a7cf5d73"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>periodic</b> () const </td></tr>
<tr class="separator:a860b7048f877195d2a0fb8d5a7cf5d73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18da587eb4f7fc788ea28ba15b6a12de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a18da587eb4f7fc788ea28ba15b6a12de">setLevelCount</a> (int n)</td></tr>
<tr class="separator:a18da587eb4f7fc788ea28ba15b6a12de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a724e828aa6f0ba5011a9392477c35d3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a724e828aa6f0ba5011a9392477c35d3a">setColorStops</a> (const QMap&lt; double, QColor &gt; &amp;colorStops)</td></tr>
<tr class="separator:a724e828aa6f0ba5011a9392477c35d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b48be5e78079db1bb2a1188a4c3390e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt</a> (double position, const QColor &amp;<a class="el" href="classQCPColorGradient.html#a0599545c859268b025d2060dea741cea">color</a>)</td></tr>
<tr class="separator:a3b48be5e78079db1bb2a1188a4c3390e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13fda86406e1d896a465a409ae63b38"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#aa13fda86406e1d896a465a409ae63b38">setColorInterpolation</a> (<a class="el" href="classQCPColorGradient.html#ac5dca17cc24336e6ca176610e7f77fc1">ColorInterpolation</a> interpolation)</td></tr>
<tr class="separator:aa13fda86406e1d896a465a409ae63b38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39d6448155fc00a219f239220d14bb39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a39d6448155fc00a219f239220d14bb39">setPeriodic</a> (bool enabled)</td></tr>
<tr class="separator:a39d6448155fc00a219f239220d14bb39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf423ceb943e177b0ed2c48c811d83dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#aaf423ceb943e177b0ed2c48c811d83dc">colorize</a> (const double *data, const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)</td></tr>
<tr class="separator:aaf423ceb943e177b0ed2c48c811d83dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0599545c859268b025d2060dea741cea"><td class="memItemLeft" align="right" valign="top">QRgb&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a0599545c859268b025d2060dea741cea">color</a> (double position, const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;range, bool logarithmic=false)</td></tr>
<tr class="separator:a0599545c859268b025d2060dea741cea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0aeec1528241728b9671bf8e60b1622"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#aa0aeec1528241728b9671bf8e60b1622">loadPreset</a> (<a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a> preset)</td></tr>
<tr class="separator:aa0aeec1528241728b9671bf8e60b1622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939213e85f0d1279519d555c5fcfb6ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a939213e85f0d1279519d555c5fcfb6ad">clearColorStops</a> ()</td></tr>
<tr class="separator:a939213e85f0d1279519d555c5fcfb6ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe04e1d1ccab3d7aa78f2924faed4916"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classQCPColorGradient.html">QCPColorGradient</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#abe04e1d1ccab3d7aa78f2924faed4916">inverted</a> () const </td></tr>
<tr class="separator:abe04e1d1ccab3d7aa78f2924faed4916"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Functions</h2></td></tr>
<tr class="memitem:a353f15ab3ab586eebf1f6b58c3e2707b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPColorGradient.html#a353f15ab3ab586eebf1f6b58c3e2707b">updateColorBuffer</a> ()</td></tr>
<tr class="separator:a353f15ab3ab586eebf1f6b58c3e2707b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Defines a color gradient for use with e.g. <a class="el" href="classQCPColorMap.html">QCPColorMap</a>. </p>
<p>This class describes a color gradient which can be used to encode data with color. For example, <a class="el" href="classQCPColorMap.html" title="A plottable representing a two-dimensional color map in a plot. ">QCPColorMap</a> and <a class="el" href="classQCPColorScale.html" title="A color scale for use with color coding data such as QCPColorMap. ">QCPColorScale</a> have <a class="el" href="classQCPColorMap.html#a7313c78360471cead3576341a2c50377">setGradient</a> methods which take an instance of this class. Colors are set with <a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt(double position, const QColor &amp;color)</a> with a <em>position</em> from 0 to 1. In between these defined color positions, the color will be interpolated linearly either in RGB or HSV space, see <a class="el" href="classQCPColorGradient.html#aa13fda86406e1d896a465a409ae63b38">setColorInterpolation</a>.</p>
<p>Alternatively, load one of the preset color gradients shown in the image below, with <a class="el" href="classQCPColorGradient.html#aa0aeec1528241728b9671bf8e60b1622">loadPreset</a>, or by directly specifying the preset in the constructor.</p>
<div class="image">
<img src="QCPColorGradient.png" alt="QCPColorGradient.png"/>
</div>
<p>The fact that the <a class="el" href="classQCPColorGradient.html#a546e44df5fa1846400a582c041361c85">QCPColorGradient(GradientPreset preset)</a> constructor allows directly converting a <a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a> to a <a class="el" href="classQCPColorGradient.html" title="Defines a color gradient for use with e.g. QCPColorMap. ">QCPColorGradient</a>, you can also directly pass <a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a> to all the <em>setGradient</em> methods, e.g.: </p>
<div class="fragment"><div class="line">  colorMap-&gt;setGradient(<a class="code" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072a4f42e534cf6cff5a29a5388094d099b5">QCPColorGradient::gpHot</a>);</div>
</div><!-- fragment --><p> The total number of levels used in the gradient can be set with <a class="el" href="classQCPColorGradient.html#a18da587eb4f7fc788ea28ba15b6a12de">setLevelCount</a>. Whether the color gradient shall be applied periodically (wrapping around) to data values that lie outside the data range specified on the plottable instance can be controlled with <a class="el" href="classQCPColorGradient.html#a39d6448155fc00a219f239220d14bb39">setPeriodic</a>. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="ac5dca17cc24336e6ca176610e7f77fc1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classQCPColorGradient.html#ac5dca17cc24336e6ca176610e7f77fc1">QCPColorGradient::ColorInterpolation</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines the color spaces in which color interpolation between gradient stops can be performed.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorGradient.html#aa13fda86406e1d896a465a409ae63b38">setColorInterpolation</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ac5dca17cc24336e6ca176610e7f77fc1a5e30f725c9cfe93999e268a9f92afbe7"></a>ciRGB</em>&#160;</td><td class="fielddoc">
<p>Color channels red, green and blue are linearly interpolated. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ac5dca17cc24336e6ca176610e7f77fc1af14ae62fcae11ecc07234eeaec5856cb"></a>ciHSV</em>&#160;</td><td class="fielddoc">
<p>Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the shortest angle distance) </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="aed6569828fee337023670272910c9072"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">QCPColorGradient::GradientPreset</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines the available presets that can be loaded with <a class="el" href="classQCPColorGradient.html#aa0aeec1528241728b9671bf8e60b1622">loadPreset</a>. See the documentation there for an image of the presets. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072add11ae369a86f3b1b6205ec72e5021fb"></a>gpGrayscale</em>&#160;</td><td class="fielddoc">
<p>Continuous lightness from black to white (suited for non-biased data representation) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a4f42e534cf6cff5a29a5388094d099b5"></a>gpHot</em>&#160;</td><td class="fielddoc">
<p>Continuous lightness from black over firey colors to white (suited for non-biased data representation) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072aec8c001f62c0d5cb853db5fd85309557"></a>gpCold</em>&#160;</td><td class="fielddoc">
<p>Continuous lightness from black over icey colors to white (suited for non-biased data representation) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a1bb89351b6def7d220973443fe059c62"></a>gpNight</em>&#160;</td><td class="fielddoc">
<p>Continuous lightness from black over weak blueish colors to white (suited for non-biased data representation) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a9e72663bf6b94b65945f7843f24e0721"></a>gpCandy</em>&#160;</td><td class="fielddoc">
<p>Blue over pink to white. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a382f0b07cec1a59d8a533438aea815d2"></a>gpGeography</em>&#160;</td><td class="fielddoc">
<p>Colors suitable to represent different elevations on geographical maps. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a4297f4f9e212a819cd65e8e34567182b"></a>gpIon</em>&#160;</td><td class="fielddoc">
<p>Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allows more precise magnitude estimates) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072af1676b129f9f458ace453f280c731cf7"></a>gpThermal</em>&#160;</td><td class="fielddoc">
<p>Colors suitable for thermal imaging, ranging from dark blue over purple to orange, yellow and white. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072ab7414ce4e36dc3e82e0132a7f0f41b52"></a>gpPolar</em>&#160;</td><td class="fielddoc">
<p>Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle and red for positive values. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072ad63adc100ef46f6b4a8a6deacec4642f"></a>gpSpectrum</em>&#160;</td><td class="fielddoc">
<p>An approximation of the visible light spectrum (creates banding illusion but allows more precise magnitude estimates) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a5f8a9e67b64c17ddfe4f069fe2b9fb02"></a>gpJet</em>&#160;</td><td class="fielddoc">
<p>Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion but allows more precise magnitude estimates) </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aed6569828fee337023670272910c9072a30efe58407acfb67939032f70213a130"></a>gpHues</em>&#160;</td><td class="fielddoc">
<p>Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and phases, see <a class="el" href="classQCPColorGradient.html#a39d6448155fc00a219f239220d14bb39">setPeriodic</a>) </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a546e44df5fa1846400a582c041361c85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCPColorGradient::QCPColorGradient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a>&#160;</td>
          <td class="paramname"><em>preset</em> = <code><a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072aec8c001f62c0d5cb853db5fd85309557">gpCold</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructs a new <a class="el" href="classQCPColorGradient.html" title="Defines a color gradient for use with e.g. QCPColorMap. ">QCPColorGradient</a> initialized with the colors and color interpolation according to <em>preset</em>.</p>
<p>The color level count is initialized to 350. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a18da587eb4f7fc788ea28ba15b6a12de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::setLevelCount </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the number of discretization levels of the color gradient to <em>n</em>. The default is 350 which is typically enough to create a smooth appearance.</p>
<div class="image">
<img src="QCPColorGradient-levelcount.png" alt="QCPColorGradient-levelcount.png"/>
</div>
 
</div>
</div>
<a class="anchor" id="a724e828aa6f0ba5011a9392477c35d3a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::setColorStops </td>
          <td>(</td>
          <td class="paramtype">const QMap&lt; double, QColor &gt; &amp;&#160;</td>
          <td class="paramname"><em>colorStops</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets at which positions from 0 to 1 which color shall occur. The positions are the keys, the colors are the values of the passed QMap <em>colorStops</em>. In between these color stops, the color is interpolated according to <a class="el" href="classQCPColorGradient.html#aa13fda86406e1d896a465a409ae63b38">setColorInterpolation</a>.</p>
<p>A more convenient way to create a custom gradient may be to clear all color stops with <a class="el" href="classQCPColorGradient.html#a939213e85f0d1279519d555c5fcfb6ad">clearColorStops</a> and then adding them one by one with <a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorGradient.html#a939213e85f0d1279519d555c5fcfb6ad">clearColorStops</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3b48be5e78079db1bb2a1188a4c3390e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::setColorStopAt </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QColor &amp;&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the <em>color</em> the gradient will have at the specified <em>position</em> (from 0 to 1). In between these color stops, the color is interpolated according to <a class="el" href="classQCPColorGradient.html#aa13fda86406e1d896a465a409ae63b38">setColorInterpolation</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorGradient.html#a724e828aa6f0ba5011a9392477c35d3a">setColorStops</a>, <a class="el" href="classQCPColorGradient.html#a939213e85f0d1279519d555c5fcfb6ad">clearColorStops</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa13fda86406e1d896a465a409ae63b38"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::setColorInterpolation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPColorGradient.html#ac5dca17cc24336e6ca176610e7f77fc1">QCPColorGradient::ColorInterpolation</a>&#160;</td>
          <td class="paramname"><em>interpolation</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets whether the colors in between the configured color stops (see <a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt</a>) shall be interpolated linearly in RGB or in HSV color space.</p>
<p>For example, a sweep in RGB space from red to green will have a muddy brown intermediate color, whereas in HSV space the intermediate color is yellow. </p>

</div>
</div>
<a class="anchor" id="a39d6448155fc00a219f239220d14bb39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::setPeriodic </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets whether data points that are outside the configured data range (e.g. <a class="el" href="classQCPColorMap.html#a980b42837821159786a85b4b7dcb8774">QCPColorMap::setDataRange</a>) are colored by periodically repeating the color gradient or whether they all have the same color, corresponding to the respective gradient boundary color.</p>
<div class="image">
<img src="QCPColorGradient-periodic.png" alt="QCPColorGradient-periodic.png"/>
</div>
<p>As shown in the image above, gradients that have the same start and end color are especially suitable for a periodic gradient mapping, since they produce smooth color transitions throughout the color map. A preset that has this property is <a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072a30efe58407acfb67939032f70213a130">gpHues</a>.</p>
<p>In practice, using periodic color gradients makes sense when the data corresponds to a periodic dimension, such as an angle or a phase. If this is not the case, the color encoding might become ambiguous, because multiple different data values are shown as the same color. </p>

</div>
</div>
<a class="anchor" id="aaf423ceb943e177b0ed2c48c811d83dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::colorize </td>
          <td>(</td>
          <td class="paramtype">const double *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;&#160;</td>
          <td class="paramname"><em>range</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRgb *&#160;</td>
          <td class="paramname"><em>scanLine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dataIndexFactor</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>logarithmic</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method is used to quickly convert a <em>data</em> array to colors. The colors will be output in the array <em>scanLine</em>. Both <em>data</em> and <em>scanLine</em> must have the length <em>n</em> when passed to this function. The data range that shall be used for mapping the data value to the gradient is passed in <em>range</em>. <em>logarithmic</em> indicates whether the data values shall be mapped to colors logarithmically.</p>
<p>if <em>data</em> actually contains 2D-data linearized via <code>[row*columnCount + column]</code>, you can set <em>dataIndexFactor</em> to <code>columnCount</code> to convert a column instead of a row of the data array, in <em>scanLine</em>. <em>scanLine</em> will remain a regular (1D) array. This works because <em>data</em> is addressed <code>data[i*dataIndexFactor]</code>. </p>

</div>
</div>
<a class="anchor" id="a0599545c859268b025d2060dea741cea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRgb QCPColorGradient::color </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classQCPRange.html">QCPRange</a> &amp;&#160;</td>
          <td class="paramname"><em>range</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>logarithmic</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This method is used to colorize a single data value given in <em>position</em>, to colors. The data range that shall be used for mapping the data value to the gradient is passed in <em>range</em>. <em>logarithmic</em> indicates whether the data value shall be mapped to a color logarithmically.</p>
<p>If an entire array of data values shall be converted, rather use <a class="el" href="classQCPColorGradient.html#aaf423ceb943e177b0ed2c48c811d83dc">colorize</a>, for better performance. </p>

</div>
</div>
<a class="anchor" id="aa0aeec1528241728b9671bf8e60b1622"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::loadPreset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQCPColorGradient.html#aed6569828fee337023670272910c9072">GradientPreset</a>&#160;</td>
          <td class="paramname"><em>preset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears the current color stops and loads the specified <em>preset</em>. A preset consists of predefined color stops and the corresponding color interpolation method.</p>
<p>The available presets are: </p>
<div class="image">
<img src="QCPColorGradient.png" alt="QCPColorGradient.png"/>
</div>
 
</div>
</div>
<a class="anchor" id="a939213e85f0d1279519d555c5fcfb6ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::clearColorStops </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears all color stops.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorGradient.html#a724e828aa6f0ba5011a9392477c35d3a">setColorStops</a>, <a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt</a> </dd></dl>

</div>
</div>
<a class="anchor" id="abe04e1d1ccab3d7aa78f2924faed4916"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classQCPColorGradient.html">QCPColorGradient</a> QCPColorGradient::inverted </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns an inverted gradient. The inverted gradient has all properties as this <a class="el" href="classQCPColorGradient.html">QCPColorGradient</a>, but the order of the color stops is inverted.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPColorGradient.html#a724e828aa6f0ba5011a9392477c35d3a">setColorStops</a>, <a class="el" href="classQCPColorGradient.html#a3b48be5e78079db1bb2a1188a4c3390e">setColorStopAt</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a353f15ab3ab586eebf1f6b58c3e2707b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QCPColorGradient::updateColorBuffer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Updates the internal color buffer which will be used by <a class="el" href="classQCPColorGradient.html#aaf423ceb943e177b0ed2c48c811d83dc">colorize</a> and <a class="el" href="classQCPColorGradient.html#a0599545c859268b025d2060dea741cea">color</a>, to quickly convert positions to colors. This is where the interpolation between color stops is calculated. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/colorgradient.h</li>
<li>src/colorgradient.cpp</li>
</ul>
</div><!-- contents -->
</body>
</html>