Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'
[profile/ivi/qtbase.git] / src / gui / painting / qcolormap.qdoc
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the documentation of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:FDL$
10 ** GNU Free Documentation License
11 ** Alternatively, this file may be used under the terms of the GNU Free
12 ** Documentation License version 1.3 as published by the Free Software
13 ** Foundation and appearing in the file included in the packaging of
14 ** this file.
15 **
16 ** Other Usage
17 ** Alternatively, this file may be used in accordance with the terms
18 ** and conditions contained in a signed written agreement between you
19 ** and Nokia.
20 **
21 **
22 **
23 **
24 ** $QT_END_LICENSE$
25 **
26 ****************************************************************************/
27
28 /*!
29     \class QColormap
30     \ingroup painting
31
32     \brief The QColormap class maps device independent QColors to device
33     dependent pixel values.
34 */
35
36 /*! \enum QColormap::Mode
37
38     This enum describes how QColormap maps device independent RGB
39     values to device dependent pixel values.
40
41     \value Direct Pixel values are derived directly from the RGB
42     values, also known as "True Color."
43
44     \value Indexed Pixel values represent indexes into a vector of
45     available colors, i.e. QColormap uses the index of the color that
46     most closely matches an RGB value.
47
48     \value Gray Similar to \c Indexed, pixel values represent a vector
49     of available gray tones.  QColormap uses the index of the gray
50     tone that most closely matches the computed gray tone of an RGB
51     value.
52 */
53
54 /*!
55     \fn QColormap QColormap::instance(int screen)
56
57     Returns the colormap for the specified \a screen.  If \a screen is
58     -1, this function returns the colormap for the default screen.
59 */
60
61 /*!
62     \fn QColormap::QColormap(const QColormap &colormap)
63
64     Constructs a copy of another \a colormap.
65 */
66
67 /*!
68     \fn QColormap::~QColormap()
69     
70     Destroys the colormap.
71 */
72
73 /*!
74     \fn int QColormap::size() const
75
76     Returns the size of the colormap for \c Indexed and \c Gray modes;
77     Returns -1 for \c Direct mode.
78
79     \sa colormap()
80 */
81
82 /*!
83     \fn uint QColormap::pixel(const QColor &color) const
84
85     Returns a device dependent pixel value for the \a color.
86
87     \sa colorAt()
88 */
89
90 /*!
91     \fn int QColormap::depth() const
92
93     Returns the depth of the device.
94
95     \sa size()
96 */
97
98 /*!
99     \fn QColormap::Mode QColormap::mode() const
100
101     Returns the mode of this colormap.
102
103     \sa QColormap::Mode
104 */
105
106 /*!
107     \fn const QColor QColormap::colorAt(uint pixel) const
108
109     Returns a QColor for the \a pixel.
110
111     \sa pixel()
112 */
113
114 /*!
115     \fn const QVector<QColor> QColormap::colormap() const
116
117     Returns a vector of colors which represents the devices colormap
118     for \c Indexed and \c Gray modes.  This function returns an empty
119     vector for \c Direct mode.
120
121     \sa size()
122 */
123
124 /*! \fn HPALETTE QColormap::hPal()
125
126     This function is only available on Windows.
127
128     Returns an handle to the HPALETTE used by this colormap.  If no
129     HPALETTE is being used, this function returns zero.
130 */
131
132 /*! \since 4.2
133
134     \fn QColormap &QColormap::operator=(const QColormap &colormap)
135
136     Assigns the given \a colormap to \e this color map and returns
137     a reference to \e this color map.
138 */
139
140 /*!
141    \fn void QColormap::initialize()
142    \internal
143 */
144
145 /*!
146    \fn void QColormap::cleanup()
147    \internal
148 */