Package java.awt.geom

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


                // complement of the ROI within the image bounds.
                if(srcROI != null) {
                    Area oldInvalidArea = new Area(getBounds());
                    Shape roiShape = srcROI.getAsShape();
                    if(roiShape != null) {
                        oldInvalidArea.subtract(new Area(roiShape));
                    } else {
                        Rectangle oldInvalidBounds =
                            oldInvalidArea.getBounds();
                        LinkedList rectList =
                            srcROI.getAsRectangleList(oldInvalidBounds.x,
View Full Code Here


                                                      oldInvalidBounds.y,
                                                      oldInvalidBounds.width,
                                                      oldInvalidBounds.height);
                        Iterator it = rectList.iterator();
                        while(it.hasNext() && !oldInvalidArea.isEmpty()) {
                            oldInvalidArea.subtract(new Area((Rectangle)it.next()));
                        }
                    }
                    oldInvalidRegion = oldInvalidArea;
                }
View Full Code Here

      area.subtract(new Area(new Rectangle(5, y + height, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + height - 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + 5, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + height - 5, 1, 2)));
      // Add in the triangle piece for the balloon.
      if (vpos == VPOS_BELOW) {
View Full Code Here

      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + height - 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + 5, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + height - 5, 1, 2)));
      // Add in the triangle piece for the balloon.
      if (vpos == VPOS_BELOW) {
        if (hpos == HPOS_LEFT) {
View Full Code Here

      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + height - 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + 5, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + height - 5, 1, 2)));
      // Add in the triangle piece for the balloon.
      if (vpos == VPOS_BELOW) {
        if (hpos == HPOS_LEFT) {
          int[] xPts = {16, 16, 32};
View Full Code Here

      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + height - 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + 5, 1, 1)));
      area.subtract(new Area(new Rectangle(width, y + height - 5, 1, 2)));
      // Add in the triangle piece for the balloon.
      if (vpos == VPOS_BELOW) {
        if (hpos == HPOS_LEFT) {
          int[] xPts = {16, 16, 32};
          int[] yPts = {-1, 16, 16};
View Full Code Here

      area.add(new Area(new Rectangle(4, y + 1, 1, 1)));
      area.add(new Area(new Rectangle(6, y, 2, 1)));
      area.add(new Area(new Rectangle(width - 7, y, 2, 1)));
      // Subtract the extra pixels that are not included by default due to the
      // differences between Graphics drawing and Shape creation.
      area.subtract(new Area(new Rectangle(2, y + height - 2, 1, 1)));
      area.subtract(new Area(new Rectangle(3, y + height - 1, 1, 1)));
      area.subtract(new Area(new Rectangle(5, y + height, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
View Full Code Here

      area.add(new Area(new Rectangle(6, y, 2, 1)));
      area.add(new Area(new Rectangle(width - 7, y, 2, 1)));
      // Subtract the extra pixels that are not included by default due to the
      // differences between Graphics drawing and Shape creation.
      area.subtract(new Area(new Rectangle(2, y + height - 2, 1, 1)));
      area.subtract(new Area(new Rectangle(3, y + height - 1, 1, 1)));
      area.subtract(new Area(new Rectangle(5, y + height, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
View Full Code Here

      area.add(new Area(new Rectangle(width - 7, y, 2, 1)));
      // Subtract the extra pixels that are not included by default due to the
      // differences between Graphics drawing and Shape creation.
      area.subtract(new Area(new Rectangle(2, y + height - 2, 1, 1)));
      area.subtract(new Area(new Rectangle(3, y + height - 1, 1, 1)));
      area.subtract(new Area(new Rectangle(5, y + height, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
View Full Code Here

      // Subtract the extra pixels that are not included by default due to the
      // differences between Graphics drawing and Shape creation.
      area.subtract(new Area(new Rectangle(2, y + height - 2, 1, 1)));
      area.subtract(new Area(new Rectangle(3, y + height - 1, 1, 1)));
      area.subtract(new Area(new Rectangle(5, y + height, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 5, y + height, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 3, y + height - 1, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + 2, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 2, y + height - 2, 2, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + 3, 1, 1)));
      area.subtract(new Area(new Rectangle(width - 1, y + height - 3, 1, 1)));
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.