public void draw(Graphics2D g, Dimension dim, IDungeon dungeon) {
AffineTransform origXfm = g.getTransform();
// Figure out scale & translation to draw the dungeon at
synchronized (dungeon) {
Bounds bounds = dungeon.getExtentBounds();
double scale = getScale(dim, dungeon),
roomSize = getRoomSize(dim, dungeon);
// move the graph into view
g.translate(-scale * bounds.left, -scale * bounds.top);