daily pastebin goal
65%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 57 in 25 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import net.javajoy.jns.drawtools.Canvas;
  2.  
  3. public class DrawRect {
  4.     public static void main(String[] args) {
  5.         double maxSize = 3;
  6.         double minSize = 0.5;
  7.         int n =5;
  8.         Canvas canvas = new Canvas();
  9.         for (int i = 0; i< n; i++){
  10.              drawRect(canvas, i, -12 + 4*1, 0 );
  11.         }
  12.  
  13.     static void drawRect(Canvas canvas, double size, double x0, double y0) {
  14.             canvas.moveTo(x0, y0);
  15.             canvas.lineTo(x0, y0 + size);
  16.             canvas.lineTo(x0 + size, y0 + size);
  17.             canvas.lineTo(x0 + size, y0);
  18.         }
  19.  
  20.     }
RAW Paste Data
Top