mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Currently displaying basic javafx window with canvas. Also changed the file structure a bit.
At this point the javafx is not tied to the old code in any way #story[377]
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package seng302.controllers;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.canvas.Canvas;
|
||||
import javafx.scene.canvas.GraphicsContext;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
/**
|
||||
* Created by ptg19 on 15/03/17.
|
||||
*/
|
||||
public class CanvasController {
|
||||
@FXML private Canvas canvas;
|
||||
|
||||
public void initialize() {
|
||||
GraphicsContext gc = canvas.getGraphicsContext2D();
|
||||
gc.setFill(Color.GREEN);
|
||||
gc.fillOval(100, 200, 100, 80);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user