71,8 → 71,9 |
// clear marks |
for (int i = 0; i < 360; ++i) |
drawBorderPoint(i, false, true); |
for (auto it = pointList.constBegin(); it != pointList.constEnd(); ++it) |
drawBorderPoint(it->angle, it->base); |
QList<PaintPoint>::const_iterator it; |
for (it = pointList.constBegin(); it != pointList.constEnd(); ++it) |
drawBorderPoint((*it).angle, (*it).base); |
} |
|
void ColorWheel::makeColors() |
95,7 → 96,6 |
{ |
QPainter p; |
p.begin(this); |
p.setRenderHint(QPainter::Antialiasing, true); |
p.setPen(QPen(Qt::black, 2)); |
p.setBrush(ScColorEngine::getDisplayColor(actualColor, currentDoc )); |
p.drawEllipse(widthH - 20, heightH - 20, 40, 40); |
112,7 → 112,7 |
QPainter p; |
p.begin(this); |
p.setWindow( 0, 0, width, height); |
p.fillRect(0, 0, width, height, palette().color(QPalette::Base)); |
p.fillRect(0, 0, width, height, Qt::white); |
p.setPen(Qt::black); |
p.drawRect(0, 0, width, height); |
// Half sizes |
122,7 → 122,7 |
{ |
QTransform matrix; |
matrix.translate(widthH, heightH); |
matrix.rotate((float) i); |
matrix.rotate((float)i); |
p.setWorldTransform(matrix); |
QColor c; |
c.setHsv(i, 255, 255); |
270,20 → 270,18 |
p.begin(this); |
if (clear) |
{ |
QColor baseColor = palette().color(QPalette::Base); |
p.setPen(QPen(baseColor, 1)); |
p.setBrush(baseColor); |
p.setPen(QPen(Qt::white, 1)); |
p.setBrush(Qt::white); |
} |
else |
{ |
QColor textColor = palette().color(QPalette::WindowText); |
p.setPen(QPen(textColor, 1)); |
p.setPen(QPen(Qt::black, 1)); |
if (base) |
p.setBrush(Qt::red); |
else |
p.setBrush(Qt::SolidPattern); |
} |
p.drawEllipse(x - 4, y - 4, 8, 8); |
p.drawEllipse(x-4, y-4, 8, 8); |
p.end(); |
} |
|