SHARE
TWEET

Untitled

a guest Mar 25th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  private Canvas trinagle(String shape, String color, int size) {
  2.         Canvas canvas = new Canvas(300, 300);
  3.         GraphicsContext gc = canvas.getGraphicsContext2D();
  4.         gc.clearRect(0, 0, 350, 350);
  5.  
  6.         gc.beginPath();
  7.         gc.moveTo(size * 0.5, 0);
  8.         gc.lineTo(size, size);
  9.         gc.lineTo(0, size);
  10.         gc.lineTo(size * 0.5, 0);
  11.         gc.setFill(Color.valueOf(color));
  12.         gc.setStroke(Color.valueOf(color));
  13.         gc.stroke();
  14.         return canvas;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top