diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-07-07 15:55:25 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-07-07 15:55:25 +0000 |
| commit | c7b3b16fe8bdd5ae3c1b84c149db1cb7a4024823 (patch) | |
| tree | e592bcdf6dad5756b4282f37138c4faf6da1c339 /src/sp-polygon.cpp | |
| parent | substitute macro with function call (diff) | |
| download | inkscape-c7b3b16fe8bdd5ae3c1b84c149db1cb7a4024823.tar.gz inkscape-c7b3b16fe8bdd5ae3c1b84c149db1cb7a4024823.zip | |
2geomify polygon. added TODO to add testcase for corner case polygon element
(bzr r6211)
Diffstat (limited to 'src/sp-polygon.cpp')
| -rw-r--r-- | src/sp-polygon.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp index 9b9c91c55..88b155e8e 100644 --- a/src/sp-polygon.cpp +++ b/src/sp-polygon.cpp @@ -208,14 +208,9 @@ void sp_polygon_set(SPObject *object, unsigned int key, const gchar *value) if (has_error || *cptr != '\0') { /* TODO: Flag the document as in error, as per * http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. */ - } else if (curve->_posSet) { - /* We've done a moveto but no lineto. I'm not sure how we're supposed to represent - * a single-point polygon in SPCurve: sp_curve_closepath at the time of writing - * 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. */ - curve->lineto(curve->_movePos); } else if (hascpt) { + /* We might have done a moveto but no lineto. I'm not sure how we're supposed to represent + * a single-point polygon in SPCurve. TODO: add a testcase with only one coordinate pair */ curve->closepath(); } sp_shape_set_curve(SP_SHAPE(polygon), curve, TRUE); |
