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

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


    context.lineTo(canvasWidth, canvasHeight/2);
    context.lineTo(canvasWidth*2/3, canvasHeight);
    context.lineTo(canvasWidth*2/3, canvasHeight*2/3);
    context.lineTo(0, canvasHeight*2/3);
    context.lineTo(0, canvasHeight/3);
    context.closePath();
    context.stroke();
    context.fill();
   
    return canvas.getCanvasElement();
  }
View Full Code Here


      // draw a circle on the nexus
      ctx.beginPath();
      ctx.arc(nexusColumn * colWidth, height / 2.0,
              theme.getCircleRadius() + theme.getStrokeWidth(), 0, Math.PI * 2);
      ctx.closePath();
      ctx.fill();

      ctx.beginPath();
      ctx.arc(nexusColumn * colWidth, height / 2.0,
              theme.getCircleRadius(), 0, Math.PI * 2);
 
View Full Code Here

      ctx.fill();

      ctx.beginPath();
      ctx.arc(nexusColumn * colWidth, height / 2.0,
              theme.getCircleRadius(), 0, Math.PI * 2);
      ctx.closePath();
      ctx.setFillStyle("white");
      ctx.fill();

   }

View Full Code Here

  @Override
  public void draw(Surface surface) {
    Context2d context = surface.getContext();
    context.beginPath();
    context.arc(fCenter.x, fCenter.y, fRadius, 0, MathHelper.TWO_PI, true);
    context.closePath();
  }
}
View Full Code Here

      Context2d context = surface.getContext();
      context.beginPath();
      for (ShapeVisitor shape : shapes) {
        shape.visit(surface);
      }
      context.closePath();
    }
  }
}
View Full Code Here

                Shape shape = fixture.getShape();
                if (shape.getType() == ShapeType.CIRCLE) {
                    CircleShape circle = (CircleShape)shape;
                    context.beginPath();
                    context.arc(circle.m_p.x, circle.m_p.y, circle.getRadius(), 0, Math.PI * 2, true);
                    context.closePath();
                    context.stroke();
                } else if (shape.getType() == ShapeType.POLYGON) {
                    PolygonShape poly = (PolygonShape)shape;
                    Vec2[] vertices = poly.getVertices();
                    context.beginPath();
View Full Code Here

                    context.beginPath();
                    context.moveTo(vertices[0].x, vertices[0].y);
                    for (int i = 1; i < poly.getVertexCount(); ++i) {
                        context.lineTo(vertices[i].x, vertices[i].y);
                    }
                    context.closePath();
                    context.stroke();
                }
            }
            context.restore();
        }
View Full Code Here

                     c.getY(),
                     NODE_RADIUS,
                     0,
                     Math.PI * 2.0,
                     true );
        context.closePath();
        context.fill();

        context.setFont( "10pt sans-serif" );
        context.setTextAlign( Context2d.TextAlign.CENTER );
        context.setTextBaseline( Context2d.TextBaseline.MIDDLE );
View Full Code Here

                     c.getY(),
                     NODE_RADIUS,
                     0,
                     Math.PI * 2.0,
                     true );
        context.closePath();
        context.fill();

        context.setFont( "10pt sans-serif" );
        context.setTextAlign( Context2d.TextAlign.CENTER );
        context.setTextBaseline( Context2d.TextBaseline.MIDDLE );
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.