From: johanengelen Date: Fri, 25 Jul 2008 22:11:34 +0000 (+0000) Subject: purge livarot stuff from nodepath X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5cc787c3c831fe7d1279bc8344d8f8c9cafbdc37;p=inkscape.git purge livarot stuff from nodepath --- diff --git a/src/dyna-draw-context.h b/src/dyna-draw-context.h index 9232dd04b..09bc73e29 100644 --- a/src/dyna-draw-context.h +++ b/src/dyna-draw-context.h @@ -19,6 +19,7 @@ */ #include "common-context.h" +#include "splivarot.h" #define SP_TYPE_DYNA_DRAW_CONTEXT (sp_dyna_draw_context_get_type()) #define SP_DYNA_DRAW_CONTEXT(o) (GTK_CHECK_CAST((o), SP_TYPE_DYNA_DRAW_CONTEXT, SPDynaDrawContext)) diff --git a/src/nodepath.cpp b/src/nodepath.cpp index f3d07a313..bd1f8d785 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -44,7 +44,6 @@ #include "sp-metrics.h" #include "sp-path.h" #include "libnr/nr-matrix-ops.h" -#include "splivarot.h" #include "svg/svg.h" #include "verbs.h" #include "display/bezier-utils.h" @@ -219,7 +218,6 @@ Inkscape::NodePath::Path *sp_nodepath_new(SPDesktop *desktop, SPObject *object, np->subpaths = NULL; np->selected = NULL; np->shape_editor = NULL; //Let the shapeeditor that makes this set it - np->livarot_path = NULL; np->local_change = 0; np->show_handles = show_handles; np->helper_path = NULL; @@ -291,9 +289,6 @@ Inkscape::NodePath::Path *sp_nodepath_new(SPDesktop *desktop, SPObject *object, delete[] typestr; curve->unref(); - // create the livarot representation from the same item - sp_nodepath_ensure_livarot_path(np); - sp_nodepath_draw_helper_curve(np, desktop); return np; @@ -317,11 +312,6 @@ void sp_nodepath_destroy(Inkscape::NodePath::Path *np) { g_assert(!np->selected); - if (np->livarot_path) { - delete np->livarot_path; - np->livarot_path = NULL; - } - if (np->helper_path) { GtkObject *temp = np->helper_path; np->helper_path = NULL; @@ -346,22 +336,6 @@ void sp_nodepath_destroy(Inkscape::NodePath::Path *np) { g_free(np); } - -void sp_nodepath_ensure_livarot_path(Inkscape::NodePath::Path *np) -{ - if (np && np->livarot_path == NULL) { - SPCurve *curve = create_curve(np); - np->livarot_path = new Path; - np->livarot_path->LoadPathVector(curve->get_pathvector()); - - if (np->livarot_path) - np->livarot_path->ConvertWithBackData(0.01); - - curve->unref(); - } -} - - /** * Return the node count of a given NodeSubPath. */ @@ -632,11 +606,6 @@ void sp_nodepath_update_repr(Inkscape::NodePath::Path *np, const gchar *annotati //fixme: np can be NULL, so check before proceeding g_return_if_fail(np != NULL); - if (np->livarot_path) { - delete np->livarot_path; - np->livarot_path = NULL; - } - update_repr_internal(np); sp_canvas_end_forced_full_redraws(np->desktop->canvas); @@ -649,11 +618,6 @@ void sp_nodepath_update_repr(Inkscape::NodePath::Path *np, const gchar *annotati */ static void sp_nodepath_update_repr_keyed(Inkscape::NodePath::Path *np, gchar const *key, const gchar *annotation) { - if (np->livarot_path) { - delete np->livarot_path; - np->livarot_path = NULL; - } - update_repr_internal(np); sp_document_maybe_done(sp_desktop_document(np->desktop), key, SP_VERB_CONTEXT_NODE, annotation); diff --git a/src/nodepath.h b/src/nodepath.h index 19c6e53bc..22cf316a4 100644 --- a/src/nodepath.h +++ b/src/nodepath.h @@ -16,7 +16,6 @@ //#include "sp-path.h" //#include "desktop-handles.h" #include "libnr/nr-path-code.h" -#include "livarot/Path.h" #include #include #include @@ -237,9 +236,6 @@ class Path { guint numSelected() {return (selected? g_list_length(selected) : 0);} NR::Point& singleSelectedCoords() {return (((Node *) selected->data)->pos);} - /// livarot library is used for "point on path" and "nearest position on path", so we need to maintain its path representation as well - ::Path *livarot_path; - /// draw a "sketch" of the path by using these variables SPCanvasItem *helper_path; SPCurve *curve; @@ -274,7 +270,6 @@ enum { // Do function documentation in nodepath.cpp Inkscape::NodePath::Path * sp_nodepath_new (SPDesktop * desktop, SPObject *object, bool show_handles, const char * repr_key = NULL, SPItem *item = NULL); void sp_nodepath_destroy (Inkscape::NodePath::Path * nodepath); -void sp_nodepath_ensure_livarot_path(Inkscape::NodePath::Path *np); void sp_nodepath_deselect (Inkscape::NodePath::Path *nodepath); void sp_nodepath_select_all (Inkscape::NodePath::Path *nodepath, bool invert); void sp_nodepath_select_all_from_subpath(Inkscape::NodePath::Path *nodepath, bool invert);