Examples of beginPath()


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

                    context.closePath();
                    context.stroke();
                } else if (shape.getType() == ShapeType.POLYGON) {
                    PolygonShape poly = (PolygonShape)shape;
                    Vec2[] vertices = poly.getVertices();
                    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();
View Full Code Here

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

    @Override
    public void draw( final Canvas canvas ) {
        final Context2d context = canvas.getContext2d();
        context.setFillStyle( CssColor.make( 200, 100, 50 ) );
        context.beginPath();
        context.arc( c.getX(),
                     c.getY(),
                     NODE_RADIUS,
                     0,
                     Math.PI * 2.0,
 
View Full Code Here

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

    @Override
    public void draw( final Canvas canvas ) {
        final Context2d context = canvas.getContext2d();
        context.setFillStyle( CssColor.make( 60, 200, 126 ) );
        context.beginPath();
        context.arc( c.getX(),
                     c.getY(),
                     NODE_RADIUS,
                     0,
                     Math.PI * 2.0,
 
View Full Code Here

Examples of gwt.g2d.client.graphics.DirectShapeRenderer.beginPath()

  /**
   * Draws directly onto the surface using {@link DirectShapeRenderer}.
   */
  private void drawDirectly(Surface surface) {
    DirectShapeRenderer shapeRenderer = new DirectShapeRenderer(surface);
    shapeRenderer.beginPath()
        .drawLineSegment(40, 20, 180, 20)
        .drawQuadraticCurveTo(200, 20, 200, 40)
        .drawLineTo(200, 180)
        .drawQuadraticCurveTo(200, 200, 180, 200)
        .drawLineTo(40, 200)
View Full Code Here

Examples of gwt.g2d.client.graphics.DirectShapeRenderer.beginPath()

        .drawQuadraticCurveTo(20, 20, 40, 20)
        .moveTo(50, 50)
        .drawArc(50, 50, 15, (float) Math.toRadians(30), (float) Math.toRadians(-30), false)
        .closePath()
        .stroke();
    shapeRenderer.beginPath()
        .drawEllipse(20, 100, 180, 100)
        .closePath()
        .stroke();
    shapeRenderer.beginPath();
    for (int i = 0; i < 8; i++) {
View Full Code Here

Examples of gwt.g2d.client.graphics.DirectShapeRenderer.beginPath()

        .stroke();
    shapeRenderer.beginPath()
        .drawEllipse(20, 100, 180, 100)
        .closePath()
        .stroke();
    shapeRenderer.beginPath();
    for (int i = 0; i < 8; i++) {
      shapeRenderer.drawCircle(80 + i * 12, 50, 1);
    }
    shapeRenderer.closePath().fill();
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.canvas.Context.beginPath()

   */
  public final class CustomShape extends Shape {
    @Override
    public final void draw(Surface surface) {
      Context context = surface.getContext();
      context.beginPath();
      for (ShapeVisitor shape : shapes) {
        shape.visit(surface);
      }
      context.closePath();
    }
View Full Code Here

Examples of gwt.g2d.client.graphics.canvas.Context.beginPath()

   */
  public final class CustomShape extends Shape {
    @Override
    public final void draw(Surface surface) {
      Context context = surface.getContext();
      context.beginPath();
      for (ShapeVisitor shape : shapes) {
        shape.visit(surface);
      }
      context.closePath();
    }
View Full Code Here

Examples of gwt.g2d.client.graphics.canvas.Context.beginPath()

   */
  public final class CustomShape extends Shape {
    @Override
    public final void draw(Surface surface) {
      Context context = surface.getContext();
      context.beginPath();
      for (ShapeVisitor shape : shapes) {
        shape.visit(surface);
      }
      context.closePath();
    }
View Full Code Here

Examples of javafx.scene.canvas.GraphicsContext.beginPath()

        CTX.translate(CENTER.getX(), CENTER.getY());
        CTX.rotate(-90 + ROTATION_OFFSET);
        CTX.translate(-CENTER.getX(), -CENTER.getY());
        for (int i = 0, size = STOPS.length - 1; i < size; i++) {
            for (double angle = STOPS[i].getOffset() * 360; Double.compare(angle,STOPS[i + 1].getOffset() * 360) <= 0; angle += 0.1) {
                CTX.beginPath();
                CTX.moveTo(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS);
                CTX.setFill(COLOR_LOOKUP.getColorAt(angle / 360));
                if (RADIUS > 0) {
                    CTX.fillArc(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS, 2 * RADIUS, 2 * RADIUS, angle, ANGLE_STEP, ArcType.ROUND);
                } else {
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.