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

#include <nr-filter-colormatrix.h>

Inheritance diagram for Inkscape::Filters::FilterColorMatrix:
Inkscape::Filters::FilterPrimitive

Classes

struct  ColorMatrixMatrix
 

Public Member Functions

 FilterColorMatrix ()
 
 ~FilterColorMatrix () override
 
void render_cairo (FilterSlot &slot) 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
 
virtual void set_type (FilterColorMatrixType type)
 
virtual void set_value (double value)
 
virtual void set_values (std::vector< double > const &values)
 
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_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

std::vector< double > values
 
double value
 
FilterColorMatrixType type
 

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 37 of file nr-filter-colormatrix.h.

Constructor & Destructor Documentation

◆ FilterColorMatrix()

Inkscape::Filters::FilterColorMatrix::FilterColorMatrix ( )
default

◆ ~FilterColorMatrix()

Inkscape::Filters::FilterColorMatrix::~FilterColorMatrix ( )
overridedefault

Member Function Documentation

◆ can_handle_affine()

bool Inkscape::Filters::FilterColorMatrix::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 197 of file nr-filter-colormatrix.cpp.

◆ complexity()

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

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 202 of file nr-filter-colormatrix.cpp.

◆ name()

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

Reimplemented from Inkscape::Filters::FilterPrimitive.

Definition at line 51 of file nr-filter-colormatrix.h.

◆ render_cairo()

◆ set_type()

void Inkscape::Filters::FilterColorMatrix::set_type ( FilterColorMatrixType  type)
virtual

Definition at line 207 of file nr-filter-colormatrix.cpp.

References type.

◆ set_value()

void Inkscape::Filters::FilterColorMatrix::set_value ( double  value)
virtual

Definition at line 212 of file nr-filter-colormatrix.cpp.

References value.

◆ set_values()

void Inkscape::Filters::FilterColorMatrix::set_values ( std::vector< double > const &  values)
virtual

Definition at line 217 of file nr-filter-colormatrix.cpp.

References values.

Member Data Documentation

◆ type

FilterColorMatrixType Inkscape::Filters::FilterColorMatrix::type
private

Definition at line 65 of file nr-filter-colormatrix.h.

Referenced by render_cairo(), and set_type().

◆ value

double Inkscape::Filters::FilterColorMatrix::value
private

Definition at line 64 of file nr-filter-colormatrix.h.

Referenced by render_cairo(), and set_value().

◆ values

std::vector<double> Inkscape::Filters::FilterColorMatrix::values
private

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