Slick Forums

Discuss the Slick 2D Library
It is currently Sun Jan 26, 2020 5:04 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Oct 25, 2011 12:24 am 
User avatar

Joined: Fri Oct 07, 2011 11:05 pm
Posts: 97
Location: France, Nantes
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:
public void render(GameContainer container, Graphics g) throws SlickException {
      g.translate(0, 300);

   public void init(GameContainer container) throws SlickException {
      reliefGen= new ReliefGenerator(800, 0.56f);
      path=(Path) reliefGen.generate(1)[0];
      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?

"The Keeper is aware. The Keeper understands. The Keeper has seen the enemy."

PostPosted: Sat May 12, 2012 5:08 am 
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
Added checkPoints() to getWidth/getHeight. Let me know if that fixes things.

Yes, Slick is still being developed -- some new developers are in place to keep it going. :)

EDIT: Bah, on a different computer than usual and running into push errors... Will update tomorrow.
EDIT2: Pushed.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group