|
Krita Source Code Documentation
|
Classes | |
| class | PenBrushSaver |
Functions | |
| QColor | blendColors (const QColor &c1, const QColor &c2, qreal r1) |
| qreal | colorDifference (const QColor &c1, const QColor &c2) |
| void | dragColor (QColor *color, const QColor &baseColor, qreal threshold) |
| void | initAntsPen (QPen *antsPen, QPen *outlinePen, int antLength, int antSpace) |
| qreal | luminosityCoarse (const QColor &c, bool sRGBtrc=true) |
| luminosityCoarse This calculates the luminosity of the given QColor. It uses a very coarse (10 step) lut to linearize the sRGB trc, and then uses rec709 values to calculate the luminosity. Because of the effect of linearization, this is still more precise than one that just calculates based on coefficients. | |
| void | rectToTexCoords (QVector2D *texCoords, const QRectF &rc) |
| void | rectToVertices (QVector3D *vertices, const QRectF &rc) |
| QRect | safeClipBoundingRect (const QPainter &painter) |
| QRegion | safeClipRegion (const QPainter &painter) |
Variables | |
| static QMap< qreal, qreal > | linearToSRGBTRC |
| static QMap< qreal, qreal > | sRgbTRCToLinear |
| QColor KRITAGLOBAL_EXPORT KisPaintingTweaks::blendColors | ( | const QColor & | c1, |
| const QColor & | c2, | ||
| qreal | r1 ) |
Definition at line 97 of file kis_painting_tweaks.cpp.
| qreal KRITAGLOBAL_EXPORT KisPaintingTweaks::colorDifference | ( | const QColor & | c1, |
| const QColor & | c2 ) |
c1 and c2 in a (nonlinear) range [0, 3]The colors are compared using the formula: difference = sqrt(2 * diff_R^2 + 4 * diff_G^2 + 3 * diff_B^2)
Definition at line 107 of file kis_painting_tweaks.cpp.
References pow2().
| void KRITAGLOBAL_EXPORT KisPaintingTweaks::dragColor | ( | QColor * | color, |
| const QColor & | baseColor, | ||
| qreal | threshold ) |
Make the color color differ from baseColor for at least threshold value
Definition at line 116 of file kis_painting_tweaks.cpp.
References colorDifference().
| KRITAGLOBAL_EXPORT void KisPaintingTweaks::initAntsPen | ( | QPen * | antsPen, |
| QPen * | outlinePen, | ||
| int | antLength, | ||
| int | antSpace ) |
Definition at line 41 of file kis_painting_tweaks.cpp.
| qreal KRITAGLOBAL_EXPORT KisPaintingTweaks::luminosityCoarse | ( | const QColor & | c, |
| bool | sRGBtrc = true ) |
luminosityCoarse This calculates the luminosity of the given QColor. It uses a very coarse (10 step) lut to linearize the sRGB trc, and then uses rec709 values to calculate the luminosity. Because of the effect of linearization, this is still more precise than one that just calculates based on coefficients.
| c | the color to calculate the luminosity of. |
| sRGBtrc | whether to linearize the sRGB trc. |
Definition at line 168 of file kis_painting_tweaks.cpp.
References linearToSRGBTRC, and sRgbTRCToLinear.
|
inline |
Definition at line 126 of file kis_painting_tweaks.h.
|
inline |
Definition at line 116 of file kis_painting_tweaks.h.
| KRITAGLOBAL_EXPORT QRect KisPaintingTweaks::safeClipBoundingRect | ( | const QPainter & | painter | ) |
Definition at line 36 of file kis_painting_tweaks.cpp.
| KRITAGLOBAL_EXPORT QRegion KisPaintingTweaks::safeClipRegion | ( | const QPainter & | painter | ) |
This is a workaround for QPainter::clipRegion() bug. When zoom is about 2000% and rotation is in a range[-5;5] degrees, the generated region will have about 20k+ rectangles inside. Their processing will be really slow. These functions work around the issue.
Definition at line 20 of file kis_painting_tweaks.cpp.
References ppVar.
|
static |
Definition at line 154 of file kis_painting_tweaks.cpp.
|
static |
Definition at line 140 of file kis_painting_tweaks.cpp.