summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a13f00)
raw | patch | inline | side by side (parent: 6a13f00)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 28 May 2006 14:38:37 +0000 (14:38 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 28 May 2006 14:38:37 +0000 (14:38 +0000) |
src/display/curve.cpp | patch | blob | history | |
src/draw-context.cpp | patch | blob | history | |
src/path-chemistry.cpp | patch | blob | history |
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 3e491a2b8a67114ee040b66e2e1bdfd5af44a242..bbbba09f0da72ceed33dfc917f882976a642cf94 100644 (file)
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
new_curve->substart = 0;
new_curve->closed = (new_curve->_bpath->code == NR_MOVETO);
new_curve->hascpt = (new_curve->_bpath->code == NR_MOVETO_OPEN);
- l = g_slist_append(l, new_curve);
- /** \todo
- * effic: Use g_slist_prepend instead. Either work backwards from
- * the end of curve, or work forwards as at present but do
- * g_slist_reverse before returning.
- */
+ l = g_slist_prepend(l, new_curve);
p += i;
}
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 6263880a4ded0f79151a13b94dc0a826e48c8bac..6bea0851b8d465ae9aad488edc4aae69d9aebef4 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
SPCurve *norm = sp_shape_get_curve(SP_SHAPE(item));
sp_curve_transform(norm, sp_item_i2d_affine(dc->white_item));
g_return_if_fail( norm != NULL );
- dc->white_curves = sp_curve_split(norm);
+ dc->white_curves = g_slist_reverse(sp_curve_split(norm));
sp_curve_unref(norm);
/* Anchor list */
for (GSList *l = dc->white_curves; l != NULL; l = l->next) {
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 1cd7480aa6692a5fd459f3997cec650d9a69a0eb..c11754ecee4ce4316db5a543fa3c0c145f8e867d 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
sp_curve_unref(curve);
- for (GSList *l = g_slist_reverse(list); l != NULL; l = l->next) {
+ GSList *reprs = NULL;
+ for (GSList *l = list; l != NULL; l = l->next) {
curve = (SPCurve *) l->data;
Inkscape::XML::Node *repr = sp_repr_new("svg:path");
if (l == list)
repr->setAttribute("id", id);
- selection->add(repr);
+ reprs = g_slist_prepend (reprs, repr);
Inkscape::GC::release(repr);
}
+ selection->setReprList(reprs);
+
+ g_slist_free(reprs);
g_slist_free(list);
g_free(style);