Package java.awt

Examples of java.awt.Graphics.clipRect()


                    repaintRect.width, repaintRect.height, visibleRect);
            if (repaintRect.isEmpty()) {
                g.dispose();
                return;
            }
            g.clipRect(rect.x, rect.y, rect.width, rect.height);
        }
        if (RepaintManager.currentManager(this).isDoubleBufferingEnabled()
                && effectiveRoot instanceof JComponent
                && isDoubleBufferingEnabled(effectiveRoot)) {
            ((JComponent) effectiveRoot).paintDoubleBuffered(g);
View Full Code Here


     */
    public void drawImage(Graphics g, Image img, int imgx, int imgy,
        int x, int y, int w, int h) {
  Graphics ng = g.create();
  try {
      ng.clipRect(x, y, w, h);
      ng.drawImage(img, imgx, imgy, this);
  } finally {
      ng.dispose();
  }
    }
View Full Code Here

 
        // create the offscreen buffer and associated Graphics
        offscreen = ImageCache.getImage(this, d.width, d.height);
        offgc = offscreen.getGraphics();
        if(r != null) {
            offgc.clipRect(r.x, r.y, r.width, r.height);
        }
        // clear the exposed area
        offgc.setColor(getBackground());
        offgc.fillRect(0, 0, d.width, d.height);
        offgc.setColor(getForeground());
View Full Code Here

   * new translation and clip area.
   */
  public Graphics create(int x, int y, int width, int height) {
    Graphics g = create();
    g.translate(x, y);
    g.clipRect(0, 0, width, height);
    return g;
  }

  /**
   * Returns the current Color. This will be a default value (black) until it
View Full Code Here

                        int y = bounds.y;
                        if (clipBounds != null) {
                            bounds = bounds.intersection(clipBounds);
                        }
                        bounds.translate(-x, -y);
                        gComp.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
                        if (!gComp.getClipBounds().isEmpty()) {
                            comp.paint(gComp);
                        }
                        gComp.dispose();
                    }
View Full Code Here

            repaintRect = SwingUtilities.computeIntersection(repaintRect.x, repaintRect.y,
                    repaintRect.width, repaintRect.height, visibleRect);
            if (repaintRect.isEmpty()) {
                return;
            }
            g.clipRect(rect.x, rect.y, rect.width, rect.height);
        }
        if (RepaintManager.currentManager(this).isDoubleBufferingEnabled()
                && effectiveRoot instanceof JComponent
                && isDoubleBufferingEnabled(effectiveRoot)) {
            ((JComponent) effectiveRoot).paintDoubleBuffered(g);
View Full Code Here

                        int y = bounds.y;
                        if (clipBounds != null) {
                            bounds = bounds.intersection(clipBounds);
                        }
                        bounds.translate(-x, -y);
                        gComp.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
                        if (!gComp.getClipBounds().isEmpty()) {
                            comp.paint(gComp);
                        }
                        gComp.dispose();
                    }
View Full Code Here

                    repaintRect.width, repaintRect.height, visibleRect);
            if (repaintRect.isEmpty()) {
                g.dispose();
                return;
            }
            g.clipRect(rect.x, rect.y, rect.width, rect.height);
        }
        if (RepaintManager.currentManager(this).isDoubleBufferingEnabled()
                && effectiveRoot instanceof JComponent
                && isDoubleBufferingEnabled(effectiveRoot)) {
            ((JComponent) effectiveRoot).paintDoubleBuffered(g);
View Full Code Here

                        int y = bounds.y;
                        if (clipBounds != null) {
                            bounds = bounds.intersection(clipBounds);
                        }
                        bounds.translate(-x, -y);
                        gComp.clipRect(bounds.x, bounds.y, bounds.width, bounds.height);
                        if (!gComp.getClipBounds().isEmpty()) {
                            comp.paint(gComp);
                        }
                        gComp.dispose();
                    }
View Full Code Here

                    repaintRect.width, repaintRect.height, visibleRect);
            if (repaintRect.isEmpty()) {
                g.dispose();
                return;
            }
            g.clipRect(rect.x, rect.y, rect.width, rect.height);
        }
        if (RepaintManager.currentManager(this).isDoubleBufferingEnabled()
                && effectiveRoot instanceof JComponent
                && isDoubleBufferingEnabled(effectiveRoot)) {
            ((JComponent) effectiveRoot).paintDoubleBuffered(g);
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.