org.scilab.forge.scirenderer.examples
Class RotatableSprite.RotatableSpriteDrawer

java.lang.Object
  extended by org.scilab.forge.scirenderer.examples.RotatableSprite.RotatableSpriteDrawer
All Implemented Interfaces:
Drawer
Enclosing class:
RotatableSprite

public static class RotatableSprite.RotatableSpriteDrawer
extends java.lang.Object
implements Drawer

A rotatable sprite drawer. Draws one rotating sprite for each existing sprite anchor position value.

Author:
Manuel Juliachs

Constructor Summary
RotatableSprite.RotatableSpriteDrawer(Canvas canvas)
          Constructor.
 
Method Summary
 void draw(DrawingTools drawingTools)
          Ask this drawer to draw with the given drawing tools.
 TextureDrawer getSpriteDrawer()
          Returns the anchor sprite drawer.
 TextureDrawer getTextDrawer(int textSpriteIndex)
          Returns the sprite drawer associated to a particular text sprite.
 void switchRotationDirection()
          Switches the rotation direction.
 void toggleAnchorDisplay()
          Toggles display of the anchors.
 void toggleMessageDisplay()
          Toggles display of the help message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotatableSprite.RotatableSpriteDrawer

public RotatableSprite.RotatableSpriteDrawer(Canvas canvas)
Constructor.

Parameters:
canvas - the canvas to use.
Method Detail

draw

public void draw(DrawingTools drawingTools)
Description copied from interface: Drawer
Ask this drawer to draw with the given drawing tools.

Specified by:
draw in interface Drawer
Parameters:
drawingTools - the givens drawing tools.

getSpriteDrawer

public TextureDrawer getSpriteDrawer()
Returns the anchor sprite drawer.

Returns:
the anchor sprite drawer.

getTextDrawer

public TextureDrawer getTextDrawer(int textSpriteIndex)
Returns the sprite drawer associated to a particular text sprite.

Parameters:
textSpriteIndex - the sprite index.
Returns:
the text sprite drawer.

toggleAnchorDisplay

public void toggleAnchorDisplay()
Toggles display of the anchors.


switchRotationDirection

public void switchRotationDirection()
Switches the rotation direction.


toggleMessageDisplay

public void toggleMessageDisplay()
Toggles display of the help message.