summaryrefslogtreecommitdiffstats
path: root/src/sp-mesh-gradient.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2012-08-21 00:54:06 +0000
committerMarkus Engel <markus.engel@tum.de>2012-08-21 00:54:06 +0000
commit62fbbefccbe10ec11e727735e6bfe890003b0af2 (patch)
tree1741dcb7c61f75230ba00489ee2d9f3c0d11692f /src/sp-mesh-gradient.h
parentAdded "virtual pad" to SPScript. (diff)
downloadinkscape-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-mesh-gradient.h')
-rw-r--r--src/sp-mesh-gradient.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/sp-mesh-gradient.h b/src/sp-mesh-gradient.h
index 44d6c0e4c..a366165b4 100644
--- a/src/sp-mesh-gradient.h
+++ b/src/sp-mesh-gradient.h
@@ -9,8 +9,13 @@
#include "sp-gradient.h"
#include "sp-mesh-gradient-fns.h"
+class CMeshGradient;
+
/** Mesh gradient. */
-struct SPMeshGradient : public SPGradient {
+class SPMeshGradient : public SPGradient {
+public:
+ CMeshGradient* cmeshgradient;
+
SVGLength x; // Upper left corner of mesh
SVGLength y; // Upper right corner of mesh
};
@@ -21,6 +26,21 @@ struct SPMeshGradientClass {
};
+class CMeshGradient : public CGradient {
+public:
+ CMeshGradient(SPMeshGradient* meshgradient);
+ virtual ~CMeshGradient();
+
+ virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr);
+ virtual void onSet(unsigned key, gchar const *value);
+ virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity);
+
+protected:
+ SPMeshGradient* spmeshgradient;
+};
+
+
#endif /* !SP_MESH_GRADIENT_H */
/*