Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_painting_tweaks.cpp File Reference
#include <kis_global.h>
#include "kis_painting_tweaks.h"
#include <QPen>
#include <QRegion>
#include <QPainter>
#include <QTransform>
#include "kis_debug.h"

Go to the source code of this file.

Namespaces

namespace  KisPaintingTweaks
 

Functions

QColor KisPaintingTweaks::blendColors (const QColor &c1, const QColor &c2, qreal r1)
 
qreal KisPaintingTweaks::colorDifference (const QColor &c1, const QColor &c2)
 
void KisPaintingTweaks::dragColor (QColor *color, const QColor &baseColor, qreal threshold)
 
void KisPaintingTweaks::initAntsPen (QPen *antsPen, QPen *outlinePen, int antLength, int antSpace)
 
qreal 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.
 
QRect KisPaintingTweaks::safeClipBoundingRect (const QPainter &painter)
 
QRegion KisPaintingTweaks::safeClipRegion (const QPainter &painter)
 

Variables

static QMap< qreal, qreal > KisPaintingTweaks::linearToSRGBTRC
 
static QMap< qreal, qreal > KisPaintingTweaks::sRgbTRCToLinear