Package java.awt

Examples of java.awt.Graphics.clearRect()


            x += delta.getX();
            y += delta.getY();
          }
          x = (int) Math.round(zoom * x);
          y = (int) Math.round(zoom * y);
          gCopy.clearRect(x - offs, y - offs, size, size);
          gCopy.drawRect(x - offs, y - offs, size, size);
        }
      }
      Handle selHandle = selection.getSelectedHandle();
      if (selHandle != null) {
View Full Code Here


      g.setColor(isBackground ? new Color(bgcolor) : new Color(0, 0, 0, 0));
      g.fillRect(0, 0, width, height);
      ((Graphics2D)g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));
      g.drawImage(image, 0, 0, width, height, 0, 0, width0, height0, null);
    } else {
      g.clearRect(0, 0, width, height);
      g.drawImage(image, 0, 0, width, height, 0, 0, width0, height0, null);
    }
    PixelGrabber pixelGrabber = new PixelGrabber(g3d.platform.imageOffscreen,
        0, 0, width, height, true);
    try {
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

  Graphics dbg = null;
  dbi = ImageCache.getImage(this, d.width, d.height);
  dbg = dbi.getGraphics();
  dbg.setClip(s);
  dbg.setColor(color);
  dbg.clearRect(0,0, d.width, d.height);
  dbg.fillRect(marginx,
         marginy,
         width-(2*marginx),
         height-(2*marginy));
  if (border) {
View Full Code Here

  dbg = dbi.getGraphics();
  dbg.setClip(s);
  dbg.setColor(bg);
  dx = d.width - width;
  dy = d.height - height;
  dbg.clearRect(0, 0, d.width, d.height);
  dbg.fill3DRect(1, 1, d.width-2, d.height-2, raised);
  dbg.drawImage(currentImg, dx/2, dy/2, this);
  g.drawImage(dbi, 0, 0, this);
    }
View Full Code Here

    Image image=map.getBufferImage();
    Graphics tg=image.getGraphics();
    ((Graphics2D) tg).setBackground(Color.white);
   
    tg.clearRect(0, 0, image.getWidth(null),image.getHeight(null));
    tg.drawImage(map.getOriginImage(), dx, dy,null);
    image.flush();
    map.getGraphics().drawImage(image, 0, 0,map);
  }
View Full Code Here

                        x += delta.getX();
                        y += delta.getY();
                    }
                    x = (int) Math.round(zoom * x);
                    y = (int) Math.round(zoom * y);
                    gCopy.clearRect(x - offs, y - offs, size, size);
                    gCopy.drawRect(x - offs, y - offs, size, size);
                }
            }
            Handle selHandle = selection.getSelectedHandle();
            if (selHandle != null) {
View Full Code Here

      //
      // Draw the stuff off screen
      //
      //super.paint( screenBufferGraphic );
      screenBufferGraphic.clearRect( 0, 0, _widthCanvas, _heightCanvas );

      if( !_adjusting ) // Avoid flickering on move
      {

        if( _image != null )
View Full Code Here

   * Calls appropriate paint functions to show it on canv
   */
  public void paint()
  {
    Graphics g = canv.getBufferStrategy().getDrawGraphics();
    g.clearRect(0, 0, canv.getWidth(), canv.getHeight());
   
    prepareDeltasMovingMap();
   
    /*
     * If pauses show paused string
View Full Code Here

     * Set contents of the current SurfaceData to default state (i.e. clear
     * the background).
     */
    public void initContents() {
        Graphics g = vImg.createGraphics();
        g.clearRect(0, 0, vImg.getWidth(), vImg.getHeight());
        g.dispose();
    }

    /**
     * Called from a SurfaceData object, indicating that our
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.