summaryrefslogtreecommitdiffstats
path: root/src/sp-polygon.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/sp-polygon.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/sp-polygon.cpp')
-rw-r--r--src/sp-polygon.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp
index 1fb43c036..23225d714 100644
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
@@ -126,7 +126,7 @@ static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::No
}
/* We can safely write points here, because all subclasses require it too (Lauris) */
- NArtBpath *abp = sp_curve_first_bpath(shape->curve);
+ NArtBpath *abp = shape->curve->first_bpath();
gchar *str = sp_svg_write_polygon(abp);
repr->setAttribute("points", str);
g_free(str);
@@ -171,7 +171,7 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu
* http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. */
break;
}
- SPCurve *curve = sp_curve_new();
+ SPCurve *curve = new SPCurve();
gboolean hascpt = FALSE;
gchar const *cptr = value;
@@ -198,9 +198,9 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu
}
if (hascpt) {
- sp_curve_lineto(curve, x, y);
+ curve->lineto(x, y);
} else {
- sp_curve_moveto(curve, x, y);
+ curve->moveto(x, y);
hascpt = TRUE;
}
}
@@ -214,12 +214,12 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu
* doesn't seem to like simply moveto followed by closepath. The following works,
* but won't round-trip properly: I believe it will write as two points rather than
* one. */
- sp_curve_lineto(curve, curve->movePos);
+ curve->lineto(curve->movePos);
} else if (hascpt) {
- sp_curve_closepath(curve);
+ curve->closepath();
}
sp_shape_set_curve(SP_SHAPE(polygon), curve, TRUE);
- sp_curve_unref(curve);
+ curve->unref();
break;
}
default: