Package java.awt

Examples of java.awt.Rectangle.intersection()


     * into the <code>TiledImage</code>.
     */
    public void setData(Raster r) {
        // Return if the intersection of the image and Raster bounds is empty.
        Rectangle rBounds = r.getBounds();
        if((rBounds = rBounds.intersection(getBounds())).isEmpty()) {
            return;
        }

        // Set tile index limits.
        int txMin = XToTileX(rBounds.x);
View Full Code Here


     */
    public void setData(Raster r, ROI roi) {
        // Return if the intersection of the image bounds, the Raster,
        // and the ROI bounds is empty.
        Rectangle rBounds = r.getBounds();
        if((rBounds = rBounds.intersection(getBounds())).isEmpty() ||
           (rBounds = rBounds.intersection(roi.getBounds())).isEmpty()) {
            return;
        }

        // Get the Rectangle list representation of the ROI.
View Full Code Here

    public void setData(Raster r, ROI roi) {
        // Return if the intersection of the image bounds, the Raster,
        // and the ROI bounds is empty.
        Rectangle rBounds = r.getBounds();
        if((rBounds = rBounds.intersection(getBounds())).isEmpty() ||
           (rBounds = rBounds.intersection(roi.getBounds())).isEmpty()) {
            return;
        }

        // Get the Rectangle list representation of the ROI.
        LinkedList rectList =
View Full Code Here

                WritableRaster wr = getWritableTile(tx, ty);
                if(wr != null) {
                    Rectangle tileRect = getTileRect(tx, ty);
                    for(int i = 0; i < numRects; i++) {
                        Rectangle rect = (Rectangle)rectList.get(i);
                        rect = rect.intersection(tileRect);
                        // XXX: Should the if-block below be split as in
                        // set(RenderedImage, ROI) above?
                        if(!rect.isEmpty()) {
                            Raster rChild =
                                r.createChild(rect.x, rect.y,
View Full Code Here

                            //
                            // Make sure this destination rectangle is
                            // within the bounds of our original writable
                            // destination rectangle
                            //
          wDestRect = wDestRect.intersection(destRect);

          if ((wDestRect.width > 0) &&
        (wDestRect.height > 0)) {
        // Do the operations with these new rectangles
        if (extender == null) {
View Full Code Here

                            //
                            // Make sure this destination rectangle is
                            // within the bounds of our original writable
                            // destination rectangle
                            //
                            hDestRect = hDestRect.intersection(destRect);

                            if ((hDestRect.width > 0) &&
                                (hDestRect.height > 0)) {
                                // Do the operations with these new rectangles
                                if (extender == null) {
View Full Code Here

      Rectangle newDestRect = mapSourceRect(newSrcRect, 0);

                        // Make sure this destination rectangle is
                        // within the bounds of our original writable
                        // destination rectangle
      newDestRect = newDestRect.intersection(destRect);

      if ((newDestRect.width > 0) &&
          (newDestRect.height > 0)) {

                            // Do the operations with these new rectangles
View Full Code Here

                            RTSrcRect.height = newSrcRect.height;

                            RTDestRect = mapSourceRect(RTSrcRect, 0);

                            // Clip this against the whole destrect
                            RTDestRect =  RTDestRect.intersection(destRect);

          // RTSrcRect may be out of image bounds;
          // map one more time
                            RTSrcRect = mapDestRect(RTDestRect, 0);
View Full Code Here

                            BTSrcRect.height = 2 * (tpad + bpad + 1);

                            BTDestRect = mapSourceRect(BTSrcRect, 0);

                            // Clip this against the whole destrect
                            BTDestRect = BTDestRect.intersection(destRect);

          //BTSrcRect maybe out of bounds
          //map one more time
          BTSrcRect = mapDestRect(BTDestRect, 0);
                            //end
View Full Code Here

                            LRTSrcRect.height = 2 * (tpad + bpad + 1);

                            LRTDestRect =  mapSourceRect(LRTSrcRect, 0);

                            // Clip this against the whole destrect
                            LRTDestRect = LRTDestRect.intersection(destRect);

          // LRTSrcRect may still be out of bounds
                            LRTSrcRect = mapDestRect(LRTDestRect, 0);

                            if (LRTDestRect.width > 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.