Package java.awt.geom

Examples of java.awt.geom.Area


   
    public void clip(Shape s) {
        if (s != null)
            s = _transform.createTransformedShape(s);
        if (_clip == null)
            _clip = new Area(s);
        else
            _clip.intersect(new Area(s));
        followPath(s, CLIP);
    }
View Full Code Here


            s = _transform.createTransformedShape(s);
        if (s == null) {
            _clip = null;
        }
        else {
            _clip = new Area(s);
            followPath(s, CLIP);
        }
        _fillColor = null;
        _strokeColor = null;
        _oldStroke = null;
View Full Code Here

      final ChartEntity chartEntity = entityCollection.getEntity(i);
      if (chartEntity instanceof XYItemEntity ||
          chartEntity instanceof CategoryItemEntity ||
          chartEntity instanceof PieSectionEntity)
      {
        final Area a = new Area(chartEntity.getArea());
        if (buggyDrawArea)
        {
          a.transform(AffineTransform.getTranslateInstance(dataArea.getX(), dataArea.getY()));
        }
        a.intersect(new Area(dataArea));
        graphics2D.draw(a);
      }
      else
      {
        graphics2D.draw(chartEntity.getArea());
View Full Code Here

            (float) (rect.getX() + rect.getWidth()),
            (float) (rect.getY() + rect.getHeight())));
      }
    }

    final Area a = new Area(area);
    if (buggyDrawArea)
    {
      a.transform(AffineTransform.getTranslateInstance(dataArea.getX(), dataArea.getY()));
    }
    if (dataArea.isEmpty() == false)
    {
      a.intersect(new Area(dataArea));
    }
    final PathIterator pathIterator = a.getPathIterator(null, 2);
    final FloatList floats = new FloatList(100);
    final float[] coords = new float[6];
    while (pathIterator.isDone() == false)
    {
      final int retval = pathIterator.currentSegment(coords);
View Full Code Here

        Area[] ticker = new Area[barsCount];
        Point2D.Double center = new Point2D.Double((double) getWidth() / 2, (double) getHeight() / 2);
        double fixedAngle = 2.0 * Math.PI / ((double) barsCount);
       
        for (double i = 0.0; i < (double) barsCount; i++) {
            Area primitive = buildPrimitive();
           
            AffineTransform toCenter = AffineTransform.getTranslateInstance(center.getX(), center.getY());
            AffineTransform toBorder = AffineTransform.getTranslateInstance(45.0, -6.0);
            AffineTransform toCircle = AffineTransform.getRotateInstance(-i * fixedAngle, center.getX(), center.getY());
           
            AffineTransform toWheel = new AffineTransform();
            toWheel.concatenate(toCenter);
            toWheel.concatenate(toBorder);
           
            primitive.transform(toWheel);
            primitive.transform(toCircle);
           
            ticker[(int) i] = primitive;
        }
       
        return ticker;
View Full Code Here

    private Area buildPrimitive() {
        Rectangle2D.Double body = new Rectangle2D.Double(6, 0, 30, 12);
        Ellipse2D.Double   head = new Ellipse2D.Double(0, 0, 12, 12);
        Ellipse2D.Double   tail = new Ellipse2D.Double(30, 0, 12, 12);
       
        Area tick = new Area(body);
        tick.add(new Area(head));
        tick.add(new Area(tail));
       
        return tick;
    }
View Full Code Here

    setFont(new Font("sanserif", Font.PLAIN, 12));
    this.cb = cb;
    cb.saveState();
    this.width = width;
    this.height = height;
    clip = new Area(new Rectangle2D.Float(0, 0, width, height));
    clip(clip);
    oldStroke = strokeOne;
    stroke = strokeOne;
    originalStroke = strokeOne;
    setStrokeDiff(stroke, null);
View Full Code Here

    if (onStroke)
    {
      s = stroke.createStrokedShape(s);
    }
    s = transform.createTransformedShape(s);
    final Area area = new Area(s);
    if (clip != null)
    {
      area.intersect(clip);
    }
    return area.intersects(rect.x, rect.y, rect.width, rect.height);
  }
View Full Code Here

    g2.setFont(this.font);
    g2.cb = this.cb.getDuplicate();
    g2.cb.saveState();
    g2.width = this.width;
    g2.height = this.height;
    g2.followPath(new Area(new Rectangle2D.Float(0, 0, width, height)), PdfGraphics2D.CLIP);
    if (this.clip != null)
    {
      g2.clip = new Area(this.clip);
    }
    g2.stroke = stroke;
    g2.originalStroke = originalStroke;
    g2.strokeOne = (BasicStroke) g2.transformStroke(g2.strokeOne);
    g2.oldStroke = g2.strokeOne;
View Full Code Here

      return;
    }
    s = transform.createTransformedShape(s);
    if (clip == null)
    {
      clip = new Area(s);
    }
    else
    {
      clip.intersect(new Area(s));
    }
    followPath(s, PdfGraphics2D.CLIP);
  }
View Full Code Here

TOP

Related Classes of java.awt.geom.Area

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.