Package com.sencha.gxt.chart.client.draw.path

Examples of com.sencha.gxt.chart.client.draw.path.ClosePath


      for (double i = 0; i <= gaugeSteps; i++) {
        double position = i / gaugeSteps * Math.PI - Math.PI;
        line.addCommand(new MoveTo(center.getX() + (rho - margin) * Math.cos(position), center.getY() + (rho - margin)
            * Math.sin(position)));
        line.addCommand(new LineTo(center.getX() + rho * Math.cos(position), center.getY() + rho * Math.sin(position)));
        line.addCommand(new ClosePath());
      }
      line.redraw();
    }
    drawLabels();
    if (title != null) {
View Full Code Here


      } else {
        commands.add(new LineTo(x + centerX, y + centerY));
      }
      coordinates.put(i, new PrecisePoint(x + centerX, y + centerY));
    }
    commands.add(new ClosePath());

    // create path sprite
    if (radar == null) {
      radar = new PathSprite();
      radar.addCommand(new MoveTo(centerX, centerY));
View Full Code Here

    commands.add(new MoveTo(x1, y1));
    commands.add(new LineTo(x2, y2));
    // Solves mysterious clipping bug with IE
    if (Math.abs(x1 - x3) <= 0.01 && Math.abs(y1 - y3) <= 0.01) {
      commands.add(new EllipticalArc(endRho, endRho, 0, flag, 1, x4, y4));
      commands.add(new ClosePath());
    } else {
      commands.add(new EllipticalArc(endRho, endRho, 0, flag, 1, x4, y4));
      commands.add(new LineTo(x3, y3));
      commands.add(new EllipticalArc(startRho, startRho, 0, flag, 0, x1, y1));
      commands.add(new ClosePath());
    }

    return commands;
  }
View Full Code Here

        lines.add(line);
      }
      line.clearCommands();
      line.addCommand(new MoveTo(centerX, centerY));
      line.addCommand(new LineTo(centerX + rho * Math.cos(i / length * pi2), centerY + rho * Math.sin(i / length * pi2)));
      line.addCommand(new ClosePath());
      line.redraw();
    }
    drawLabels();
  }
View Full Code Here

        if (position == Position.LEFT) {
          commands.add(new MoveTo(prevPoint.getX() + 1 + lineWidth, prevPoint.getY() + 0.5 - lineWidth));
          commands.add(new LineTo(prevPoint.getX() + 1 + width - lineWidth, prevPoint.getY() + 0.5 - lineWidth));
          commands.add(new LineTo(point.getX() + 1 + width - lineWidth, point.getY() + 0.5 + lineWidth));
          commands.add(new LineTo(point.getX() + 1 + lineWidth, point.getY() + 0.5 + lineWidth));
          commands.add(new ClosePath());

        } else if (position == Position.RIGHT) {
          commands.add(new MoveTo(prevPoint.getX() - lineWidth, prevPoint.getY() + 0.5 - lineWidth));
          commands.add(new LineTo(prevPoint.getX() - width + lineWidth, prevPoint.getY() + 0.5 - lineWidth));
          commands.add(new LineTo(point.getX() - width + lineWidth, point.getY() + 0.5 + lineWidth));
          commands.add(new LineTo(point.getX() - lineWidth, point.getY() + 0.5 + lineWidth));
          commands.add(new ClosePath());
        } else if (position == Position.TOP) {
          commands.add(new MoveTo(prevPoint.getX() + 0.5 + lineWidth, prevPoint.getY() + 0.5 - lineWidth));
          commands.add(new LineTo(prevPoint.getX() + 0.5 + lineWidth, prevPoint.getY() + 1 + width - lineWidth));
          commands.add(new LineTo(point.getX() + 0.5 - lineWidth, point.getY() + 1 + width - lineWidth));
          commands.add(new LineTo(point.getX() + 0.5 - lineWidth, point.getY() + 1 + lineWidth));
          commands.add(new ClosePath());
        } else {
          commands.add(new MoveTo(prevPoint.getX() + 0.5 + lineWidth, prevPoint.getY() + 1 + lineWidth));
          commands.add(new LineTo(prevPoint.getX() + 0.5 + lineWidth, prevPoint.getY() - width + lineWidth));
          commands.add(new LineTo(point.getX() + 0.5 - lineWidth, point.getY() - width + lineWidth));
          commands.add(new LineTo(point.getX() + 0.5 - lineWidth, point.getY() - lineWidth));
          commands.add(new ClosePath());
        }
      } else if (defaultGridConfig != null) {
        if (position == Position.LEFT) {
          commands.add(new MoveTo(point.getX() + 0.5, point.getY() + 0.5));
          commands.add(new LineTo(width, 0, true));
View Full Code Here

    arrow.addCommand(new LineTo(0, -radius * 0.4, true));
    arrow.addCommand(new LineTo(radius, radius * 0.8, true));
    arrow.addCommand(new LineTo(-radius, radius * 0.8, true));
    arrow.addCommand(new LineTo(0, -radius * 0.4, true));
    arrow.addCommand(new LineTo(-radius * 0.6, 0, true));
    arrow.addCommand(new ClosePath());
    return arrow;
  }
View Full Code Here

    cross.addCommand(new LineTo(radius, radius, true));
    cross.addCommand(new LineTo(-radius, radius, true));
    cross.addCommand(new LineTo(-radius, -radius, true));
    cross.addCommand(new LineTo(-radius, radius, true));
    cross.addCommand(new LineTo(-radius, -radius, true));
    cross.addCommand(new ClosePath());
    return cross;
  }
View Full Code Here

    diamond.addCommand(new MoveTo(cx, cy - radius));
    diamond.addCommand(new LineTo(radius, radius, true));
    diamond.addCommand(new LineTo(-radius, radius, true));
    diamond.addCommand(new LineTo(-radius, -radius, true));
    diamond.addCommand(new LineTo(radius, -radius, true));
    diamond.addCommand(new ClosePath());
    return diamond;
  }
View Full Code Here

    plus.addCommand(new LineTo(0, radius, true));
    plus.addCommand(new LineTo(-radius, 0, true));
    plus.addCommand(new LineTo(0, -radius, true));
    plus.addCommand(new LineTo(-radius, 0, true));
    plus.addCommand(new LineTo(0, -radius, true));
    plus.addCommand(new ClosePath());
    return plus;
  }
View Full Code Here

    radius *= 1.75;
    triangle.addCommand(new MoveTo(cx, cy));
    triangle.addCommand(new MoveTo(0, -radius * 0.58, true));
    triangle.addCommand(new LineTo(radius * 0.5, radius * 0.87, true));
    triangle.addCommand(new LineTo(-radius, 0, true));
    triangle.addCommand(new ClosePath());
    return triangle;
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.chart.client.draw.path.ClosePath

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.