org.deken.game.graphics
Class GameGFX

java.lang.Object
  extended by org.deken.game.graphics.GameGFX

public class GameGFX
extends java.lang.Object

Title: GameGFX

Description: A static element for storing the graphic context.

Copyright: Copyright (c) Dec 11, 2010

Version:
1.0
Author:
Gary Deken

Field Summary
 java.awt.image.VolatileImage dbImage
           
protected  java.awt.Graphics2D gScr
           
 
Constructor Summary
protected GameGFX()
           
  GameGFX(java.awt.Canvas canvas)
           
  GameGFX(java.awt.Frame frame)
           
  GameGFX(javax.swing.JPanel panel)
           
 
Method Summary
 java.awt.GraphicsConfiguration getGraphicsConfiguration()
           
 java.awt.Graphics2D gfx()
          Gets the current graphics context, based on the display mode set.
 void paintScreen()
          Renders the final image for a frame to the screen, based on the buffer strategy.
 void setFullScreen(java.awt.GraphicsDevice graphicsDevice)
          Makes the frame full screen exclusive mode.
 void updateBuffer()
          Updates the graphics content for the next round of rendering, based on the buffer strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbImage

public java.awt.image.VolatileImage dbImage

gScr

protected java.awt.Graphics2D gScr
Constructor Detail

GameGFX

public GameGFX(java.awt.Frame frame)

GameGFX

public GameGFX(javax.swing.JPanel panel)

GameGFX

public GameGFX(java.awt.Canvas canvas)

GameGFX

protected GameGFX()
Method Detail

gfx

public java.awt.Graphics2D gfx()
Gets the current graphics context, based on the display mode set.

Returns:
Graphics2D

paintScreen

public void paintScreen()
Renders the final image for a frame to the screen, based on the buffer strategy.


setFullScreen

public void setFullScreen(java.awt.GraphicsDevice graphicsDevice)
Makes the frame full screen exclusive mode.

Parameters:
graphicsDevice -

updateBuffer

public void updateBuffer()
Updates the graphics content for the next round of rendering, based on the buffer strategy.


getGraphicsConfiguration

public java.awt.GraphicsConfiguration getGraphicsConfiguration()