// updates Display public void update() { Window w = vc.getFullScreenWindow(); if (w != null) { BufferStrategy s = w.getBufferStrategy(); if (!s.contentsLost()) { s.show(); } } }
/** @return Retorna el entorno de dibujado. */ public Graphics2D getGraphics() { Window window = device.getFullScreenWindow(); if (window != null) { BufferStrategy strategy = window.getBufferStrategy(); return (Graphics2D) strategy.getDrawGraphics(); } else { return null; } }
// we will set Graphics object = to this public Graphics2D getGraphics() { Window w = vc.getFullScreenWindow(); if (w != null) { BufferStrategy bs = w.getBufferStrategy(); return (Graphics2D) bs.getDrawGraphics(); } else { return null; } }
/** Actualiza la pantalla con el doble buffer e intenta sincronizar la imagen. */ public void update() { Window window = device.getFullScreenWindow(); if (window != null) { BufferStrategy strategy = window.getBufferStrategy(); if (!strategy.contentsLost()) { strategy.show(); } } // Sync the display on some systems. // (on Linux, this fixes event queue problems) Toolkit.getDefaultToolkit().sync(); }