summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5652ed3)
raw | patch | inline | side by side (parent: 5652ed3)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 27 Jan 2009 17:12:48 +0000 (17:12 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 27 Jan 2009 17:12:48 +0000 (17:12 +0000) |
src/pencil-context.cpp | patch | blob | history |
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index a29e13e22d5ac94a5f3f3350644d37a8c8e497e7..de286ea5afba91416a7e11843e6ce30fe629633f 100644 (file)
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
#include "desktop-style.h"
#include "macros.h"
#include "display/curve.h"
+#include "livarot/Path.h"
static void sp_pencil_context_class_init(SPPencilContextClass *klass);
static void sp_pencil_context_init(SPPencilContext *pc);
t = 0.5;
}
pc->sketch_interpolation = Geom::lerp(t, fit_pwd2, pc->sketch_interpolation);
+ // simplify path, to eliminate small segments
+ Path *path = new Path;
+ path->LoadPathVector(Geom::path_from_piecewise(pc->sketch_interpolation, 0.01));
+ path->Simplify(0.5);
+ Geom::PathVector *pathv = path->MakePathVector();
+ pc->sketch_interpolation = (*pathv)[0].toPwSb();
+ delete path;
+ delete pathv;
} else {
pc->sketch_interpolation = fit_pwd2;
}