proguard.gui.splash
Class BufferedSprite

java.lang.Object
  extended by proguard.gui.splash.BufferedSprite
All Implemented Interfaces:
Sprite

public class BufferedSprite
extends Object
implements Sprite

This Sprite encapsulates another Sprite, which is then buffered in an Image.

Author:
Eric Lafortune

Constructor Summary
BufferedSprite(int bufferX, int bufferY, Image bufferImage, Color backgroundColor, Sprite sprite, proguard.gui.splash.VariableInt x, proguard.gui.splash.VariableInt y)
          Creates a new BufferedSprite with the given image.
BufferedSprite(int bufferX, int bufferY, int width, int height, Sprite sprite, proguard.gui.splash.VariableInt x, proguard.gui.splash.VariableInt y)
          Creates a new BufferedSprite with an ABGR image.
 
Method Summary
 void paint(Graphics graphics, long time)
          Paints the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedSprite

public BufferedSprite(int bufferX,
                      int bufferY,
                      int width,
                      int height,
                      Sprite sprite,
                      proguard.gui.splash.VariableInt x,
                      proguard.gui.splash.VariableInt y)
Creates a new BufferedSprite with an ABGR image.

Parameters:
bufferX - the x offset of the buffer image.
bufferY - the y offset of the buffer image.
width - the width of the buffer image.
height - the height of the buffer image.
sprite - the Sprite that is painted in the buffer.
x - the variable x ordinate of the image buffer for painting.
y - the variable y ordinate of the image buffer for painting.

BufferedSprite

public BufferedSprite(int bufferX,
                      int bufferY,
                      Image bufferImage,
                      Color backgroundColor,
                      Sprite sprite,
                      proguard.gui.splash.VariableInt x,
                      proguard.gui.splash.VariableInt y)
Creates a new BufferedSprite with the given image.

Parameters:
bufferX - the x offset of the buffer image.
bufferY - the y offset of the buffer image.
bufferImage - the Image that is used for the buffering.
backgroundColor - the background color that is used for the buffer.
sprite - the Sprite that is painted in the buffer.
x - the variable x ordinate of the image buffer for painting.
y - the variable y ordinate of the image buffer for painting.
Method Detail

paint

public void paint(Graphics graphics,
                  long time)
Description copied from interface: Sprite
Paints the object.

Specified by:
paint in interface Sprite
Parameters:
graphics - the Graphics to paint on.
time - the time since the start of the animation, expressed in milliseconds.


Copyright © 2012. All Rights Reserved.