diff options
| author | Markus Engel <markus.engel@tum.de> | 2012-08-21 00:54:06 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2012-08-21 00:54:06 +0000 |
| commit | 62fbbefccbe10ec11e727735e6bfe890003b0af2 (patch) | |
| tree | 1741dcb7c61f75230ba00489ee2d9f3c0d11692f /src/sp-pattern.h | |
| parent | Added "virtual pad" to SPScript. (diff) | |
| download | inkscape-62fbbefccbe10ec11e727735e6bfe890003b0af2.tar.gz inkscape-62fbbefccbe10ec11e727735e6bfe890003b0af2.zip | |
Added "virtual pad" to
- SPPaintServer
- SPPattern
- SPGradient
- SPStop
- SPLinearGradient
- SPMeshGradient
- SPMeshPatch
- SPMeshRow
- SPRadialGradient
As all subclasses of SPPaintServer now have "virtual pads" with correct inheritance, the virtual function call to "onCreatePattern" was converted to C++ style.
(bzr r11608.1.35)
Diffstat (limited to 'src/sp-pattern.h')
| -rw-r--r-- | src/sp-pattern.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/sp-pattern.h b/src/sp-pattern.h index debce86fb..329192c4b 100644 --- a/src/sp-pattern.h +++ b/src/sp-pattern.h @@ -53,7 +53,12 @@ enum { SP_PATTERN_UNITS_OBJECTBOUNDINGBOX }; -struct SPPattern : public SPPaintServer { +class CPattern; + +class SPPattern : public SPPaintServer { +public: + CPattern* cpattern; + /* Reference (href) */ gchar *href; SPPatternReference *ref; @@ -82,6 +87,24 @@ struct SPPatternClass { SPPaintServerClass parent_class; }; + +class CPattern : public CPaintServer { +public: + CPattern(SPPattern* pattern); + virtual ~CPattern(); + + virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void onRelease(); + virtual void onSet(unsigned int key, const gchar* value); + virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void onModified(unsigned int flags); + virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + +protected: + SPPattern* sppattern; +}; + + guint pattern_users (SPPattern *pattern); SPPattern *pattern_chain (SPPattern *pattern); SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property); |
