Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Filters::FilterMerge Class Reference

#include <nr-filter-merge.h>

Inheritance diagram for Inkscape::Filters::FilterMerge:
Inkscape::Filters::FilterPrimitive

Public Member Functions

 FilterMerge ()
 
void render_cairo (FilterSlot &) const override
 
bool can_handle_affine (Geom::Affine const &) const override
 Indicate whether the filter primitive can handle the given affine.
 
double complexity (Geom::Affine const &ctm) const override
 
bool uses_background () const override
 
void set_input (int input) override
 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.
 
void set_input (int input, int slot) override
 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.
 
Glib::ustring name () const override
 
- Public Member Functions inherited from Inkscape::Filters::FilterPrimitive
 FilterPrimitive ()
 
virtual ~FilterPrimitive ()
 
virtual void update ()
 
virtual void area_enlarge (Geom::IntRect &area, Geom::Affine const &m) const
 
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.
 
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

std::vector< int > _input_image
 

Additional Inherited Members

- Protected Attributes inherited from Inkscape::Filters::FilterPrimitive
int _input
 
int _output
 
SVGLength _subregion_x
 
SVGLength _subregion_y
 
SVGLength _subregion_width
 
SVGLength _subregion_height
 
SPColorInterpolation color_interpolation
 

Detailed Description

Definition at line 22 of file nr-filter-merge.h.

Constructor & Destructor Documentation

◆ FilterMerge()

Inkscape::Filters::FilterMerge::FilterMerge ( )

Definition at line 22 of file nr-filter-merge.cpp.

References Inkscape::Filters::NR_FILTER_SLOT_NOT_SET.

Member Function Documentation

◆ can_handle_affine()

bool Inkscape::Filters::FilterMerge::can_handle_affine ( Geom::Affine const &  ) const
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 63 of file nr-filter-merge.cpp.

◆ complexity()

double Inkscape::Filters::FilterMerge::complexity ( Geom::Affine const &  ctm) const
overridevirtual

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 69 of file nr-filter-merge.cpp.

◆ name()

Glib::ustring Inkscape::Filters::FilterMerge::name ( ) const
inlineoverridevirtual

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 35 of file nr-filter-merge.h.

◆ render_cairo()

◆ set_input() [1/2]

void Inkscape::Filters::FilterMerge::set_input ( int  slot)
overridevirtual

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.

If any of the required input slots is not set, the output of previous filter primitive is used, or SourceGraphic if this is the first primitive for this filter.

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 84 of file nr-filter-merge.cpp.

References _input_image.

◆ set_input() [2/2]

void Inkscape::Filters::FilterMerge::set_input ( int  input,
int  slot 
)
overridevirtual

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.

For primitives with attributes 'in' and 'in2', these are numbered 0 and 1, respectively. If any of required input slots for a filter is not set, the output of previous filter primitive is used, or SourceGraphic if this is the first filter primitive for this filter.

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 89 of file nr-filter-merge.cpp.

References _input_image, and Inkscape::Filters::NR_FILTER_SLOT_NOT_SET.

◆ uses_background()

bool Inkscape::Filters::FilterMerge::uses_background ( ) const
overridevirtual

Member Data Documentation

◆ _input_image

std::vector<int> Inkscape::Filters::FilterMerge::_input_image
private

Definition at line 38 of file nr-filter-merge.h.

Referenced by render_cairo(), set_input(), set_input(), and uses_background().


The documentation for this class was generated from the following files: