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

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


      canvas.setCoordinateSpaceWidth(colWidth * getTotalWidth(theme));
      Context2d ctx = canvas.getContext2d();

      //ctx.clearRect(0, 0, colWidth * columns_.length, height);

      ctx.translate(colWidth / 2.0, 0);

      int startPos = -1;
      int endPos = -1;
      int nexusColumn = -1;
      for (int i = 0; i < columns_.length; i++)
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

        Context2d context = canvas.getContext2d();
        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();
View Full Code Here

        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);
            context.rotate(body.getAngle());
            for (Fixture fixture = body.getFixtureList(); fixture != null; fixture = fixture.getNext()) {
                Shape shape = fixture.getShape();
                if (shape.getType() == ShapeType.CIRCLE) {
                    CircleShape circle = (CircleShape)shape;
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.