Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Canvas trinagle(String shape, String color, int size) {
- Canvas canvas = new Canvas(300, 300);
- GraphicsContext gc = canvas.getGraphicsContext2D();
- gc.clearRect(0, 0, 350, 350);
- gc.beginPath();
- gc.moveTo(size * 0.5, 0);
- gc.lineTo(size, size);
- gc.lineTo(0, size);
- gc.lineTo(size * 0.5, 0);
- gc.setFill(Color.valueOf(color));
- gc.setStroke(Color.valueOf(color));
- gc.stroke();
- return canvas;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement