Fixed bug where lines weren't drawn relative to the pen

This commit is contained in:
Lukasz Baldyga committed 2020-11-30 09:28:11 +00:00
1 parent ccc06402e6
commit d962babf60
1 file changed
+4
@@ -146,6 +146,10 @@ namespace Advanced_Software_Engineering {
throw new Exception("Cannot have less than two points in a line");
}
//Make it relative to the pen
for (int pointIndex = 0; pointIndex < points.Length; pointIndex++)
points[pointIndex] = new Point(points[pointIndex].X + penPosition.X, points[pointIndex].Y+ penPosition.Y);
GraphicsPath path = new GraphicsPath {
FillMode = FillMode.Winding
};