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

Field Summary
protected  float m_flRotation
          The rotation amount to be applied in radians.
 
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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_flRotation

protected float m_flRotation
The rotation amount to be applied in radians.
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