Package org.zkoss.canvas

Examples of org.zkoss.canvas.Path.closePath()


    Path p = new Path().moveTo(r, 0);
    for(int i=1; i<n+1; i++){
      double arg = Math.PI * (1.5 + (2.0*i)/n);
      p.lineTo(r + r * Math.cos(arg), r + r * Math.sin(arg));
    }
    p.closePath();
    return p;
  }
 
  // TODO: add nStar given by two radius
 
View Full Code Here


      double arg2 = arg1 - Math.PI/n;
      p.lineTo(r + r2 * Math.cos(arg2), r + r2 * Math.sin(arg2));
      p.lineTo(r + r * Math.cos(arg1), r + r * Math.sin(arg1));
    }
   
    p.closePath();
    return p;
  }
 
  public static Path heart(double size){
    double ctrp1X = 0.1 * size;
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.