120 qreal additionalScale)
126 if (!brush)
return path;
127 qreal finalScale =
brush->scale() * additionalScale;
133 QPainterPath ellipse;
135 realOutline = ellipse;
145 path.addPath(
outlineFetcher()->fetchOutline(info,
this, tiltLine, mode, alignForZoom, finalScale, 0.0,
true, realOutline.
boundingRect().center().x(), realOutline.
boundingRect().center().y()));
160 if (!w.brush())
return;
161 w.brush()->setSpacing(
value);
167 return this->
brush()->spacing();
173 if (!w.brush())
return;
174 w.brush()->setAutoSpacing(active, coeff);
181 return this->
brush()->autoSpacingActive();
187 return this->
brush()->autoSpacingCoeff();
193 if (!w.brush())
return;
195 w.brush()->setUserEffectiveSize(
value);
201 return this->
brush()->userEffectiveSize();
207 if (!w.brush())
return;
211 w.brush()->setAngle(
value);
231 if (props.isEmpty()) {
235 KisIntSliderBasedPaintOpPropertyCallback::SubType_Angle,
236 KoID(
"angle", i18n(
"Angle")),
240 prop->setRange(0, 360);
257 QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
258 prop->requestReadValue();
280 QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
281 prop->requestReadValue();
288 KoID(
"spacing", i18n(
"Spacing")),
292 prop->setRange(0.01, 10);
293 prop->setSingleStep(0.01);
294 prop->setExponentRatio(3.0);
304 prop->setValue(
value);
320 QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
321 prop->requestReadValue();
362 QVariant
brush = cacheInterface ? cacheInterface->fetch(
"settings/brush") : QVariant();
364 if (
brush.isValid()) {
383 brush->coldInitBrush();
385 cacheInterface->put(
"settings/brush", QVariant::fromValue(
brush->clone().dynamicCast<
KisBrush>()));
float value(const T *src, size_t ch)
const QString COMPOSITE_ALPHA_DARKEN_CLAMP
const QString COMPOSITE_ALPHA_DARKEN
KisBrushBasedPaintOpSettings(KisResourcesInterfaceSP resourcesInterface)
qreal paintOpSize() const override
KisPaintOpSettingsSP clone() const override
virtual bool hasPatternSettings() const override
bool paintIncremental() override
Reimplemented.
QList< int > requiredCanvasResources() const override
void setResourceCacheInterface(KoResourceCacheInterfaceSP cacheInterface) override
QString indirectPaintingCompositeOp() const override
QList< KisUniformPaintOpPropertyWSP > m_uniformProperties
void setAutoSpacing(bool active, qreal coeff)
void regenerateResourceCache(KoResourceCacheInterfaceSP cacheInterface) override
KisOptimizedBrushOutline brushOutline(const KisPaintInformation &info, const OutlineMode &mode, qreal alignForZoom) override
qreal paintOpAngle() const override
void setSpacing(qreal spacing)
KisOptimizedBrushOutline brushOutlineImpl(const KisPaintInformation &info, const OutlineMode &mode, qreal alignForZoom, qreal additionalScale)
void setPaintOpSize(qreal value) override
void onPropertyChanged() override
void setPaintOpAngle(qreal value) override
void setWriteCallback(Callback func)
void setReadCallback(Callback func)
KisOptimizedBrushOutline fetchOutline(const KisPaintInformation &info, const KisPaintOpSettingsSP settings, const KisOptimizedBrushOutline &originalOutline, const KisPaintOpSettings::OutlineMode &mode, qreal alignForZoom, qreal additionalScale=1.0, qreal additionalRotation=0.0, bool tilt=false, qreal tiltcenterx=1.0, qreal tiltcentery=1.0) const
QRectF boundingRect() const
const KisCurrentOutlineFetcher * outlineFetcher() const
void onPropertyChanged() override
void readOptionSetting(KisPropertiesConfigurationPointer settings, KisResourcesInterfaceSP resourcesInterface, KoCanvasResourcesInterfaceSP canvasResourcesInterface)
void writeOptionSetting(KisPropertiesConfigurationPointer settings) const
static bool requiresEffectiveCompositeOp(const KisPropertiesConfiguration *settings)
bool applyingGradient() const
static bool qFuzzyCompare(half p1, half p2)
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
T kisRadiansToDegrees(T radians)
std::enable_if< std::is_floating_point< T >::value, T >::type normalizeAngleDegrees(T a)
T kisDegreesToRadians(T degrees)
QSharedPointer< T > toQShared(T *ptr)
Container< QSharedPointer< T > > listWeakToStrong(const Container< QWeakPointer< T > > &container, bool allOrNothing=true)
KisCallbackBasedPaintopProperty< KisSliderBasedPaintOpProperty< int > > KisIntSliderBasedPaintOpPropertyCallback
KisCallbackBasedPaintopProperty< KisSliderBasedPaintOpProperty< qreal > > KisDoubleSliderBasedPaintOpPropertyCallback
@ CurrentEffectiveCompositeOp
@ BackgroundColor
The active background color selected for this canvas.
@ ForegroundColor
The active foreground color selected for this canvas.
const KisBrushBasedPaintOpSettings * m_parent
BrushReader(const KisBrushBasedPaintOpSettings *parent)
KisBrushOptionProperties m_option
KisBrushBasedPaintOpSettings * m_parent
BrushWriter(KisBrushBasedPaintOpSettings *parent)
KisBrushOptionProperties m_option
static QPainterPath makeTiltIndicator(KisPaintInformation const &info, QPointF const &start, qreal lengthScale, qreal angle)
QList< KisUniformPaintOpPropertyWSP > uniformProperties
KoResourceCacheInterfaceSP resourceCacheInterface
bool read(const KisPropertiesConfiguration *setting)
bool hasPaintingModeProperty
enumPaintingMode paintingMode