Package gwt.g2d.shared.math

Examples of gwt.g2d.shared.math.Vector2


 
  // radius
  private double fRadius;
 
  public CircleShape(double centerX, double centerY, double radius) {
    this(new Vector2(centerX, centerY), radius);
  }
View Full Code Here


 
  /**
   * Gets the size of the surface.
   */
  public Vector2 getSize() {
    return new Vector2(canvas.getCoordinateSpaceWidth(), canvas.getCoordinateSpaceHeight());
  }
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

 
  private Vector2 center;
  private double radius;
 
  public Circle(double centerX, double centerY, double radius) {
    this(new Vector2(centerX, centerY), radius);
  }
View Full Code Here

 
  /**
   * Get the location.
   */
  public Vector2 getLoc() {
    return new Vector2(x,y);
  }
View Full Code Here

 
  /**
   * Get the size.
   */
  public Vector2 getSize() {
    return new Vector2(width, height);
  }
View Full Code Here

   * @param startAngle
   * @param endAngle
   */
  public Arc(double centerX, double centerY, double radius, double startAngle,
      double endAngle) {
    this(new Vector2(centerX, centerY), radius, startAngle, endAngle);
  }
View Full Code Here

      // hit is not transparent - we got a hit!
      if (alpha > Double.MIN_VALUE) {
       
        // look up color
        Handlers handlers = fIdToHandlers.get(id);
        if (handlers != null && handlers.clickHandler != null) handlers.clickHandler.onClick(new Vector2(x, y), id);
        return;

      }
    }
  }
View Full Code Here

   * We put our mouse down on the canvas - check where we clicked exactly.
   */
  public void onMouseDown(int x, int y) {
   
    // perform one single onMouseMove call to detect where we are
    fStartDragLoc = new Vector2(x, y);
    onMouseMove(x, y);
   
    // set the id matched by onMouseMove
    fStartDragId = fLastId;
   
View Full Code Here

   */
  public void onMouseUp(int x, int y) {
   
    // let all handlers know
    for (SurfaceMouseDragHandler handler : fDragHandlers) {
      handler.onDragStop(fStartDragLoc, new Vector2(x, y), fStartDragId, fLastId);
    }
   
    // disable the onMouseMove calls again by setting fStartDragLoc to null
    fStartDragId = null;
    fStartDragLoc = null;
View Full Code Here

TOP

Related Classes of gwt.g2d.shared.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.