Package java.awt.geom

Examples of java.awt.geom.Area.intersect()


        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


    {
      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)
View Full Code Here

            s = stroke.createStrokedShape(s);
        }
        s = transform.createTransformedShape(s);
        Area area = new Area(s);
        if (clip != null)
            area.intersect(clip);
        return area.intersects(rect.x, rect.y, rect.width, rect.height);
    }

    /**
     * @see Graphics2D#getDeviceConfiguration()
View Full Code Here

        if(oldClip == null) {
            g.setClip(clip);
            return null;
        }
        Area area = new Area(oldClip);
        area.intersect(new Area(clip));//new Rectangle(0,0,width,height)));
        g.setClip(area);
        return oldClip;
    }
}
View Full Code Here

            s = stroke.createStrokedShape(s);
        }
        s = transform.createTransformedShape(s);
        Area area = new Area(s);
        if (clip != null)
            area.intersect(clip);
        return area.intersects(rect.x, rect.y, rect.width, rect.height);
    }

    /**
     * @see Graphics2D#getDeviceConfiguration()
View Full Code Here

            // Note: clip screws up down-scaled lines
            // Note: we need to take the intersection of the current
            // clip with the background figure. This is probably slow...
            // FIXME: Optimize for rectangles
            Area a = new Area(currentClip);
            a.intersect(new Area(getShape()));
            g.setClip(a);

            // g.setClip(getShape());
            // Paint the pane
            _wrappedPane.paint(g);
View Full Code Here

            // Note: clip screws up down-scaled lines
            // Note: we need to take the intersection of the current
            // clip with the background figure. This is probably slow...
            // FIXME: Optimize for rectangles
            Area a = new Area(currentClip);
            a.intersect(new Area(getShape()));
            g.setClip(a);

            // g.setClip(getShape());
            // Paint the pane
            _wrappedPane.paint(g, region);
View Full Code Here

        if (s != null)
            s = transform.createTransformedShape(s);

        if (clip != null) {
            Area newClip = new Area(clip);
            newClip.intersect(new Area(s));
            clip = new GeneralPath(newClip);
        } else {
            clip = s;
        }
    }
View Full Code Here

            g2.draw(p2);
            return;
        } else if (areaType.equals("add" )) { area.add        (new Area(p2));
        } else if (areaType.equals("sub" )) { area.subtract   (new Area(p2));
        } else if (areaType.equals("xor" )) { area.exclusiveOr(new Area(p2));
        } else if (areaType.equals("int" )) { area.intersect  (new Area(p2));
        } else if (areaType.equals("pear")) {

            double sx = w/100;
            double sy = h/140;
            g2.scale(sx, sy);
View Full Code Here

            g2.fill(leaf1);  

            // Creates the second leaf.
            leaf.setFrame(x+1, y-29, 15.0, 15.0);
            leaf1 = new Area(leaf);
            leaf2.intersect(leaf1);
            g2.fill(leaf2);

            // Creates the stem by filling the Area resulting from the
            // subtraction of two Area objects created from an ellipse.
            Ellipse2D stem = new Ellipse2D.Double(x, y-42, 40.0, 40.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.