summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-05-05 19:00:20 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-05-05 19:00:20 +0000
commitd955f60393f4f85b0269346f37b4481a1c70205a (patch)
tree2dd9a11fe737c4a43c8aa88451acd3c8f766fff2 /src/path-chemistry.cpp
parentCmake: Moved helper macros to their own file and removed *-test.h from inksca... (diff)
downloadinkscape-d955f60393f4f85b0269346f37b4481a1c70205a.tar.gz
inkscape-d955f60393f4f85b0269346f37b4481a1c70205a.zip
struct SPCurve => class SPCurve
change all sp_curve_methods functions to SPCurve::methods. (bzr r5609)
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 4325918c3..b6567a012 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -112,12 +112,12 @@ sp_selected_path_combine(void)
// FIXME: merge styles of combined objects instead of using the first one's style
style = g_strdup(SP_OBJECT_REPR(first)->attribute("style"));
path_effect = g_strdup(SP_OBJECT_REPR(first)->attribute("inkscape:path-effect"));
- //sp_curve_transform(c, item->transform);
+ //c->transform(item->transform);
curve = c;
} else {
- sp_curve_transform(c, item->getRelativeTransform(SP_OBJECT(first)));
- sp_curve_append(curve, c, false);
- sp_curve_unref(c);
+ c->transform(item->getRelativeTransform(SP_OBJECT(first)));
+ curve->append(c, false);
+ c->unref();
}
// unless this is the topmost object,
@@ -150,7 +150,7 @@ sp_selected_path_combine(void)
// set path data corresponding to new curve
gchar *dstring = sp_svg_write_path(SP_CURVE_BPATH(curve));
- sp_curve_unref(curve);
+ curve->unref();
repr->setAttribute("d", dstring);
if (path_effect)
repr->setAttribute("inkscape:original-d", dstring);
@@ -223,17 +223,17 @@ sp_selected_path_break_apart(void)
NArtBpath *abp = nr_artpath_affine(SP_CURVE_BPATH(curve), (SP_ITEM(path))->transform);
- sp_curve_unref(curve);
+ curve->unref();
// it's going to resurrect as one of the pieces, so we delete without advertisement
SP_OBJECT(item)->deleteObject(false);
- curve = sp_curve_new_from_bpath(abp);
+ curve = SPCurve::new_from_bpath(abp);
g_assert(curve != NULL);
- GSList *list = sp_curve_split(curve);
+ GSList *list = curve->split();
- sp_curve_unref(curve);
+ curve->unref();
GSList *reprs = NULL;
for (GSList *l = list; l != NULL; l = l->next) {
@@ -437,7 +437,7 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
// otherwise we end up with zomby markup in the SVG file
if(curve->end <= 0)
{
- sp_curve_unref(curve);
+ curve->unref();
return NULL;
}
@@ -469,7 +469,7 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
gchar *def_str = sp_svg_write_path(SP_CURVE_BPATH(curve));
repr->setAttribute("d", def_str);
g_free(def_str);
- sp_curve_unref(curve);
+ curve->unref();
return repr;
}
@@ -503,7 +503,7 @@ sp_selected_path_reverse()
did = true;
SPPath *path = SP_PATH(i->data);
- SPCurve *rcurve = sp_curve_reverse(sp_path_get_curve_reference(path));
+ SPCurve *rcurve = sp_path_get_curve_reference(path)->reverse();
gchar *str = sp_svg_write_path(SP_CURVE_BPATH(rcurve));
if ( sp_lpe_item_has_path_effect_recursive(SP_LPE_ITEM(path)) ) {
@@ -513,7 +513,7 @@ sp_selected_path_reverse()
}
g_free(str);
- sp_curve_unref(rcurve);
+ rcurve->unref();
}
desktop->clearWaitingCursor();