Esempio n. 1
0
  public void paint(Graphics g) {

    if (backBufferWidth != getSize().width
        || backBufferHeight != getSize().height
        || backBufferImage == null
        || backBufferGraphics == null) resetBackBuffer();

    final Rectangle src = getSrcRect();

    synchronized (this) {
      super.paint(backBufferGraphics);
      for (Overlay overlay : overlays)
        overlay.paint(backBufferGraphics, src.x, src.y, magnification);

      final Roi roi = super.imp.getRoi();
      if (roi != null) roi.draw(backBufferGraphics);
    }

    g.drawImage(backBufferImage, 0, 0, this);
  }
Esempio n. 2
0
 public void update(Graphics g) {
   paint(g);
 }