Package java.awt

Examples of java.awt.Rectangle.intersects()


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


                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

        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

    }

    public Raster getData(Rectangle rect) {
        Rectangle r = (Rectangle)rect.clone();

        if (!r.intersects(getBounds()))
            return null;
        r = r.intersection(getBounds());
        r.translate(-getMinX(), - getMinY());

        Raster ret = bi.getData(r);
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

      Window[] ownedWindows = w.getOwnedWindows();
      if (ownedWindows != null) {
        Rectangle bnd = component.getBounds();
        for (int i = 0; i < ownedWindows.length; i++) {
          Window owned = ownedWindows[i];
          if (owned.isVisible() && bnd.intersects(owned.getBounds())) {

            return true;
          }
        }
      }
View Full Code Here

        for (int row = 0; row < calendarRowCount; row++) {
            for (int column = 0; column < calendarColumnCount; column++) {
                // get the bounds of the current month.
                Rectangle bounds = getMonthBounds(row, column);
                // Check if this row falls in the clip region.
                if (bounds.intersects(clip)) {
                    paintMonth(g, cal);
                }
                cal.add(Calendar.MONTH, 1);
            }
        }
View Full Code Here

      Rectangle clipRect = g.getClipBounds();
      if (this._upperThumbSelected_)
      {
         // Paint lower thumb first, then upper thumb.
         if (clipRect.intersects(thumbRect))
         {
            paintLowerThumb(g);
         }
         if (clipRect.intersects(this._upperThumbRect_))
         {
View Full Code Here

         // Paint lower thumb first, then upper thumb.
         if (clipRect.intersects(thumbRect))
         {
            paintLowerThumb(g);
         }
         if (clipRect.intersects(this._upperThumbRect_))
         {
            paintUpperThumb(g);
         }

      }
View Full Code Here

      }
      else
      {
         // Paint upper thumb first, then lower thumb.
         if (clipRect.intersects(this._upperThumbRect_))
         {
            paintUpperThumb(g);
         }
         if (clipRect.intersects(thumbRect))
         {
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.