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-paint-server.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-paint-server.h')
| -rw-r--r-- | src/sp-paint-server.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h index a266ee5a5..ca5058b43 100644 --- a/src/sp-paint-server.h +++ b/src/sp-paint-server.h @@ -26,7 +26,12 @@ #define SP_IS_PAINT_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_PAINT_SERVER)) #define SP_IS_PAINT_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_PAINT_SERVER)) -struct SPPaintServer : public SPObject { +class CPaintServer; + +class SPPaintServer : public SPObject { +public: + CPaintServer* cpaintserver; + protected: bool swatch; public: @@ -46,6 +51,19 @@ struct SPPaintServerClass { cairo_pattern_t *(*pattern_new)(SPPaintServer *ps, cairo_t *ct, Geom::OptRect const &bbox, double opacity); }; + +class CPaintServer : public CObject { +public: + CPaintServer(SPPaintServer* paintserver); + virtual ~CPaintServer(); + + virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + +protected: + SPPaintServer* sppaintserver; +}; + + cairo_pattern_t *sp_paint_server_create_pattern(SPPaintServer *ps, cairo_t *ct, Geom::OptRect const &bbox, double opacity); |
