Examples of intersection()


Examples of java.awt.Rectangle.intersection()

        Rectangle imageBounds = getBounds();
        Rectangle tileBounds = new Rectangle(xmin, ymin,
                 getTileWidth(),
                 getTileHeight());
        tileBounds = tileBounds.intersection(imageBounds);

        Raster tile = getTile(i, j);

        Rectangle realTileBounds = new Rectangle(tile.getMinX(),
                     tile.getMinY(),
View Full Code Here

Examples of java.awt.Rectangle.intersection()

    public RandomIterFallback(RenderedImage im, Rectangle bounds) {
        this.im = im;

        Rectangle imBounds = new Rectangle(im.getMinX(), im.getMinY(),
                                           im.getWidth(), im.getHeight());
        this.boundsRect = imBounds.intersection(bounds);
        this.sampleModel = im.getSampleModel();

        int x = boundsRect.x;
        int y = boundsRect.y;
        int width = boundsRect.width;
View Full Code Here

Examples of java.awt.Rectangle.intersection()

            sampleModel, new Point(orgX, orgY));

        Rectangle rect = new Rectangle(orgX, orgY,
                                       sampleModel.getWidth(),
                                       sampleModel.getHeight());
        rect = rect.intersection(getBounds());

        int numBands = sampleModel.getNumBands();
        int p[] = new int[numBands];

        for (int y = rect.y; y < (rect.y + rect.height); y++) {
View Full Code Here

Examples of java.awt.Rectangle.intersection()

            sampleModel, new Point(orgX, orgY));

        Rectangle rect = new Rectangle(orgX, orgY,
                                       sampleModel.getWidth(),
                                       sampleModel.getHeight());
        rect = rect.intersection(getBounds());

        int numBands = sampleModel.getNumBands();
        int p[] = new int[numBands];

        for (int y = rect.y; y < (rect.y + rect.height); y++) {
View Full Code Here

Examples of java.awt.Rectangle.intersection()

            sampleModel, new Point(orgX, orgY));

        Rectangle rect = new Rectangle(orgX, orgY,
                                       sampleModel.getWidth(),
                                       sampleModel.getHeight());
        rect = rect.intersection(getBounds());

        int numBands = sampleModel.getNumBands();
        int p[] = new int[numBands];

        for (int y = rect.y; y < (rect.y + rect.height); y++) {
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        // Increment dimensions (fix for 4643583).
        sourceRect.width += (int)invScaleX;
        sourceRect.height += (int)invScaleY;

        // Clamp rectangle to source bounds (fix for 4696977).
        return sourceRect.intersection(getSourceImage(0).getBounds());
    }

    /**
     * Subsample (and condense) the given rectangle by the specified scale.
     * The sources are cobbled.
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        //
        // determine the source rectangle needed to compute the destRect
        //
        Rectangle srcRect = mapDestRect(destRect, 0);
        if (extender == null) {
            srcRect = srcRect.intersection(srcimg);
        } else {
            srcRect = srcRect.intersection(padimg);
        }

        if (srcRect.width <= 0 || srcRect.height <= 0) {
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        //
        Rectangle srcRect = mapDestRect(destRect, 0);
        if (extender == null) {
            srcRect = srcRect.intersection(srcimg);
        } else {
            srcRect = srcRect.intersection(padimg);
        }

        if (srcRect.width <= 0 || srcRect.height <= 0) {
            // destRect backward mapped outside the source
      if (setBackground) {
View Full Code Here

Examples of java.awt.Rectangle.intersection()

        RenderedImage srci = (RenderedImage)sources.get(0);
        Rectangle destBounds = new Rectangle(srci.getMinX(),  srci.getMinY(),
                                             srci.getWidth(), srci.getHeight());                                            
        for ( int i = 0; i < numSources; i++ ) {
            srci = (RenderedImage)sources.get(i);
            destBounds = destBounds.intersection(new Rectangle(srci.getMinX(), srci.getMinY(),
                                                 srci.getWidth(), srci.getHeight()));

            int typei = srci.getSampleModel().getTransferType();

            // NOTE: this depends on JDK ordering
View Full Code Here

Examples of java.awt.Rectangle.intersection()

              if (rectList == null) {
                    return; // ROI does not intersect with Raster boundary.
              }  
          ListIterator iterator = rectList.listIterator(0);
          if (iterator.hasNext())
                  rect = rect.intersection((Rectangle)iterator.next());
            }          
                   
            // Find the actual ROI based on start and period.
            rect.x = startPosition(rect.x, xStart, xPeriod);
            rect.y = startPosition(rect.y, yStart, yPeriod);
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.