Inkscape
Vector Graphics Editor
|
#include <nr-filter-image.h>
Public Member Functions | |
void | update () 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 |
void | set_document (SPDocument *document) |
void | set_href (char const *href) |
void | set_align (unsigned align) |
void | set_clip (unsigned clip) |
Glib::ustring | name () const override |
![]() | |
FilterPrimitive () | |
virtual | ~FilterPrimitive () |
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. | |
Public Attributes | |
Inkscape::DrawingItem * | item |
bool | from_element = false |
unsigned | aspect_align |
unsigned | aspect_clip |
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 30 of file nr-filter-image.h.
|
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-image.cpp.
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 202 of file nr-filter-image.cpp.
|
inlineoverridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 43 of file nr-filter-image.h.
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 38 of file nr-filter-image.cpp.
References Inkscape::Filters::FilterPrimitive::_output, aspect_align, aspect_clip, Geom::distance(), Inkscape::DrawingItem::drawbox(), Inkscape::Filters::FilterPrimitive::filter_primitive_area(), from_element, Inkscape::Filters::FilterSlot::get_device_scale(), Inkscape::Filters::FilterUnits::get_matrix_user2filterunits(), Inkscape::Filters::FilterUnits::get_matrix_user2pb(), Inkscape::Filters::FilterSlot::get_rendercontext(), Inkscape::Filters::FilterSlot::get_slot_area(), Inkscape::Filters::FilterSlot::get_units(), Geom::GenericRect< C >::height(), Geom::Affine::inverse(), item, Geom::GenericRect< C >::left(), Geom::GenericRect< C >::min(), Inkscape::DrawingItem::render(), Inkscape::DrawingContext::scale(), Inkscape::Filters::FilterSlot::set(), set_cairo_surface_ci(), Inkscape::Filters::FilterSlot::set_primitive_area(), SP_ASPECT_NONE, SP_ASPECT_SLICE, SP_ASPECT_XMAX_YMAX, SP_ASPECT_XMAX_YMID, SP_ASPECT_XMAX_YMIN, SP_ASPECT_XMID_YMAX, SP_ASPECT_XMID_YMID, SP_ASPECT_XMID_YMIN, SP_ASPECT_XMIN_YMAX, SP_ASPECT_XMIN_YMID, SP_ASPECT_XMIN_YMIN, SP_CSS_COLOR_INTERPOLATION_SRGB, Geom::GenericRect< C >::top(), Inkscape::DrawingContext::transform(), Inkscape::DrawingContext::translate(), and Geom::GenericRect< C >::width().
void Inkscape::Filters::FilterImage::set_align | ( | unsigned | align | ) |
Definition at line 208 of file nr-filter-image.cpp.
References aspect_align.
void Inkscape::Filters::FilterImage::set_clip | ( | unsigned | clip | ) |
Definition at line 213 of file nr-filter-image.cpp.
References aspect_clip, and clip().
void Inkscape::Filters::FilterImage::set_document | ( | SPDocument * | document | ) |
void Inkscape::Filters::FilterImage::set_href | ( | char const * | href | ) |
|
overridevirtual |
Reimplemented from Inkscape::Filters::FilterPrimitive.
Definition at line 29 of file nr-filter-image.cpp.
References item, and Inkscape::DrawingItem::update().
unsigned Inkscape::Filters::FilterImage::aspect_align |
Definition at line 48 of file nr-filter-image.h.
Referenced by render_cairo(), and set_align().
unsigned Inkscape::Filters::FilterImage::aspect_clip |
Definition at line 48 of file nr-filter-image.h.
Referenced by render_cairo(), and set_clip().
bool Inkscape::Filters::FilterImage::from_element = false |
Definition at line 46 of file nr-filter-image.h.
Referenced by render_cairo().
Inkscape::DrawingItem* Inkscape::Filters::FilterImage::item |
Definition at line 45 of file nr-filter-image.h.
Referenced by render_cairo(), and update().