Slick Forums

Discuss the Slick 2D Library
It is currently Thu Oct 30, 2014 3:51 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jun 05, 2007 2:39 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
Two problems which seem to be linked.

1. Create an empty round rectangle and set it up to a certain size. Set width/height first. Calling getCenter will return null. This will break rendering.
Code:
RoundedRectangle rect = new RoundedRectangle(0f,0f,0f,0f,25f);
rect.setWidth(20);
rect.setHeight(20);
rect.setX(200);
rect.setY(200);
...
rect.getCenterX() <-- NPE


2. Create a round rectangle, set its x/y positions and do a contains check. An ArrayIndexOutOfBoundsException will be thrown.
Code:
RoundedRectangle rect = new RoundedRectangle(25f,25f,25f,25f,25f);
rect.setX(200);
rect.setY(200);
...
rect.contains(25,25);


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 05, 2007 3:34 am 
Offline
Regular

Joined: Wed Feb 07, 2007 4:04 am
Posts: 107
I made some bug fixes and this works now for me. Can you try again?

REF: http://slick.javaunlimited.net/viewtopic.php?t=472


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 10, 2007 12:37 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482
I'm getting problems with build 167 using Rectangle. Calling rect.setX(x1) throws a NPE.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 12, 2007 9:01 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
This works fine with current SVN.

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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