7#ifndef __KIS_PAINTING_TWEAKS_H
8#define __KIS_PAINTING_TWEAKS_H
10#include "kritaglobal_export.h"
32 KRITAGLOBAL_EXPORT QRegion
safeClipRegion(
const QPainter &painter);
39 KRITAGLOBAL_EXPORT
void initAntsPen(QPen *antsPen, QPen *outlinePen,
40 int antLength = 4,
int antSpace = 4,
41 QColor black = QColor(Qt::black), QColor white = QColor(Qt::white));
62 PenBrushSaver(QPainter *painter,
const QPen &pen,
const QBrush &brush);
67 PenBrushSaver(QPainter *painter,
const QPair<QPen, QBrush> &pair);
73 PenBrushSaver(QPainter *painter,
const QPair<QPen, QBrush> &pair, allow_noop_t);
87 QColor KRITAGLOBAL_EXPORT
blendColors(
const QColor &c1,
const QColor &c2, qreal
r1);
101 qreal KRITAGLOBAL_EXPORT
luminosityCoarse(
const QColor &c,
bool sRGBtrc =
true);
110 qreal KRITAGLOBAL_EXPORT
colorDifference(
const QColor &c1,
const QColor &c2);
115 void KRITAGLOBAL_EXPORT
dragColor(QColor *color,
const QColor &baseColor, qreal threshold);
119 vertices[0] = QVector3D(rc.left(), rc.bottom(), 0.f);
120 vertices[1] = QVector3D(rc.left(), rc.top(), 0.f);
121 vertices[2] = QVector3D(rc.right(), rc.bottom(), 0.f);
122 vertices[3] = QVector3D(rc.left(), rc.top(), 0.f);
123 vertices[4] = QVector3D(rc.right(), rc.top(), 0.f);
124 vertices[5] = QVector3D(rc.right(), rc.bottom(), 0.f);
129 texCoords[0] = QVector2D(rc.left(), rc.bottom());
130 texCoords[1] = QVector2D(rc.left(), rc.top());
131 texCoords[2] = QVector2D(rc.right(), rc.bottom());
132 texCoords[3] = QVector2D(rc.left(), rc.top());
133 texCoords[4] = QVector2D(rc.right(), rc.top());
134 texCoords[5] = QVector2D(rc.right(), rc.bottom());
PenBrushSaver(const PenBrushSaver &rhs)=delete
qreal luminosityCoarse(const QColor &c, bool sRGBtrc)
luminosityCoarse This calculates the luminosity of the given QColor. It uses a very coarse (10 step) ...
QColor blendColors(const QColor &c1, const QColor &c2, qreal r1)
qreal colorDifference(const QColor &c1, const QColor &c2)
QRegion safeClipRegion(const QPainter &painter)
void dragColor(QColor *color, const QColor &baseColor, qreal threshold)
QRect safeClipBoundingRect(const QPainter &painter)
void rectToTexCoords(QVector2D *texCoords, const QRectF &rc)
void initAntsPen(QPen *antsPen, QPen *outlinePen, int antLength, int antSpace, QColor black, QColor white)
void rectToVertices(QVector3D *vertices, const QRectF &rc)