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);
61 PenBrushSaver(QPainter *painter,
const QPen &pen,
const QBrush &brush);
66 PenBrushSaver(QPainter *painter,
const QPair<QPen, QBrush> &pair);
72 PenBrushSaver(QPainter *painter,
const QPair<QPen, QBrush> &pair, allow_noop_t);
86 QColor KRITAGLOBAL_EXPORT
blendColors(
const QColor &c1,
const QColor &c2, qreal
r1);
100 qreal KRITAGLOBAL_EXPORT
luminosityCoarse(
const QColor &c,
bool sRGBtrc =
true);
109 qreal KRITAGLOBAL_EXPORT
colorDifference(
const QColor &c1,
const QColor &c2);
114 void KRITAGLOBAL_EXPORT
dragColor(QColor *color,
const QColor &baseColor, qreal threshold);
118 vertices[0] = QVector3D(rc.left(), rc.bottom(), 0.f);
119 vertices[1] = QVector3D(rc.left(), rc.top(), 0.f);
120 vertices[2] = QVector3D(rc.right(), rc.bottom(), 0.f);
121 vertices[3] = QVector3D(rc.left(), rc.top(), 0.f);
122 vertices[4] = QVector3D(rc.right(), rc.top(), 0.f);
123 vertices[5] = QVector3D(rc.right(), rc.bottom(), 0.f);
128 texCoords[0] = QVector2D(rc.left(), rc.bottom());
129 texCoords[1] = QVector2D(rc.left(), rc.top());
130 texCoords[2] = QVector2D(rc.right(), rc.bottom());
131 texCoords[3] = QVector2D(rc.left(), rc.top());
132 texCoords[4] = QVector2D(rc.right(), rc.top());
133 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) ...
void initAntsPen(QPen *antsPen, QPen *outlinePen, int antLength, int antSpace)
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 rectToVertices(QVector3D *vertices, const QRectF &rc)