Package gwt.g2d.client.graphics.shapes

Examples of gwt.g2d.client.graphics.shapes.ShapeBuilder.rotate()


  private void drawStar(double r) {
    Surface surface = getPrimarySurface();
    surface.save();
    ShapeBuilder shapeBuilder = new ShapeBuilder().moveTo(r, 0);
    for (int i = 0; i < 9; i++) {
      shapeBuilder.rotate(Math.PI / 5);
      if (i % 2 == 0) {
        shapeBuilder.drawLineTo((r / 0.525731) * 0.200811, 0);
      } else {
        shapeBuilder.drawLineTo(r, 0);
      }
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.