|
Krita Source Code Documentation
|
#include <Filter.h>
Inheritance diagram for Filter:Classes | |
| struct | Private |
Public Slots | |
| bool | apply (Node *node, int x, int y, int w, int h) |
| Apply the filter to the given node. | |
| InfoObject * | configuration () const |
| QString | name () const |
| name the internal name of this filter. | |
| void | setConfiguration (InfoObject *value) |
| setConfiguration set the configuration object for the filter | |
| void | setName (const QString &name) |
| setName set the filter's name to the given name. | |
| bool | startFilter (Node *node, int x, int y, int w, int h) |
| startFilter starts the given filter on the given node. | |
Public Member Functions | |
| Filter () | |
| Filter: create an empty filter object. Until a name is set, the filter cannot be applied. | |
| bool | operator!= (const Filter &other) const |
| bool | operator== (const Filter &other) const |
| ~Filter () override | |
Private Member Functions | |
| KisFilterConfigurationSP | filterConfig () |
Private Attributes | |
| Private *const | d |
Friends | |
| class | FilterLayer |
| class | FilterMask |
Filter: represents a filter and its configuration. A filter is identified by an internal name. The configuration for each filter is defined as an InfoObject: a map of name and value pairs.
Currently available filters are:
'autocontrast', 'blur', 'bottom edge detections', 'brightnesscontrast', 'burn', 'colorbalance', 'colortoalpha', 'colortransfer', 'desaturate', 'dodge', 'emboss', 'emboss all directions', 'emboss horizontal and vertical', 'emboss horizontal only', 'emboss laplascian', 'emboss vertical only', 'gaussian blur', 'gaussiannoisereducer', 'gradientmap', 'halftone', 'hsvadjustment', 'indexcolors', 'invert', 'left edge detections', 'lens blur', 'levels', 'maximize', 'mean removal', 'minimize', 'motion blur', 'noise', 'normalize', 'oilpaint', 'perchannel', 'phongbumpmap', 'pixelize', 'posterize', 'raindrops', 'randompick', 'right edge detections', 'roundcorners', 'sharpen', 'smalltiles', 'sobel', 'threshold', 'top edge detections', 'unsharp', 'wave', 'waveletnoisereducer']
|
explicit |
Filter: create an empty filter object. Until a name is set, the filter cannot be applied.
Definition at line 37 of file Filter.cpp.
|
override |
|
slot |
Apply the filter to the given node.
| node | the node to apply the filter to |
| x | |
| y | |
| w | |
| h | describe the rectangle the filter should be apply. This is always in image pixel coordinates and not relative to the x, y of the node. |
true if the filter was applied successfully, or false if the filter could not be applied because the node is locked or does not have an editable paint device. Definition at line 85 of file Filter.cpp.
References Filter::Private::configuration, InfoObject::configuration(), d, KisSharedPtr< T >::data(), KisFilterRegistry::instance(), Node::locked(), Filter::Private::name, Node::paintDevice(), KisFilter::process(), and KoGenericRegistry< T >::value().
|
slot |
Definition at line 75 of file Filter.cpp.
References Filter::Private::configuration, and d.
|
private |
Definition at line 152 of file Filter.cpp.
References Filter::Private::configuration, d, KisBaseProcessor::factoryConfiguration(), KoGenericRegistry< T >::get(), KisFilterRegistry::instance(), KisGlobalResourcesInterface::instance(), Filter::Private::name, InfoObject::properties(), and InfoObject::property().
|
slot |
name the internal name of this filter.
Definition at line 61 of file Filter.cpp.
References d, and Filter::Private::name.
| bool Filter::operator!= | ( | const Filter & | other | ) | const |
| bool Filter::operator== | ( | const Filter & | other | ) | const |
Definition at line 49 of file Filter.cpp.
References Filter::Private::configuration, d, and Filter::Private::name.
|
slot |
setConfiguration set the configuration object for the filter
Definition at line 80 of file Filter.cpp.
References Filter::Private::configuration, d, and value().
|
slot |
setName set the filter's name to the given name.
Definition at line 66 of file Filter.cpp.
References Filter::Private::configuration, d, KisBaseProcessor::defaultConfiguration(), KisFilterRegistry::instance(), KisGlobalResourcesInterface::instance(), Filter::Private::name, name(), and KoGenericRegistry< T >::value().
|
slot |
startFilter starts the given filter on the given node.
| node | the node to apply the filter to |
| x | |
| y | |
| w | |
| h | describe the rectangle the filter should be apply. This is always in image pixel coordinates and not relative to the x, y of the node. |
Definition at line 101 of file Filter.cpp.
References Krita::activeDocument(), KisImage::addJob(), KisImage::bounds(), KisFilter::changedRect(), KisPaintDevice::colorSpace(), Filter::Private::configuration, InfoObject::configuration(), d, KisSharedPtr< T >::data(), KisImage::endStroke(), filterConfig(), Node::image(), KisFilterRegistry::instance(), Krita::instance(), KisPart::instance(), Node::locked(), Filter::Private::name, KisFilter::needsTransparentPixels(), Node::node(), Node::paintDevice(), KisImage::startStroke(), KoGenericRegistry< T >::value(), and KisImage::waitForDone().
|
friend |
|
friend |