diff --git a/src/main/java/de/neemann/digital/draw/graphics/PolygonParser.java b/src/main/java/de/neemann/digital/draw/graphics/PolygonParser.java index 6e4282b54..2fff84713 100644 --- a/src/main/java/de/neemann/digital/draw/graphics/PolygonParser.java +++ b/src/main/java/de/neemann/digital/draw/graphics/PolygonParser.java @@ -102,6 +102,10 @@ public class PolygonParser { return new VectorFloat(x, y); } + private VectorFloat nextVectorRel() throws ParserException { + return new VectorFloat(x + nextValue(), y + nextValue()); + } + /** * Creates a polygon from the given path. * @@ -149,7 +153,7 @@ public class PolygonParser { p.add(nextVector()); break; case 'c': - p.add(nextVectorInc(), nextVectorInc(), nextVectorInc()); + p.add(nextVectorRel(), nextVectorRel(), nextVectorInc()); break; case 'C': p.add(nextVector(), nextVector(), nextVector());