Package java.awt

Examples of java.awt.Rectangle.intersects()


                clip  = crR;
                clipR = crR;
            } else {
                clipR   = clip.getBounds();

                if (clipR.intersects(crR) == false)
                    return; // Nothing to draw...
                clipR = clipR.intersection(crR);
            }

            Rectangle gcR = getDestinationBounds(g2d);
View Full Code Here


        for (int i = 0, n = rows.getLength(); i < n; i++) {
            Row row = rows.get(i);

            Rectangle2D textBounds = row.glyphVector.getLogicalBounds();
            float rowWidth = (float)textBounds.getWidth();
            if (clipBounds.intersects(new Rectangle2D.Float(0, rowY, rowWidth, rowHeight))) {
                if (selected) {
                    graphics.setPaint(focused && editable ?
                        textAreaSkin.getSelectionColor() : textAreaSkin.getInactiveSelectionColor());
                } else {
                    graphics.setPaint(textAreaSkin.getColor());
View Full Code Here

        for (int i = popupIndexToStartWith; i >= 0; i--) {
          Component popup = popups[i];
          // System.out.println("Popup " +
          // popup.getClass().getName());
          // System.out.println("Popup bounds " + popup.getBounds());
          if (compBoundsConverted.intersects(popup.getBounds())) {
            return true;
          }
        }
        return false;
      }
View Full Code Here

        CachableRed src = (CachableRed)getSources().get(0);

        Rectangle srcR = src.getBounds();
        Rectangle wrR  = wr.getBounds();

        if (wrR.intersects(srcR)) {
            Rectangle r = wrR.intersection(srcR);
       
            // Limit the raster I send to my source to his rect.
            WritableRaster srcWR;
            srcWR = wr.createWritableChild(r.x, r.y, r.width, r.height,
View Full Code Here

        // Don't try and get data from src that it doesn't have...
        CachableRed src = (CachableRed)getSources().get(0);

        // Raster srcRas = src.getData(srcR);

        if (srcR.intersects(src.getBounds()) == false)
            return;
        Raster srcRas = src.getData(srcR.intersection(src.getBounds()));

        if (srcRas == null)
            return;
View Full Code Here

        // For high quality output we should really apply a Gaussian
        // Blur when we are scaling the image down significantly this
        // helps to prevent aliasing in the result image.
        CachableRed cr = getSource();

        if (aoiR.intersects(cr.getBounds()) == false)
            return null;

        if (at.isIdentity()) {
            // System.out.println("Using as is");
            return cr;
View Full Code Here

        if (cm.hasAlpha()) {
            // Already has alpha channel so we use it.
            srcRed.copyData(wr);

            Rectangle rgn = wr.getBounds();
            if (rgn.intersects(alphaRed.getBounds()))
                rgn = rgn.intersection(alphaRed.getBounds());
            else
                return wr;
           
            int [] wrData    = null;
View Full Code Here

                clip  = crR;
                clipR = crR;
            } else {
                clipR   = clip.getBounds();

                if (clipR.intersects(crR) == false)
                    return; // Nothing to draw...
                clipR = clipR.intersection(crR);
            }

            Rectangle gcR = getDestinationBounds(g2d);
View Full Code Here

                        cost1 = cost3;
                        j=-1;
                        break;
                    }

                    if (!r.intersects(cr)) continue;

                    splitRect(cr, r, splits);
                    int splitCost=0;
                    int l=0;
                    for (int k=0; k<4; k++) {
View Full Code Here

                // done with this canidate rect.
                if (sr.x > r.x+r.width)
                    break;

                // If they don't insersect then go to next sub rect.
                if (!r.intersects(sr))
                    continue;

                // Now we know they intersect one another lets
                // figure out how...
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.