summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7edc1bd)
raw | patch | inline | side by side (parent: 7edc1bd)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 25 Jul 2008 22:11:34 +0000 (22:11 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 25 Jul 2008 22:11:34 +0000 (22:11 +0000) |
src/dyna-draw-context.h | patch | blob | history | |
src/nodepath.cpp | patch | blob | history | |
src/nodepath.h | patch | blob | history |
index 9232dd04b7cbca10b459c517378266586b920e43..09bc73e29d8fce0d18046417993aa5abd07dcde4 100644 (file)
--- a/src/dyna-draw-context.h
+++ b/src/dyna-draw-context.h
*/
#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 f3d07a313b0ef918af69c844c70157fb2f887ef2..bd1f8d7851f250fc218593abb4d117d8a26dd60a 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
#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"
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;
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;
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;
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 19c6e53bc67044d1b70595314d07b0f3f1da6b0b..22cf316a4dc735e760eeaa87589d084cdc91046d 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
//#include "sp-path.h"
//#include "desktop-handles.h"
#include "libnr/nr-path-code.h"
-#include "livarot/Path.h"
#include <glibmm/ustring.h>
#include <gdk/gdkevents.h>
#include <list>
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;
// 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);