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

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


        canvasGradient.addColorStop(1, "rgba(200,20,120, 1)");
    context.setFillStyle(canvasGradient);
    context.setStrokeStyle(canvasGradient);
   
    context.beginPath();
    context.moveTo(0 , canvasHeight/3);
    context.lineTo(canvasWidth*2/3, canvasHeight/3);
    context.lineTo(canvasWidth*2/3, 0);
    context.lineTo(canvasWidth, canvasHeight/2);
    context.lineTo(canvasWidth*2/3, canvasHeight);
    context.lineTo(canvasWidth*2/3, canvasHeight*2/3);
 
View Full Code Here


         if (!c.nexus && !c.start && !c.end)
         {
            // Just draw a line from start to end position

            ctx.beginPath();
            ctx.moveTo(startPos * colWidth, 0);
            ctx.lineTo(startPos * colWidth, pad);
            // This next lineTo helps ensure that the shape of the line looks
            // congruous to any specials on the same line
            ctx.lineTo(Math.min(startPos, endPos) * colWidth, height / 2.0);
            ctx.lineTo(endPos * colWidth, height - pad);
View Full Code Here

            if (!c.start)
            {
               // draw from i to nexusColumn;
               ctx.beginPath();
               ctx.moveTo(startPos * colWidth, 0);
               ctx.lineTo(startPos * colWidth, pad);
               ctx.lineTo(nexusColumn * colWidth, height / 2.0);
               ctx.stroke();
            }

View Full Code Here

            if (!c.end)
            {
               // draw from nexusColumn to endPosition
               ctx.beginPath();
               ctx.moveTo(nexusColumn * colWidth, height / 2.0);
               ctx.lineTo(endPos * colWidth, height - pad);
               ctx.lineTo(endPos * colWidth, height);
               ctx.stroke();
            }

View Full Code Here

        endPoint.getX(), endPoint.getY());
  }
 
  public void visit(Surface surface) {
    Context2d context = surface.getContext();
    context.moveTo(startPointX, startPointY);
    context.bezierCurveTo(controlPoint1X, controlPoint1Y,
        controlPoint2X, controlPoint2Y,
        endPointX, endPointY);
  }
}
View Full Code Here

  }
 
  @Override
  public void visit(Surface surface) {
    Context2d context = surface.getContext();
    context.moveTo(x, y);
    context.lineTo(x + width, y);
    context.lineTo(x + width, y + height);
    context.lineTo(x, y + height);
    context.lineTo(x, y);
  }
View Full Code Here

  }
 
  @Override
  public void visit(Surface surface) {
    Context2d context = surface.getContext();
    context.moveTo(fromX, fromY);
    context.lineTo(toX, toY);
  }
}
View Full Code Here

  }
 
  @Override
  public void visit(Surface surface) {
    Context2d context = surface.getContext();
    context.moveTo(startPointX, startPointY);
    context.quadraticCurveTo(controlPointX, controlPointY,
        endPointX, endPointY);
  }
}
View Full Code Here

    for (Slice slice : slices) {
      double weight = slice.weight / totalWeight;
      double endAngle = startAngle + (weight * RADIANS_IN_CIRCLE);
      context.setFillStyle(slice.fill);
      context.beginPath();
      context.moveTo(cx, cy);
      context.arc(cx, cy, radius, startAngle, endAngle);
      context.fill();
      startAngle = endAngle;
    }
  }
View Full Code Here

                    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();
                    context.stroke();
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.