package org.procrastinationpatients.tts.utils;

import javafx.geometry.Point2D;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;

/**
 * @Author Decker
 */
public class DrawUtils {
    public static void drawBallAtCoordinate(GraphicsContext gc, Point2D point, Integer size, Color color) {
        gc.setFill(color);
        gc.fillOval(point.getX() - (size / 2), point.getY() - (size / 2), size, size);
    }

    public static void drawLineThrowTwoPoint(GraphicsContext gc, Point2D start, Point2D end, Color color,Integer width) {
        gc.setStroke(color);
        gc.setLineWidth(width);
        gc.strokeLine(start.getX(), start.getY(), end.getX(), end.getY());

    }
}

@@ -149,16 +149,48 @@
 t.Color;
+%0Aimport javafx.scene.shape.Line;
 %0A%0A/**%0A *
@@ -498,21 +498,8 @@
 Line
-ThrowTwoPoint
 (Gra
@@ -555,16 +555,17 @@
 r color,
+ 
 Integer 
@@ -710,16 +710,248 @@
 tY());%0A%0A
+    %7D%0A%0A    public static void drawLine(GraphicsContext gc, Line line, Color color, Integer width) %7B%0A%0A        drawLine(gc, new Point2D(line.getStartX(), line.getStartY()), new Point2D(line.getEndX(), line.getEndY()), color, width);%0A%0A
     %7D%0A%7D%0A

Update DrawUtils