Package java.awt

Examples of java.awt.Graphics.clearRect()


            } else {
                externalFrame.setSize(200, 200);
            }
           
            Graphics g = externalFrame.getGraphics();
            g.clearRect(0, 0, 200, 200);
            externalFrame.paint(g);
            g.translate(externalFrame.getInsets().left, externalFrame.getInsets().top);
            ((Graphics2D)g).setTransform(((Graphics2D)originalGraphics).getTransform());
           
            g.setColor(originalGraphics.getColor());                       
View Full Code Here


    public void initContents() {
        // images with forced acceleration type may have a null sdCurrent
        // because we do not create a backup surface for them
        if (sdCurrent != null) {
            Graphics g = vImg.createGraphics();
            g.clearRect(0, 0, vImg.getWidth(), vImg.getHeight());
            g.dispose();
        }
    }

    /**
 
View Full Code Here

            } else {
                externalFrame.setSize(200, 200);
            }
           
            Graphics g = externalFrame.getGraphics();
            g.clearRect(0, 0, 200, 200);
            externalFrame.paint(g);
            g.translate(externalFrame.getInsets().left, externalFrame.getInsets().top);
            ((Graphics2D)g).setTransform(((Graphics2D)originalGraphics).getTransform());
           
            g.setColor(originalGraphics.getColor());                       
View Full Code Here

            double h = sizey.getValue() / 100.0;
            double a = angle.getValue() / 1000.0;

            Graphics g = psf.createGraphics();

            g.clearRect(0, 0, width, height);
            g.dispose();

            left.drawDot(w, h, a);
        }
    }
View Full Code Here

    }

    private void doclear() {
        Graphics g = psf.createGraphics();

        g.clearRect(0, 0, width, height);
        g.dispose();
        left.repaint();
        recalc();
    }
View Full Code Here

           bufferImage == null )
        resetBuffer();

      Graphics bufferGraphics = bufferImage.getGraphics();
      // Clear the offscreen image
      bufferGraphics.clearRect( 0, 0, bufferWidth, bufferHeight );

      if ( text != null )
        renderer.paintText( this, bufferGraphics, text );

      // Copy offscreen image onto the onscreen image
View Full Code Here

                        g.setClip(ra.paintRects[i]);
                        if (i == UPDATE) {
                            updateComponent(comp, g);
                        } else {
                            if (shouldClearRectBeforePaint) {
                                g.clearRect( ra.paintRects[i].x,
                                             ra.paintRects[i].y,
                                             ra.paintRects[i].width,
                                             ra.paintRects[i].height);
                            }
                            paintComponent(comp, g);
View Full Code Here

    // g.fillRect(0, 0, getWidth(), getHeight());
  }

  public void clearCanvas() {
    Graphics g = getGraphics();
    g.clearRect(0, 0, g.getClipBounds(getVisibleRect()).width,
        g.getClipBounds(getVisibleRect()).height);
    setbkg(Color.RED);
  }

  public void setbkg(Color color) {
View Full Code Here

                        if (buffer == null) {
                            buffer = this.createImage(clientwidth, clientheight);
                        }

                        Graphics bg = buffer.getGraphics();
                        bg.clearRect(0, 0, clientwidth - 1, clientheight - 1);
                        bg.setClip(0, 0, clientwidth, clientheight);
                        bg.setColor(Consts.BACKGROUND);
                        rePaint(bg);
                        g.drawImage(buffer, 0, 0, null);
                        bg.dispose();
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.