Skip to content

Commit 2b57635

Browse files
committed
Fix polygon element drawing position.
1 parent 8862b84 commit 2b57635

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/main/elements/PolygonElement.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ public void buildPolygon()
6767

6868
for (Point2D point : this.pointList)
6969
{
70-
this.polygon.addPoint(point.getAsInt().x, point.getAsInt().y);
70+
this.polygon.addPoint(
71+
(int) (this.getPosition().x() + point.x()),
72+
(int) (this.getPosition().y() + point.y()));
7173
}
7274
}
7375

0 commit comments

Comments
 (0)