1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/painting/qcolormap_x11.cpp -->
7
<title>Qt 4.0: QColormap Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QColormap Class Reference</h1>
21
<p>The QColormap class maps device independent QColors to device dependent pixel values. <a href="#details">More...</a></p>
22
<pre>#include <QColormap></pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
24
<li><a href="qcolormap-members.html">List of all members, including inherited members</a></li>
26
<a name="public-types"></a>
29
<li><div class="fn"/>enum <b><a href="qcolormap.html#Mode-enum">Mode</a></b> { Direct, Indexed, Gray }</li>
31
<a name="public-functions"></a>
32
<h3>Public Functions</h3>
34
<li><div class="fn"/><b><a href="qcolormap.html#QColormap">QColormap</a></b> ( const QColormap & <i>colormap</i> )</li>
35
<li><div class="fn"/><b><a href="qcolormap.html#dtor.QColormap">~QColormap</a></b> ()</li>
36
<li><div class="fn"/>const QColor <b><a href="qcolormap.html#colorAt">colorAt</a></b> ( uint <i>pixel</i> ) const</li>
37
<li><div class="fn"/>const QVector<QColor> <b><a href="qcolormap.html#colormap">colormap</a></b> () const</li>
38
<li><div class="fn"/>int <b><a href="qcolormap.html#depth">depth</a></b> () const</li>
39
<li><div class="fn"/>Mode <b><a href="qcolormap.html#mode">mode</a></b> () const</li>
40
<li><div class="fn"/>uint <b><a href="qcolormap.html#pixel">pixel</a></b> ( const QColor & <i>color</i> ) const</li>
41
<li><div class="fn"/>int <b><a href="qcolormap.html#size">size</a></b> () const</li>
42
<li><div class="fn"/>QColormap & <b><a href="qcolormap.html#operator-eq">operator=</a></b> ( const QColormap & <i>colormap</i> )</li>
44
<a name="static-public-members"></a>
45
<h3>Static Public Members</h3>
47
<li><div class="fn"/>HPALETTE <b><a href="qcolormap.html#hPal">hPal</a></b> ()</li>
48
<li><div class="fn"/>QColormap <b><a href="qcolormap.html#instance">instance</a></b> ( int <i>screen</i> = -1 )</li>
50
<a name="details"></a>
52
<h2>Detailed Description</h2>
53
<p>The QColormap class maps device independent QColors to device dependent pixel values.</p>
55
<h2>Member Type Documentation</h2>
56
<h3 class="fn"><a name="Mode-enum"></a>enum QColormap::Mode</h3>
57
<p>This enum describes how <a href="qcolormap.html">QColormap</a> maps device independent RGB values to device dependent pixel values.</p>
58
<table border="1" cellpadding="2" cellspacing="1" width="100%">
59
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
60
<tr><td valign="top"><tt>QColormap::Direct</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Pixel values are derived directly from the RGB values, also known as "True Color."</td></tr>
61
<tr><td valign="top"><tt>QColormap::Indexed</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Pixel values represent indexes into a vector of available colors, i.e. <a href="qcolormap.html">QColormap</a> uses the index of the color that most closely matches an RGB value.</td></tr>
62
<tr><td valign="top"><tt>QColormap::Gray</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Similar to <tt>Indexed</tt>, pixel values represent a vector of available gray tones. <a href="qcolormap.html">QColormap</a> uses the index of the gray tone that most closely matches the computed gray tone of an RGB value.</td></tr>
65
<h2>Member Function Documentation</h2>
66
<h3 class="fn"><a name="QColormap"></a>QColormap::QColormap ( const QColormap & <i>colormap</i> )</h3>
67
<p>Constructs a copy of another <i>colormap</i>.</p>
68
<h3 class="fn"><a name="dtor.QColormap"></a>QColormap::~QColormap ()</h3>
69
<p>Destroys the colormap.</p>
70
<h3 class="fn"><a name="colorAt"></a>const <a href="qcolor.html">QColor</a> QColormap::colorAt ( <a href="qtglobal.html#uint-typedef">uint</a> <i>pixel</i> ) const</h3>
71
<p>Returns a <a href="qcolor.html">QColor</a> for the <i>pixel</i>.</p>
72
<p>See also <a href="qcolormap.html#pixel">pixel</a>().</p>
73
<h3 class="fn"><a name="colormap"></a>const <a href="qvector.html">QVector</a><<a href="qcolor.html">QColor</a>> QColormap::colormap () const</h3>
74
<p>Returns a vector of colors which represents the devices colormap for <tt>Indexed</tt> and <tt>Gray</tt> modes. This function returns an empty vector for <tt>Direct</tt> mode.</p>
75
<p>See also <a href="qcolormap.html#size">size</a>().</p>
76
<h3 class="fn"><a name="depth"></a>int QColormap::depth () const</h3>
77
<p>Returns the depth of the device.</p>
78
<p>See also <a href="qcolormap.html#size">size</a>().</p>
79
<h3 class="fn"><a name="hPal"></a>HPALETTE QColormap::hPal () <tt> [static]</tt></h3>
80
<p>This function is only available on Windows.</p>
81
<p>Returns an handle to the HPALETTE used by this colormap. If no HPALETTE is being used, this function returns zero.</p>
82
<h3 class="fn"><a name="instance"></a>QColormap QColormap::instance ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3>
83
<p>Returns the colormap for the specified <i>screen</i>. If <i>screen</i> is -1, this function returns the colormap for the default screen.</p>
84
<h3 class="fn"><a name="mode"></a><a href="qcolormap.html#Mode-enum">Mode</a> QColormap::mode () const</h3>
85
<p>Returns the mode of this colormap.</p>
86
<p>See also <a href="qcolormap.html#Mode-enum">QColormap::Mode</a>.</p>
87
<h3 class="fn"><a name="pixel"></a><a href="qtglobal.html#uint-typedef">uint</a> QColormap::pixel ( const <a href="qcolor.html">QColor</a> & <i>color</i> ) const</h3>
88
<p>Returns a device dependent pixel value for the <i>color</i>.</p>
89
<p>See also <a href="qcolormap.html#colorAt">colorAt</a>().</p>
90
<h3 class="fn"><a name="size"></a>int QColormap::size () const</h3>
91
<p>Returns the size of the colormap for <tt>Indexed</tt> and <tt>Gray</tt> modes; Returns -1 for <tt>Direct</tt> mode.</p>
92
<p>See also <a href="qcolormap.html#colormap">colormap</a>().</p>
93
<h3 class="fn"><a name="operator-eq"></a>QColormap & QColormap::operator= ( const QColormap & <i>colormap</i> )</h3>
94
<p /><address><hr /><div align="center">
95
<table width="100%" cellspacing="0" border="0"><tr class="address">
96
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
97
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
98
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
99
</tr></table></div></address></body>