KDEUI
Go to the documentation of this file.
22 #include <QtGui/QPainter>
24 #include "kcolorchoosermode_p.h"
26 using namespace KDEPrivate;
44 int _hue, _sat, _colorValue;
65 switch ( chooserMode ) {
102 return d->_colorValue;
138 QImage image(
QSize(xSteps + 1, ySteps + 1), QImage::Format_RGB32);
139 for (
int y = 0; y <= ySteps; ++y) {
140 setComponentY(color,
chooserMode(), y * (1.0 / ySteps));
141 for (
int x = 0; x <= xSteps; ++x) {
142 setComponentX(color,
chooserMode(), x * (1.0 / xSteps));
143 image.setPixel(x, ySteps - y, color.rgb());
148 QPainter painter(&pix);
150 painter.setRenderHint(QPainter::SmoothPixmapTransform,
true);
151 QRectF srcRect(0.5, 0.5, xSteps, ySteps);
153 painter.drawImage(destRect, image, srcRect);
159 #include "khuesaturationselect.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 20:19:51 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.