diff options
| author | Tomasz Boczkowski <penginsbacon@gmail.com> | 2014-05-29 10:04:56 +0000 |
|---|---|---|
| committer | Tomasz Boczkowski <penginsbacon@gmail.com> | 2014-05-29 10:04:56 +0000 |
| commit | 85840ae655411c47248cd794a19dedd9ea3a591f (patch) | |
| tree | 926f3d95c00dd03f491a855995d1fa42bf390214 /src/sp-pattern.h | |
| parent | SPPattern c++-sification: replaced function by methods (diff) | |
| download | inkscape-85840ae655411c47248cd794a19dedd9ea3a591f.tar.gz inkscape-85840ae655411c47248cd794a19dedd9ea3a591f.zip | |
SPPattern c++-sification: replaced function by methods pt3
(bzr r13341.6.22)
Diffstat (limited to 'src/sp-pattern.h')
| -rw-r--r-- | src/sp-pattern.h | 24 |
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 /* |
