com.threerings.opengl.gui.icon
Class RotatedIcon

java.lang.Object
  extended by com.threerings.opengl.gui.icon.Icon
      extended by com.threerings.opengl.gui.icon.RotatedIcon

public class RotatedIcon
extends Icon

Rotates a sub-icon.


Field Summary
protected  Icon _icon
          The sub-icon to rotate.
protected  float _rotation
          The rotation amount in degrees.
 
Constructor Summary
RotatedIcon(Icon icon, float rotation)
          Creates a new rotated icon.
 
Method Summary
 int getHeight()
          Returns the height of this icon.
 int getWidth()
          Returns the width of this icon.
 void render(Renderer renderer, int x, int y, float alpha)
          Renders this icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_icon

protected Icon _icon
The sub-icon to rotate.


_rotation

protected float _rotation
The rotation amount in degrees.

Constructor Detail

RotatedIcon

public RotatedIcon(Icon icon,
                   float rotation)
Creates a new rotated icon.

Parameters:
rotation - the rotation amount in degrees.
Method Detail

getWidth

public int getWidth()
Returns the width of this icon.

Specified by:
getWidth in class Icon

getHeight

public int getHeight()
Returns the height of this icon.

Specified by:
getHeight in class Icon

render

public void render(Renderer renderer,
                   int x,
                   int y,
                   float alpha)
Renders this icon.

Overrides:
render in class Icon