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

2012/12/4

Scaling an image

camsterb camsterb

2012/12/4

#
Hi. I'm trying to scale an actor's image. I used to be able to do this, but it no longer does anything. Code always compiles, but nothing happens to the image. This is the actor's constructor: public class Cell extends Actor { public void Cell() { GreenfootImage image = getImage(); image.scale(30, 30); setImage(image); } The image is added in the world by: public class Life extends World { public Life() { super(150, 150, 2); addObject(new Cell(), 50, 50); And nothing. I would like to understand this problem better.
tylers tylers

2012/12/4

#
change the
 public void Cell()
    {
TO
 public Cell()
    {
camsterb camsterb

2012/12/4

#
Excellently done. I won't forget this. My hero.
tylers tylers

2012/12/4

#
Thanks :D
You need to login to post a reply.