GF4J 0.9.4 Beta

gameframe.graphics
Class RotationEffect

java.lang.Object
  |
  +--gameframe.graphics.BitmapEffect
        |
        +--gameframe.graphics.RotationEffect

public class RotationEffect
extends BitmapEffect

Rotates the image around its center the given amount.

Since:
GameFrame for Java 0.9.3
Version:
GameFrame for Java 0.9.4
Author:
Pasi Keränen 18. Mar 2000

Constructor Summary
RotationEffect()
           
 
Method Summary
 float getRotationDegrees()
          Returns the amount of rotation applied to the image in degrees.
 float getRotationRadians()
          Returns the amount of rotation applied to the image in radians.
 BitmapData processData(BitmapData data)
          Rotates the image around its center the given amount.
 void reset()
          Resets the effect settings to default values (no rotation is applied).
 void setRotationDegrees(float degrees)
          Sets the amount of rotation applied to the image in degrees.
 void setRotationRadians(float radians)
          Sets the amount of rotation applied to the image in radians.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotationEffect

public RotationEffect()
Method Detail

setRotationDegrees

public void setRotationDegrees(float degrees)
Sets the amount of rotation applied to the image in degrees.
Parameters:
degrees - The amount of rotation applied to the image.
Since:
GameFrame for Java 0.9.3

setRotationRadians

public void setRotationRadians(float radians)
Sets the amount of rotation applied to the image in radians.
Parameters:
radians - The amount of rotation applied to the image.
Since:
GameFrame for Java 0.9.3

getRotationDegrees

public float getRotationDegrees()
Returns the amount of rotation applied to the image in degrees.
Returns:
The amount of rotation applied to the image.
Since:
GameFrame for Java 0.9.3

getRotationRadians

public float getRotationRadians()
Returns the amount of rotation applied to the image in radians.
Returns:
The amount of rotation applied to the image.
Since:
GameFrame for Java 0.9.3

reset

public void reset()
Resets the effect settings to default values (no rotation is applied).
Overrides:
reset in class BitmapEffect
Since:
GameFrame for Java 0.9.3

processData

public BitmapData processData(BitmapData data)
Rotates the image around its center the given amount.
Overrides:
processData in class BitmapEffect
Parameters:
data - The raw bitmap data that is to be processed.
Returns:
The processed data.

GF4J 0.9.4 Beta