Package net.bytten.metazelda

Examples of net.bytten.metazelda.Bounds


        }
       
    }
   
    protected double getScale(Dimension dim, IDungeon dungeon) {
        Bounds bounds = dungeon.getExtentBounds();
        return Math.min(((double)dim.width) / bounds.width(),
                ((double)dim.height) / bounds.height());
    }
View Full Code Here


    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);
 
View Full Code Here

TOP

Related Classes of net.bytten.metazelda.Bounds

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.