Commit e303e4dd authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Add Lightness and Gradient modes to Brush Textures

# Conflicts:
#	plugins/paintops/defaultpaintops/brush/KisBrushOpResources.cpp
#	plugins/paintops/libpaintop/kis_texture_option.cpp
#	plugins/paintops/libpaintop/kis_texture_option.h
parent 11d7acb6
......@@ -816,16 +816,21 @@ bool KoColorSpace::preferCompositionInSourceColorSpace() const
}
void KoColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorAndLightnessWithStrength(dst, brush, brushColor, 1.0, nPixels);
}
void KoColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
/// Fallback implementation. All RGB color spaces have their own
/// implementation without any conversions.
const int rgbPixelSize = sizeof(KoBgrU16Traits::Pixel);
QScopedArrayPointer<quint8> rgbBuffer(new quint8[(nPixels + 1) * rgbPixelSize]);
quint8 *rgbBrushColorBuffer = rgbBuffer.data() + nPixels * rgbPixelSize;
quint8* rgbBrushColorBuffer = rgbBuffer.data() + nPixels * rgbPixelSize;
this->toRgbA16(dst, rgbBuffer.data(), nPixels);
this->toRgbA16(brushColor, rgbBrushColorBuffer, 1);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(rgbBuffer.data(), brush, rgbBrushColorBuffer, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(rgbBuffer.data(), brush, rgbBrushColorBuffer, strength, nPixels);
this->fromRgbA16(rgbBuffer.data(), dst, nPixels);
}
......@@ -519,6 +519,8 @@ public:
* see KoColorSpacePreserveLightnessUtils.h
*/
virtual void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const;
//Same as above, but with contrast adjusted by strength. Strength == 1 -> full contrast. Allows softer lightness adjustments.
virtual void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const;
/**
* Create an adjustment object for adjusting the brightness and contrast
......
......@@ -24,7 +24,7 @@
#include "kis_global.h"
template<typename CSTraits>
inline static void fillGrayBrushWithColorPreserveLightnessRGB(quint8 *pixels, const QRgb *brush, quint8 *brushColor, qint32 nPixels) {
inline static void fillGrayBrushWithColorPreserveLightnessRGB(quint8 *pixels, const QRgb *brush, quint8 *brushColor, qreal strength, qint32 nPixels) {
using RGBPixel = typename CSTraits::Pixel;
using channels_type = typename CSTraits::channels_type;
static const quint32 pixelSize = CSTraits::pixelSize;
......@@ -34,6 +34,7 @@ inline static void fillGrayBrushWithColorPreserveLightnessRGB(quint8 *pixels, co
const float brushColorR = KoColorSpaceMaths<channels_type, float>::scaleToA(brushColorRGB->red);
const float brushColorG = KoColorSpaceMaths<channels_type, float>::scaleToA(brushColorRGB->green);
const float brushColorB = KoColorSpaceMaths<channels_type, float>::scaleToA(brushColorRGB->blue);
const float brushColorA = KoColorSpaceMaths<channels_type, float>::scaleToA(brushColorRGB->alpha);
/**
* Lightness mixing algorithm is developed by Peter Schatz <voronwe13@gmail.com>
......@@ -59,8 +60,10 @@ inline static void fillGrayBrushWithColorPreserveLightnessRGB(quint8 *pixels, co
for (; nPixels > 0; --nPixels, pixels += pixelSize, ++brush) {
RGBPixel *pixelRGB = reinterpret_cast<RGBPixel*>(pixels);
const float brushMaskL = qRed(*brush) / 255.0f;
float brushMaskL = qRed(*brush) / 255.0f;
brushMaskL = (brushMaskL - 0.5) * strength + 0.5;
const float finalLightness = lightnessA * pow2(brushMaskL) + lightnessB * brushMaskL;
const float finalAlpha = qMin(qAlpha(*brush) / 255.0f, brushColorA);
float pixelR = brushColorR;
float pixelG = brushColorG;
......@@ -71,7 +74,7 @@ inline static void fillGrayBrushWithColorPreserveLightnessRGB(quint8 *pixels, co
pixelRGB->red = KoColorSpaceMaths<float, channels_type>::scaleToA(pixelR);
pixelRGB->green = KoColorSpaceMaths<float, channels_type>::scaleToA(pixelG);
pixelRGB->blue = KoColorSpaceMaths<float, channels_type>::scaleToA(pixelB);
pixelRGB->alpha = KoColorSpaceMaths<quint8, channels_type>::scaleToA(quint8(qAlpha(*brush)));
pixelRGB->alpha = KoColorSpaceMaths<quint8, channels_type>::scaleToA(quint8(finalAlpha * 255));
}
}
......
......@@ -100,5 +100,10 @@ QVector <double> KoRgbU16ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
void KoRgbU16ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void KoRgbU16ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, strength, nPixels);
}
\ No newline at end of file
......@@ -53,6 +53,7 @@ public:
QVector <double> fromYUV(qreal *y, qreal *u, qreal *v) const override;
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class KoRgbU16ColorSpaceFactory : public KoSimpleColorSpaceFactory
......
......@@ -113,5 +113,10 @@ QVector <double> KoRgbU8ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
void KoRgbU8ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void KoRgbU8ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, strength, nPixels);
}
......@@ -54,6 +54,7 @@ public:
QVector <double> fromYUV(qreal *y, qreal *u, qreal *v) const override;
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class KoRgbU8ColorSpaceFactory : public KoSimpleColorSpaceFactory
......
......@@ -113,5 +113,10 @@ QVector <double> RgbF16ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
void RgbF16ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF16Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF16Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void RgbF16ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF16Traits>(dst, brush, brushColor, strength, nPixels);
}
......@@ -63,6 +63,7 @@ public:
}
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class RgbF16ColorSpaceFactory : public LcmsColorSpaceFactory
......
......@@ -118,5 +118,10 @@ QVector <double> RgbF32ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
void RgbF32ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrF32Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF32Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void RgbF32ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoRgbF32Traits>(dst, brush, brushColor, strength, nPixels);
}
......@@ -63,6 +63,7 @@ public:
}
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class RgbF32ColorSpaceFactory : public LcmsColorSpaceFactory
......
......@@ -108,7 +108,12 @@ QVector <double> RgbU16ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
return channelValues;
}
void RgbU16ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
void RgbU16ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8* dst, const QRgb* brush, quint8* brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void RgbU16ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU16Traits>(dst, brush, brushColor, strength, nPixels);
}
......@@ -58,6 +58,7 @@ public:
}
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class RgbU16ColorSpaceFactory : public LcmsColorSpaceFactory
......
......@@ -112,7 +112,12 @@ QVector <double> RgbU8ColorSpace::fromYUV(qreal *y, qreal *u, qreal *v) const
return channelValues;
}
void RgbU8ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const
void RgbU8ColorSpace::fillGrayBrushWithColorAndLightnessOverlay(quint8* dst, const QRgb* brush, quint8* brushColor, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, nPixels);
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, 1.0, nPixels);
}
void RgbU8ColorSpace::fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const
{
fillGrayBrushWithColorPreserveLightnessRGB<KoBgrU8Traits>(dst, brush, brushColor, strength, nPixels);
}
......@@ -65,6 +65,7 @@ public:
}
void fillGrayBrushWithColorAndLightnessOverlay(quint8 *dst, const QRgb *brush, quint8 *brushColor, qint32 nPixels) const override;
void fillGrayBrushWithColorAndLightnessWithStrength(quint8* dst, const QRgb* brush, quint8* brushColor, qreal strength, qint32 nPixels) const override;
};
class RgbU8ColorSpaceFactory : public LcmsColorSpaceFactory
......
......@@ -53,6 +53,7 @@ KisBrushOpResources::KisBrushOpResources(const KisPaintOpSettingsSP settings, Ki
textureOption.reset(new KisTextureProperties(painter->device()->defaultBounds()->currentLevelOfDetail()));
textureOption->fillProperties(settings, settings->resourcesInterface());
textureOption->setTextureGradient(painter->gradient());
m_d->hsvOptions.append(KisPressureHSVOption::createHueOption());
m_d->hsvOptions.append(KisPressureHSVOption::createSaturationOption());
......
......@@ -47,6 +47,7 @@ KisTextureMaskInfo::KisTextureMaskInfo(const KisTextureMaskInfo &rhs)
m_scale(rhs.m_scale),
m_brightness(rhs.m_brightness),
m_contrast(rhs.m_contrast),
m_neutralPoint(rhs.m_neutralPoint),
m_invert(rhs.m_invert),
m_cutoffLeft(rhs.m_cutoffLeft),
m_cutoffRight(rhs.m_cutoffRight),
......@@ -68,6 +69,7 @@ bool operator==(const KisTextureMaskInfo &lhs, const KisTextureMaskInfo &rhs) {
qFuzzyCompare(lhs.m_scale, rhs.m_scale) &&
qFuzzyCompare(lhs.m_brightness, rhs.m_brightness) &&
qFuzzyCompare(lhs.m_contrast, rhs.m_contrast) &&
qFuzzyCompare(lhs.m_neutralPoint, rhs.m_neutralPoint) &&
lhs.m_invert == rhs.m_invert &&
lhs.m_cutoffLeft == rhs.m_cutoffLeft &&
lhs.m_cutoffRight == rhs.m_cutoffRight &&
......@@ -81,6 +83,7 @@ KisTextureMaskInfo &KisTextureMaskInfo::operator=(const KisTextureMaskInfo &rhs)
m_scale = rhs.m_scale;
m_brightness = rhs.m_brightness;
m_contrast = rhs.m_contrast;
m_neutralPoint = rhs.m_neutralPoint;
m_invert = rhs.m_invert;
m_cutoffLeft = rhs.m_cutoffLeft;
m_cutoffRight = rhs.m_cutoffRight;
......@@ -122,6 +125,7 @@ bool KisTextureMaskInfo::fillProperties(const KisPropertiesConfigurationSP setti
m_scale = setting->getDouble("Texture/Pattern/Scale", 1.0);
m_brightness = setting->getDouble("Texture/Pattern/Brightness");
m_contrast = setting->getDouble("Texture/Pattern/Contrast", 1.0);
m_neutralPoint = setting->getDouble("Texture/Pattern/NeutralPoint", 0.5);
m_invert = setting->getBool("Texture/Pattern/Invert");
m_cutoffLeft = setting->getInt("Texture/Pattern/CutoffLeft", 0);
m_cutoffRight = setting->getInt("Texture/Pattern/CutoffRight", 255);
......@@ -134,7 +138,7 @@ void KisTextureMaskInfo::recalculateMask()
{
if (!m_pattern) return;
const KoColorSpace *cs = KoColorSpaceRegistry::instance()->alpha8();
const KoColorSpace *cs = KoColorSpaceRegistry::instance()->rgb8();
if (!m_mask) {
m_mask = new KisPaintDevice(cs);
......@@ -157,11 +161,11 @@ void KisTextureMaskInfo::recalculateMask()
mask = mask.scaled(rc.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
}
const QRgb* pixel = reinterpret_cast<const QRgb*>(mask.constBits());
QRgb* pixel = reinterpret_cast<QRgb*>(mask.bits());
const int width = mask.width();
const int height = mask.height();
KisHLineIteratorSP iter = m_mask->createHLineIteratorNG(0, 0, width);
//KisHLineIteratorSP iter = m_mask->createHLineIteratorNG(0, 0, width);
for (int row = 0; row < height; ++row) {
for (int col = 0; col < width; ++col) {
......@@ -188,18 +192,32 @@ void KisTextureMaskInfo::recalculateMask()
if (m_cutoffPolicy == 1 && (maskValue < (m_cutoffLeft / 255.0) || maskValue > (m_cutoffRight / 255.0))) {
// mask out the dab if it's outside the pattern's cuttoff points
maskValue = OPACITY_TRANSPARENT_F;
alpha = OPACITY_TRANSPARENT_F;
}
else if (m_cutoffPolicy == 2 && (maskValue < (m_cutoffLeft / 255.0) || maskValue > (m_cutoffRight / 255.0))) {
maskValue = OPACITY_OPAQUE_F;
alpha = OPACITY_OPAQUE_F;
}
cs->setOpacity(iter->rawData(), maskValue, 1);
iter->nextPixel();
maskValue = qBound(0.0f, maskValue, 1.0f);
float neutralAdjustedValue;
//Adjust neutral point in linear fashion. Uses separate linear equations from 0 to neutralPoint, and neutralPoint to 1,
//to prevent loss of detail (clipping).
if (m_neutralPoint == 1 || (m_neutralPoint !=0 && maskValue <= m_neutralPoint)) {
neutralAdjustedValue = maskValue / (2 * m_neutralPoint);
}
else {
neutralAdjustedValue = 0.5 + (maskValue-m_neutralPoint) / (2 - 2 * m_neutralPoint);
}
int finalValue = neutralAdjustedValue * 255;
pixel[row * width + col] = QColor(finalValue, finalValue, finalValue, alpha * 255).rgba();
}
iter->nextRow();
}
m_mask->convertFromQImage(mask, 0);
m_maskBounds = QRect(0, 0, width, height);
}
......
......@@ -64,6 +64,7 @@ private:
qreal m_scale = 1.0;
qreal m_brightness = 0.0;
qreal m_contrast = 1.0;
qreal m_neutralPoint = 0.5;
bool m_invert = false;
int m_cutoffLeft = 0;
......
......@@ -26,7 +26,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="textureTab">
<attribute name="title">
......@@ -63,8 +63,11 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="0">
<widget class="QLabel" name="lblAngle">
<item row="2" column="1">
<widget class="KisDoubleSliderSpinBox" name="brightnessSlider" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblDiameter">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
......@@ -72,28 +75,25 @@
</sizepolicy>
</property>
<property name="text">
<string>Contrast:</string>
<string>Scale:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="KisDoubleSliderSpinBox" name="brightnessSlider" native="true"/>
</item>
<item row="1" column="1">
<widget class="KisMultipliersDoubleSliderSpinBox" name="scaleSlider" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
<item row="5" column="1">
<widget class="QComboBox" name="cmbCutoffPolicy">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblSpacing_2">
<item row="3" column="0">
<widget class="QLabel" name="lblAngle">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
......@@ -101,13 +101,23 @@
</sizepolicy>
</property>
<property name="text">
<string>Cutoff</string>
<string>Contrast:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbTexturingMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblRatio">
<property name="sizePolicy">
......@@ -124,17 +134,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KisDoubleSliderSpinBox" name="contrastSlider" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="lblSpacing">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
......@@ -166,28 +166,18 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cmbCutoffPolicy">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbTexturingMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="1" column="1">
<widget class="KisMultipliersDoubleSliderSpinBox" name="scaleSlider" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblDiameter">
<item row="6" column="0">
<widget class="QLabel" name="lblSpacing_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
......@@ -195,20 +185,50 @@
</sizepolicy>
</property>
<property name="text">
<string>Scale:</string>
<string>Cutoff</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="KisGradientSlider" name="cutoffSlider" native="true">
<property name="text" stdset="0">
<string>PushButton</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KisDoubleSliderSpinBox" name="contrastSlider" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblNeutralPoint">
<property name="text">
<string>Neutral Point</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="KisDoubleSliderSpinBox" name="neutralPointSlider" native="true">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -308,7 +328,7 @@
<customwidget>
<class>KisDoubleSliderSpinBox</class>
<extends>QWidget</extends>
<header>kis_slider_spin_box.h</header>
<header location="global">kis_slider_spin_box.h</header>
<container>1</container>
</customwidget>
<customwidget>
......
......@@ -103,6 +103,7 @@ KisBrushBasedPaintOp::KisBrushBasedPaintOp(const KisPaintOpSettingsSP settings,
m_textureProperties.fillProperties(settings, settings->resourcesInterface());
m_dabCache->setTexturePostprocessing(&m_textureProperties);
m_textureProperties.setTextureGradient(painter->gradient());
m_precisionOption.setHasImprecisePositionOptions(
m_precisionOption.hasImprecisePositionOptions() |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment