summaryrefslogtreecommitdiffstats
path: root/src/sp-pattern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-pattern.h')
-rw-r--r--src/sp-pattern.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index 0c468d8f7..1eec0da7f 100644
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
@@ -82,6 +82,14 @@ public:
SPPattern *clone_if_necessary(SPItem *item, const gchar *property);
void transform_multiply(Geom::Affine postmul, bool set);
+ /**
+ * @brief create a new pattern in XML tree
+ * @return created pattern id
+ */
+ static const gchar *produce(const std::list<Inkscape::XML::Node*> &reprs,
+ Geom::Rect bounds, SPDocument *document, Geom::Affine transform, Geom::Affine move);
+
+
virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity);
protected:
@@ -96,9 +104,19 @@ private:
SPPattern *_chain() const;
/**
- Count how many times pat is used by the styles of o and its descendants
+ Count how many times pattern is used by the styles of o and its descendants
*/
guint _count_hrefs(SPObject* o) const;
+
+ /**
+ Gets called when the pattern is reattached to another <pattern>
+ */
+ void _on_ref_changed(SPObject *old_ref, SPObject *ref);
+
+ /**
+ Gets called when the referenced <pattern> is changed
+ */
+ void _on_ref_modified(SPObject *ref, guint flags);
};
@@ -115,10 +133,6 @@ protected:
}
};
-
-const gchar *pattern_tile (const std::list<Inkscape::XML::Node*> &reprs, Geom::Rect bounds, SPDocument *document, Geom::Affine transform, Geom::Affine move);
-
-
#endif // SEEN_SP_PATTERN_H
/*