This site requires JavaScript, please enable it in your browser!
Greenfoot back
ironphoenix20
ironphoenix20 wrote ...

2015/12/31

Scaling an Image

ironphoenix20 ironphoenix20

2015/12/31

#
How do I scale an image to the size of the image of another object in the world? The getWidth() and get Height() methods don't work.
davemib123 davemib123

2015/12/31

#
i usually scale it manually:
// declare image
private static final GreenfootImage idle = new GreenfootImage("mario-idle.gif");
then in the constructor:
idle.scale(29,39);
You need to login to post a reply.