Examples of intersection()


Examples of java.awt.Rectangle.intersection()

      final int y = baseY + (int) (verticalPercent * p.height);

      // make sure the dialog fits completely on the screen...
      final Rectangle s = parent.getGraphicsConfiguration().getBounds();
      final Rectangle r = new Rectangle(x, y, d.width, d.height);
      dialog.setBounds(r.intersection(s));
    }

    /**
     * Creates a panel that contains a table based on the specified table model.
     *
 
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        // Compute the intersection of the translated sources with the
        // destination bounds.
        Rectangle destBounds = getBounds();
        bounds = new Rectangle[4];
        for (int i = 0; i < 4; i++) {
            bounds[i] = destBounds.intersection(images[i].getBounds());
        }
    }
               
    /**
     * Computes a tile of the destination by copying the data which
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        Rectangle imRect = new Rectangle(im.getMinX(), im.getMinY(),
                                         im.getWidth(), im.getHeight());

        // Return if the source image does not overlap this image.
        if((imRect = imRect.intersection(getBounds())).isEmpty()) {
            return;
        }

        // Unset buffer sharing flag.
        areBuffersShared = false;
View Full Code Here

Examples of java.awt.Rectangle.intersection()

            for (int i = txMin; i <= txMax; i++) {
                WritableRaster t;
                if ((t = tiles[i - minTileX][j - minTileY]) != null
                    && !isTileLocked(i, j)) {
                    Rectangle tileRect = getTileRect(i, j);
                    tileRect = tileRect.intersection(imRect);
                    if(!tileRect.isEmpty()) {
                        overlayPixels(t, im, tileRect);
                    }
                }
            }
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        // Return if there is not a common intersection among this
        // image and the source image and the region of interest.
        Rectangle overlap = imRect.intersection(roi.getBounds());
        if(overlap.isEmpty() ||
           (overlap = overlap.intersection(getBounds())).isEmpty()) {
            return;
        }

        // Unset buffer sharing flag.
        areBuffersShared = false;
View Full Code Here

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

Examples of java.awt.Rectangle.intersection()

     */
    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

Examples of java.awt.Rectangle.intersection()

    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

Examples of java.awt.Rectangle.intersection()

                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

Examples of java.awt.Rectangle.intersection()

                            //
                            // 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
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.