Package java.awt.geom

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


            Area a3 = new Area((p3));

            // uniao a1, a2 e a3
            Area a123 = new Area(a1);
            a123.intersect(a2);
            a123.intersect(a3);
            MyArea ma123 = new MyArea(a123, cores[0] + cores[1] + cores[2]);
            ma123.calculateArea("a123");

            // uniao a1 e a2
            Area a12 = new Area(a1);
View Full Code Here


            MyArea ma123 = new MyArea(a123, cores[0] + cores[1] + cores[2]);
            ma123.calculateArea("a123");

            // uniao a1 e a2
            Area a12 = new Area(a1);
            a12.intersect(a2);
            a12.subtract(a3);
            MyArea ma12 = new MyArea(a12, cores[0] + cores[1]);
            ma12.calculateArea("a12");

            // uniao a1 e a3
View Full Code Here

            MyArea ma12 = new MyArea(a12, cores[0] + cores[1]);
            ma12.calculateArea("a12");

            // uniao a1 e a3
            Area a13 = new Area(a1);
            a13.intersect(a3);
            a13.subtract(a2);
            MyArea ma13 = new MyArea(a13, cores[2] + cores[0]);
            ma13.calculateArea("a13");

            // uniao a1 e a3
View Full Code Here

            MyArea ma13 = new MyArea(a13, cores[2] + cores[0]);
            ma13.calculateArea("a13");

            // uniao a1 e a3
            Area a23 = new Area(a2);
            a23.intersect(a3);
            a23.subtract(a1);
            MyArea ma23 = new MyArea(a23, cores[1] + cores[2]);
            ma23.calculateArea("a23");

            // fix its area
View Full Code Here

        if(clip == null) {
            clip = s;
        } else {
            Area clipArea = (clip instanceof Area ?
                             (Area)clip : new Area(clip));
            clipArea.intersect(s instanceof Area ? (Area)s : new Area(s));
            clip = clipArea;
        }

        queueOpArg("clip",
                   new Class[] {java.awt.Shape.class},
View Full Code Here

        if(clip == null) {
            clip = s;
        } else {
            Area clipArea = (clip instanceof Area ?
                             (Area)clip : new Area(clip));
            clipArea.intersect(s instanceof Area ? (Area)s : new Area(s));
            clip = clipArea;
        }
    }

    public FontRenderContext getFontRenderContext() {
View Full Code Here

                    !isTileLocked(i, j)) {
                    Rectangle rect = getTileRect(i, j).intersection(overlap);
                    if(!rect.isEmpty()) {
                        if (roiShape != null) {
                            Area a = new Area(rect);
                            a.intersect(roiArea);

                            if(!a.isEmpty()) {
                                overlayPixels(t, im, a);
                            }
                        } else {
View Full Code Here

                        Shape roiShape = srcROI.getAsShape();

                        if (roiShape != null) {
                            // Determine the area of overlap.
                            Area a = new Area(rect);
                            a.intersect(new Area(roiShape));

                            if(!a.isEmpty()) {
                                // If the area is non-empty overlay the pixels.
                                overlayPixels(tile, src, a);
                            }
View Full Code Here

            // Intersect with ROI.
            Area invalidArea = new Area(invalidRegion);
            if(srcROI != null) {
                Shape roiShape = srcROI.getAsShape();
                if(roiShape != null) {
                    invalidArea.intersect(new Area(roiShape));
                } else {
                    LinkedList rectList =
                        srcROI.getAsRectangleList(invalidBounds.x,
                                                  invalidBounds.y,
                                                  invalidBounds.width,
View Full Code Here

                                                  invalidBounds.y,
                                                  invalidBounds.width,
                                                  invalidBounds.height);
                    Iterator it = rectList.iterator();
                    while(it.hasNext() && !invalidArea.isEmpty()) {
                        invalidArea.intersect(new Area((Rectangle)it.next()));
                    }
                }
            }

            // If empty, all is valid.
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.