de.fhpotsdam.unfolding.ui
Class CompassUI

java.lang.Object
  extended by de.fhpotsdam.unfolding.ui.CompassUI

public class CompassUI
extends java.lang.Object

A simple compass which shows the cardinal directions of the map.


Constructor Summary
CompassUI(processing.core.PApplet p, UnfoldingMap map)
          Create default CompassUI at default position.
CompassUI(processing.core.PApplet p, UnfoldingMap map, processing.core.PImage img, float x, float y)
          Create CompassUI.
 
Method Summary
 void draw()
          Draw the compass.
 float getScale()
           
 ScreenPosition getScreenPosition()
           
 void setImage(processing.core.PImage img)
           
 void setScale(float scale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassUI

public CompassUI(processing.core.PApplet p,
                 UnfoldingMap map,
                 processing.core.PImage img,
                 float x,
                 float y)
Create CompassUI.

Parameters:
p - The main PApplet.
map - The map to show compass for.
img - The image for the compass to show.
x - x position on the screen.
y - y position on the screen.

CompassUI

public CompassUI(processing.core.PApplet p,
                 UnfoldingMap map)
Create default CompassUI at default position.

Parameters:
p - The main PApplet.
map - The map to show compass for.
Method Detail

draw

public void draw()
Draw the compass.


getScreenPosition

public ScreenPosition getScreenPosition()

setImage

public void setImage(processing.core.PImage img)

getScale

public float getScale()

setScale

public void setScale(float scale)