Package com.google.gwt.canvas.dom.client

Examples of com.google.gwt.canvas.dom.client.Context2d.scale()


        double dy = 0;
        double dw = imageElement.getWidth();
        double dh = imageElement.getHeight();

        // tell it to scale image
        context.scale(scaleToRatioh, scaleToRatiow);

        // draw image to canvas
        context.drawImage(imageElement, sx, sy, sw, sh, dx, dy, dw, dh);

        // get image data
View Full Code Here


      double dy = 0;
      double dw = imageElement.getWidth();
      double dh = imageElement.getHeight();
     
      // tell it to scale image
      context.scale(scaleToRatioh, scaleToRatiow);
           
      // draw image to canvas
      context.drawImage(imageElement, sx, sy, sw, sh, dx, dy, dw, dh);
     
      // get image data
View Full Code Here

  @Override
  public void visit(Surface surface) {
    Context2d context = surface.getContext();
    context.save();
    context.translate(x + width / 2, y + height / 2);
    context.scale(width / 2, height / 2);
    context.arc(0, 0, 1, 0, MathHelper.TWO_PI, true);
    context.restore();
  }
}
View Full Code Here

        context.setFillStyle("white");
        context.setStrokeStyle("grey");
        context.fillRect(0, 0, 600, 600);
        context.save();
        context.translate(0, 600);
        context.scale(1, -1);
        context.scale(100, 100);
        context.setLineWidth(0.01);
        for (Body body = scene.getWorld().getBodyList(); body != null; body = body.getNext()) {
            Vec2 center = body.getPosition();
            context.save();
View Full Code Here

        context.setStrokeStyle("grey");
        context.fillRect(0, 0, 600, 600);
        context.save();
        context.translate(0, 600);
        context.scale(1, -1);
        context.scale(100, 100);
        context.setLineWidth(0.01);
        for (Body body = scene.getWorld().getBodyList(); body != null; body = body.getNext()) {
            Vec2 center = body.getPosition();
            context.save();
            context.translate(center.x, center.y);
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.