-
Jan Kožusznik authoredVerifieda101a49c
DrawingThread.java 598 B
package lab;
import javafx.animation.AnimationTimer;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
public class DrawingThread extends AnimationTimer {
private final Canvas canvas;
private final GraphicsContext gc;
public DrawingThread(Canvas canvas) {
this.canvas = canvas;
this.gc = canvas.getGraphicsContext2D();
}
/**
* Draws objects into the canvas. Put you code here.
*/
@Override
public void handle(long now) {
// put your code here
//gc.setFill(Color.AQUA);
//gc.setStroke(Color.BLACK);
//gc.fillOval(10, 10, 20, 20);
}
}