Inkscape
Vector Graphics Editor
|
#include <nr-filter-gaussian.h>
Public Member Functions | |
FilterGaussian () | |
~FilterGaussian () override | |
void | render_cairo (FilterSlot &slot) const override |
void | area_enlarge (Geom::IntRect &area, Geom::Affine const &m) const override |
bool | can_handle_affine (Geom::Affine const &m) const override |
Indicate whether the filter primitive can handle the given affine. | |
double | complexity (Geom::Affine const &ctm) const override |
void | set_deviation (double deviation) |
Set the standard deviation value for gaussian blur. | |
void | set_deviation (double x, double y) |
Set the standard deviation value for gaussian blur. | |
Glib::ustring | name () const override |
![]() | |
FilterPrimitive () | |
virtual | ~FilterPrimitive () |
virtual void | update () |
virtual void | set_input (int slot) |
Sets the input slot number 'slot' to be used as input in rendering filter primitive 'primitive' For filter primitive types accepting more than one input, this sets the first input. | |
virtual void | set_input (int input, int slot) |
Sets the input slot number 'slot' to be user as input number 'input' in rendering filter primitive 'primitive' First input for a filter primitive is number 0. | |
virtual void | set_output (int slot) |
Sets the slot number 'slot' to be used as output from filter primitive 'primitive' If output slot for a filter element is not set, one of the unused image slots is used. | |
virtual bool | uses_background () const |
void | set_x (SVGLength const &length) |
Sets the filter primitive subregion. | |
void | set_y (SVGLength const &length) |
void | set_width (SVGLength const &length) |
void | set_height (SVGLength const &length) |
void | set_subregion (SVGLength const &x, SVGLength const &y, SVGLength const &width, SVGLength const &height) |
Geom::Rect | filter_primitive_area (FilterUnits const &units) const |
Returns the filter primitive area in user coordinate system. | |
void | setStyle (SPStyle const *style) |
Sets style for access to properties used by filter primitives. | |
Private Attributes | |
double | _deviation_x |
double | _deviation_y |
Additional Inherited Members | |
![]() | |
int | _input |
int | _output |
SVGLength | _subregion_x |
SVGLength | _subregion_y |
SVGLength | _subregion_width |
SVGLength | _subregion_height |
SPColorInterpolation | color_interpolation |
Definition at line 33 of file nr-filter-gaussian.h.
Inkscape::Filters::FilterGaussian::FilterGaussian | ( | ) |
Definition at line 117 of file nr-filter-gaussian.cpp.
References _deviation_x, and _deviation_y.
|
overridedefault |
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 669 of file nr-filter-gaussian.cpp.
References _deviation_x, _deviation_y, Inkscape::Filters::_effect_area_scr(), Geom::GenericRect< C >::expandBy(), Geom::Affine::expansionX(), and Geom::Affine::expansionY().
|
overridevirtual |
Indicate whether the filter primitive can handle the given affine.
Results of some filter primitives depend on the coordinate system used when rendering. A gaussian blur with equal x and y deviation will remain unchanged by rotations. Per-pixel filters like color matrix and blend will not change regardless of the transformation.
When any filter returns false, filter rendering is performed on an intermediate surface with edges parallel to the axes of the user coordinate system. This means the matrices from FilterUnits will contain at most a (possibly non-uniform) scale and a translation. When all primitives of the filter return true, the rendering is performed in display coordinate space and no intermediate surface is used.
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 679 of file nr-filter-gaussian.cpp.
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 688 of file nr-filter-gaussian.cpp.
References _deviation_x, _deviation_y, Inkscape::Filters::_effect_area_scr(), Geom::Affine::expansionX(), and Geom::Affine::expansionY().
|
inlineoverridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 62 of file nr-filter-gaussian.h.
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 524 of file nr-filter-gaussian.cpp.
References _deviation_x, _deviation_y, Inkscape::Filters::_effect_area_scr(), Inkscape::Filters::_effect_subsample_step_log2(), Inkscape::Filters::FilterPrimitive::_input, Inkscape::Filters::FilterPrimitive::_output, Inkscape::Filters::FilterPrimitive::color_interpolation, Geom::Affine::expansionX(), Geom::Affine::expansionY(), fmt, Inkscape::Filters::gaussian_pass_FIR(), Inkscape::Filters::gaussian_pass_IIR(), Inkscape::Filters::FilterSlot::get_blurquality(), Inkscape::Filters::FilterSlot::get_device_scale(), Inkscape::get_global_dispatch_pool(), Inkscape::Filters::FilterUnits::get_item_bbox(), Inkscape::Filters::FilterUnits::get_matrix_user2pb(), Inkscape::Filters::FilterUnits::get_primitive_units(), Inkscape::Filters::FilterSlot::get_units(), Inkscape::Filters::FilterSlot::getcairo(), ink_cairo_surface_copy(), ink_cairo_surface_get_height(), ink_cairo_surface_get_width(), Inkscape::Filters::FilterSlot::set(), set_cairo_surface_ci(), SP_FILTER_UNITS_OBJECTBOUNDINGBOX, Geom::X, and Geom::Y.
void Inkscape::Filters::FilterGaussian::set_deviation | ( | double | deviation | ) |
Set the standard deviation value for gaussian blur.
Deviation along both axis is set to the provided value. Negative value, NaN and infinity are considered an error and no changes to filter state are made. If not set, default value of zero is used, which means the filter results in transparent black image.
Definition at line 695 of file nr-filter-gaussian.cpp.
References _deviation_x, and _deviation_y.
void Inkscape::Filters::FilterGaussian::set_deviation | ( | double | x, |
double | y | ||
) |
Set the standard deviation value for gaussian blur.
First parameter sets the deviation alogn x-axis, second along y-axis. Negative value, NaN and infinity are considered an error and no changes to filter state are made. If not set, default value of zero is used, which means the filter results in transparent black image.
Definition at line 702 of file nr-filter-gaussian.cpp.
References _deviation_x, and _deviation_y.
|
private |
Definition at line 65 of file nr-filter-gaussian.h.
Referenced by area_enlarge(), complexity(), FilterGaussian(), render_cairo(), set_deviation(), and set_deviation().
|
private |
Definition at line 66 of file nr-filter-gaussian.h.
Referenced by area_enlarge(), complexity(), FilterGaussian(), render_cairo(), set_deviation(), and set_deviation().