87 if (node->
locked())
return false;
90 if (!filter)
return false;
93 if (!dev)
return false;
95 QRect applyRect = QRect(x, y, w, h);
97 filter->
process(dev, applyRect, config->cloneWithResourcesSnapshot());
103 if (node->
locked())
return false;
106 if (!filter)
return false;
109 if (!image)
return false;
114 QRect initialApplyRect = QRect(x, y, w, h);
116 QRect applyRect = initialApplyRect;
120 applyRect |= image->
bounds();
128 if (view && view->document() == document->document()) {
141 processRect &= image->
bounds();
float value(const T *src, size_t ch)
KisFilterConfigurationSP filterConfig()
bool operator==(const Filter &other) const
bool startFilter(Node *node, int x, int y, int w, int h)
startFilter starts the given filter on the given node.
QString name() const
name the internal name of this filter.
void setConfiguration(InfoObject *value)
setConfiguration set the configuration object for the filter
InfoObject * configuration() const
bool operator!=(const Filter &other) const
Filter()
Filter: create an empty filter object. Until a name is set, the filter cannot be applied.
void setName(const QString &name)
setName set the filter's name to the given name.
bool apply(Node *node, int x, int y, int w, int h)
Apply the filter to the given node.
QVariant property(const QString &key)
QMap< QString, QVariant > properties() const
KisPropertiesConfigurationSP configuration() const
configuration gives access to the internal configuration object. Must be used internally in libkis
static KisFilterRegistry * instance()
void process(const KisPaintDeviceSP src, KisPaintDeviceSP dst, KisSelectionSP selection, const QRect &applyRect, const KisFilterConfigurationSP config, KoUpdater *progressUpdater=0) const
virtual bool needsTransparentPixels(const KisFilterConfigurationSP config, const KoColorSpace *cs) const
virtual QRect changedRect(const QRect &rect, const KisFilterConfigurationSP config, int lod) const
static KisResourcesInterfaceSP instance()
void addJob(KisStrokeId id, KisStrokeJobData *data) override
KisStrokeId startStroke(KisStrokeStrategy *strokeStrategy) override
QRect bounds() const override
void endStroke(KisStrokeId id) override
const KoColorSpace * colorSpace() const
static KisPart * instance()
The KisResourcesSnapshot class takes a snapshot of the various resources like colors and settings use...
const T value(const QString &id) const
T get(const QString &id) const
Document * activeDocument() const
static Krita * instance()
instance retrieve the singleton instance of the Application object.
bool locked() const
locked checks whether the Node is locked. A locked node cannot be changed.
KisPaintDeviceSP paintDevice() const
paintDevice gives access to the internal paint device of this Node
KisPinnedSharedPtr< KisFilterConfiguration > KisFilterConfigurationSP
InfoObject * configuration
virtual KisFilterConfigurationSP factoryConfiguration(KisResourcesInterfaceSP resourcesInterface) const
virtual KisFilterConfigurationSP defaultConfiguration(KisResourcesInterfaceSP resourcesInterface) const