Package org.vaadin.gwtgraphics.client.shape.path

Examples of org.vaadin.gwtgraphics.client.shape.path.LineTo


      int width = endX - beginX;
      int height = endY - beginY;
      if (height != 0 && width != 0) {
        zoomInRect.setStep(5, new MoveTo(false, beginX, beginY));
        zoomInRect.setStep(6, new LineTo(false, endX, beginY));
        zoomInRect.setStep(7, new LineTo(false, endX, endY));
        zoomInRect.setStep(8, new LineTo(false, beginX, endY));
        zoomInRect.setStep(9, new ClosePath());
        screenBounds = factory.createBbox(beginX, beginY, width, height);
      }
    }
View Full Code Here


  public void onScale() {
    calculateBestFit(viewPort.getScale());
    distance.setText(formatUnits(widthInUnits));
    backGround.setWidth(widthInPixels + 6);
    distanceMarker.setStep(2, new LineTo(true, widthInPixels, 0));
  }
View Full Code Here

   *            an absolute x-coordinate in pixels
   * @param y
   *            an absolute y-coordinate in pixels
   */
  public void lineTo(int x, int y) {
    steps.add(new LineTo(false, x, y));
    drawPath();
  }
View Full Code Here

   *            a relative x-coordinate in pixels
   * @param y
   *            a relative y-coordinate in pixels
   */
  public void lineRelativelyTo(int x, int y) {
    steps.add(new LineTo(true, x, y));
    drawPath();
  }
View Full Code Here

      } else if (step.getClass() == MoveTo.class) {
        MoveTo moveTo = (MoveTo) step;
        path.append(moveTo.isRelativeCoords() ? " m" : " M").append(
            moveTo.getX()).append(" ").append(moveTo.getY());
      } else if (step.getClass() == LineTo.class) {
        LineTo lineTo = (LineTo) step;
        path.append(lineTo.isRelativeCoords() ? " l" : " L").append(
            lineTo.getX()).append(" ").append(lineTo.getY());
      } else if (step.getClass() == CurveTo.class) {
        CurveTo curve = (CurveTo) step;
        path.append(curve.isRelativeCoords() ? " c" : " C");
        path.append(curve.getX1()).append(" ").append(curve.getY1());
        path.append(" ").append(curve.getX2()).append(" ").append(
View Full Code Here

      } else if (step.getClass() == MoveTo.class) {
        MoveTo moveTo = (MoveTo) step;
        path.append(moveTo.isRelativeCoords() ? " t" : " m").append(
            moveTo.getX()).append(" ").append(moveTo.getY());
      } else if (step.getClass() == LineTo.class) {
        LineTo lineTo = (LineTo) step;
        path.append(lineTo.isRelativeCoords() ? " r" : " l").append(
            lineTo.getX()).append(" ").append(lineTo.getY());
      } else if (step.getClass() == CurveTo.class) {
        CurveTo curve = (CurveTo) step;
        path.append(curve.isRelativeCoords() ? " v" : " c");
        path.append(curve.getX1()).append(" ").append(curve.getY1());
        path.append(" ").append(curve.getX2()).append(" ").append(
View Full Code Here

TOP

Related Classes of org.vaadin.gwtgraphics.client.shape.path.LineTo

Copyright © 2018 www.massapicom. 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.