summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a950d99)
raw | patch | inline | side by side (parent: a950d99)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 7 Jul 2008 15:55:25 +0000 (15:55 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 7 Jul 2008 15:55:25 +0000 (15:55 +0000) |
src/sp-polygon.cpp | patch | blob | history |
diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp
index 9b9c91c5544828ab5019ee773d9c65cbc689cd06..88b155e8e6761060069d3990c3476b983085b23f 100644 (file)
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
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);