Code

add helpers for creating cairo_t for a canvas buf
[inkscape.git] / src / sp-shape.h
index e8ec6d040f8577137dbc102268d848692ab94880..43d62236a9e8966f4af5f57fb39e13509b67a5d1 100644 (file)
@@ -9,13 +9,15 @@
  *
  * Copyright (C) 1999-2002 Lauris Kaplinski
  * Copyright (C) 2000-2001 Ximian, Inc.
+ * Copyright (C) 2008 Johan Engelen
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
 #include "display/display-forward.h"
-#include "sp-item.h"
+#include "sp-lpe-item.h"
 #include "sp-marker-loc.h"
+#include <2geom/forward.h>
 
 #include <sigc++/connection.h>
 
 
 #define SP_SHAPE_WRITE_PATH (1 << 2)
 
-struct LivePathEffectObject;
-namespace Inkscape{ 
-namespace LivePathEffect{
-    class LPEObjectReference;
-};
-};
+struct SPDesktop;
 
-
-struct SPShape : public SPItem {
+struct SPShape : public SPLPEItem {
     SPCurve *curve;
 
       SPObject *marker[SP_MARKER_LOC_QTY];
       sigc::connection release_connect [SP_MARKER_LOC_QTY];
       sigc::connection modified_connect [SP_MARKER_LOC_QTY];
-
-    gchar *path_effect_href;
-    Inkscape::LivePathEffect::LPEObjectReference *path_effect_ref;
 };
 
 struct SPShapeClass {
-       SPItemClass item_class;
+       SPLPEItemClass item_class;
 
        /* Build bpath from extra shape attributes */
        void (* set_shape) (SPShape *shape);
-
-    void (* update_patheffect) (SPShape *shape, bool write);
 };
 
 GType sp_shape_get_type (void);
@@ -73,13 +64,7 @@ void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value
 int sp_shape_has_markers (SPShape const *shape);
 int sp_shape_number_of_markers (SPShape* Shape, int type);
 NR::Matrix sp_shape_marker_get_transform(SPShape const *shape, NArtBpath const *bp);
-bool sp_shape_marker_required(SPShape const *shape, int const m, NArtBpath *bp);
-
-LivePathEffectObject * sp_shape_get_livepatheffectobject(SPShape *shape);
-void sp_shape_update_patheffect (SPShape *shape, bool write);
-void sp_shape_perform_path_effect(SPCurve *curve, SPShape *shape);
-
-void sp_shape_set_path_effect(SPShape *shape, gchar *value);
-void sp_shape_remove_path_effect(SPShape *shape);
+Geom::Matrix sp_shape_marker_get_transform(Geom::Point & p, Geom::Point & t1, Geom::Point & t2);
+bool sp_shape_marker_required(SPShape const *shape, int const m, NArtBpath const *bp);
 
 #endif