Hey guys, I found a new bug!
when trying to draw a rectangle with the width and the height of a path, it doesn't work until you actually get minX or maxX or minY or maxY!!!
check this out:
Code:
public void render(GameContainer container, Graphics g) throws SlickException {
g.translate(0, 300);
g.setColor(Color.white);
g.draw(path);
g.setColor(Color.green);
g.draw(boundaries);
}
@Override
public void init(GameContainer container) throws SlickException {
reliefGen= new ReliefGenerator(800, 0.56f);
path=(Path) reliefGen.generate(1)[0];
System.out.print(path.getMinY());
boundaries=new Rectangle(path.getX(),path.getY(),path.getWidth(),path.getHeight());
}
This is working.
But, if I comment the System.out.print, not working anymore!!!
Strange eh?
EDIT: I think I found where it comes from:
there's no checkPoints() method in the getHeight(), getWidth() of the Shape class: could it be the reason why?
By the way, is Slick still developped?