/*
6 * Hugo Rodrigues <haa.rodrigues@gmail.com>
7 * Niko Kiirala <niko@kiirala.com>
9 * Copyright (C) 2006,2007 Authors
11 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
13#ifndef SP_FILTER_H_SEEN
14#define SP_FILTER_H_SEEN
17#include <glibmm/ustring.h>
19#include <sigc++/scoped_connection.h>
29namespace Filters {
class Filter; }
42 int tag()
const override {
return tag_of<
decltype(*this)>; }
69 std::unique_ptr<SPFilterReference>
href;
85 void modified(
unsigned flags)
override;
95 std::vector<Inkscape::DrawingItem*>
views;
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Axis aligned, non-empty rectangle.
SVG drawing item for display.
Interface for refcounted XML nodes.
Typed SVG document implementation.
Glib::ustring get_new_result_name() const
Returns a result image name that is not in use inside this filter.
void hide(Inkscape::DrawingItem *item)
void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_repr, Inkscape::XML::Node *new_repr) override
unsigned getRefCount()
Returns the number of references to the filter.
Geom::Rect get_automatic_filter_region(SPItem const *item) const
Generate a filter region based on the item and return it.
void modified(unsigned flags) override
void update_filter_region(SPItem *item)
Update the filter region based on the object's bounding box.
int primitive_count() const
Returns the number of filter primitives in this SPFilter object.
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
std::vector< Inkscape::DrawingItem * > views
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned flags) override
void set_filter_region(double x, double y, double width, double height)
Set the filter region attributes from a bounding box.
void remove_child(Inkscape::XML::Node *child) override
std::unique_ptr< SPFilterReference > href
void update_filter_all_regions()
Update the filter's region based on its detectable href links.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
bool valid_for(SPObject const *obj) const
Checks each filter primitive to make sure the object won't cause issues.
void update(SPCtx *ctx, unsigned flags) override
void show(Inkscape::DrawingItem *item)
NumberOptNumber filterRes
SPFilterUnits primitiveUnits
sigc::scoped_connection modified_connection
SPFilterUnits filterUnits
std::unique_ptr< Inkscape::Filters::Filter > build_renderer(Inkscape::DrawingItem *item)
Returns a renderer for this filter, for use by the DrawingItem item.
Base class for visual SVG elements.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
<number-opt-number> implementation.
TODO: insert short description here.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
Interface for XML documents.