Package gwt.g2d.client.math

Examples of gwt.g2d.client.math.Vector2


      int size = 10;
      surface.setFillStyle(new Color(color[0], color[1], color[2], .5));
      for (int x = -padding; x <= padding; x++) {
        for (int y = -padding; y <= padding; y++) {
          shapeRenderer.beginPath()
              .drawCircle(pos.add(new Vector2(
                    x * getRandomInt(1, fluff),
                    y * getRandomInt(1, fluff))),
                    size)
              .closePath()
              .fill();
View Full Code Here


        surface.setStrokeStyle(KnownColor.BLACK).setLineWidth(5);
      } else if (isRightButtonDown) {
        surface.setStrokeStyle(KnownColor.WHITE).setLineWidth(20);
      }
      surface.strokeShape(new ShapeBuilder()
          .drawLineSegment(lastPosition, new Vector2(event.getX(), event.getY()))
          .build());
      surface.restore();
      lastPosition.set(event.getX(), event.getY());
    }   
  }
View Full Code Here

 
  /**
   * Gets the size of the surface.
   */
  public Vector2 getSize() {
    return new Vector2(getWidth(), getHeight());
  }
View Full Code Here

  /**
   * Gets the distance that the shadow will be offset in the positive
   * horizontal and vertical direction.
   */
  public Vector2 getShadowOffset() {
    return new Vector2(context.getShadowOffsetX(), context.getShadowOffsetY());
  }
View Full Code Here

  @Override
  public void initialize() {
    add(new Label("Shadow is not supported under IE or Opera (Will be included in Opera 10.5)."));
    super.initialize();
    getPrimarySurface().setShadowOffset(new Vector2(5, 5))
        .setShadowBlur(4)
        .setShadowColor(new Color(255, 0, 0, .5))
        .setFillStyle(KnownColor.BLUE)
        .fillRectangle(20, 20, 150, 100);
  }
View Full Code Here

TOP

Related Classes of gwt.g2d.client.math.Vector2

Copyright © 2018 www.massapicom. 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.