Examples of Arc2D


Examples of java.awt.geom.Arc2D

   * @param stream the outputstream that should receive the object.
   * @throws IOException if an I/O error occured.
   */
  public void writeObject(final Object o, final ObjectOutputStream stream) throws IOException
  {
    final Arc2D arc = (Arc2D) o;
    stream.writeDouble(arc.getX());
    stream.writeDouble(arc.getY());
    stream.writeDouble(arc.getWidth());
    stream.writeDouble(arc.getHeight());
    stream.writeDouble(arc.getAngleStart());
    stream.writeDouble(arc.getAngleExtent());
    stream.writeInt(arc.getArcType());
  }
View Full Code Here

Examples of java.awt.geom.Arc2D

    final Graphics2D graph = file.getGraphics2D();
    final Rectangle rec = getScaledBounds();
    final Point start = getScaledStartingIntersection();
    final Point end = getScaledEndingIntersection();

    final Arc2D arc = new Arc2D.Double();
    arc.setArcType(Arc2D.OPEN);
    arc.setFrame(rec.x, rec.y, rec.width, rec.height);
    arc.setAngles(start.x, start.y, end.x, end.y);

    final MfDcState state = file.getCurrentState();

    if (state.getLogBrush().isVisible())
    {
View Full Code Here

Examples of java.awt.geom.Arc2D

    final Graphics2D graph = file.getGraphics2D();
    final Rectangle rec = getBounds();
    final Point start = getStartingIntersection();
    final Point end = getEndingIntersection();

    final Arc2D arc = new Arc2D.Double();
    arc.setArcType(Arc2D.CHORD);
    arc.setFrame(rec.x, rec.y, rec.width, rec.height);
    arc.setAngles(start.x, start.y, end.x, end.y);

    final MfDcState state = file.getCurrentState();

    if (state.getLogBrush().isVisible())
    {
View Full Code Here

Examples of java.awt.geom.Arc2D

                      final int width,
                      final int height,
                      final int startAngle,
                      final int arcAngle)
  {
    final Arc2D arc = new Arc2D.Double(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN);
    draw(arc);
  }
View Full Code Here

Examples of java.awt.geom.Arc2D

                      final int width,
                      final int height,
                      final int startAngle,
                      final int arcAngle)
  {
    final Arc2D arc = new Arc2D.Double(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN);
    fill(arc);
  }
View Full Code Here

Examples of java.awt.geom.Arc2D

    final Graphics2D graph = file.getGraphics2D();
    final Rectangle rec = getScaledBounds();
    final Point start = getScaledStartingIntersection();
    final Point end = getScaledEndingIntersection();

    final Arc2D arc = new Arc2D.Double();
    arc.setArcType(Arc2D.PIE);
    arc.setFrame(rec.x, rec.y, rec.width, rec.height);
    arc.setAngles(start.x, start.y, end.x, end.y);

    final MfDcState state = file.getCurrentState();

    if (state.getLogBrush().isVisible())
    {
View Full Code Here

Examples of java.awt.geom.Arc2D

                      final int width,
                      final int height,
                      final int startAngle,
                      final int arcAngle)
  {
    final Arc2D arc = new Arc2D.Double(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN);
    draw(arc);

  }
View Full Code Here

Examples of java.awt.geom.Arc2D

                      final int width,
                      final int height,
                      final int startAngle,
                      final int arcAngle)
  {
    final Arc2D arc = new Arc2D.Double(x, y, width, height, startAngle, arcAngle, Arc2D.PIE);
    fill(arc);
  }
View Full Code Here

Examples of java.awt.geom.Arc2D

     */
    public LineString getGeometry( final int pointsPerQuadrant ) {
        assert pointsPerQuadrant > 0;

        GeometryFactory gf = new GeometryFactory();
        Arc2D arc = getArc();
        if (arc == null) {
            return null;
        }

        double flatness = calculateMaxDistanceToCurve(arc, pointsPerQuadrant);
        PathIterator pathIterator = arc.getPathIterator((AffineTransform) null, flatness);
        List<Coordinate> coords = new LinkedList<Coordinate>();

        double[] coordsHolder = new double[6];

        while( !pathIterator.isDone() ) {
View Full Code Here

Examples of java.awt.geom.Arc2D

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    Arc2D arc = new Arc2D.Double(-1.0, -1.0, 2.0, 2.0, 0.0, 90.0, Arc2D.PIE);
    Point2D p = arc.getStartPoint();
    harness.check(p.getX(), 1.0);
    harness.check(p.getY(), 0.0);
  }
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.