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

2017/11/29

How do I scale my picture

doglover555 doglover555

2017/11/29

#
public class Puppy extends Actor
{
    /**
     * Act - do whatever the Tortilla wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public Puppy()
    {
        setImage("puppy.png");
        getImage().scale(20, 20);
    }
    
Doesn't change the size of my image. I added this before the act method.
Super_Hippo Super_Hippo

2017/11/29

#
What is the original size of the image?
doglover555 doglover555

2017/11/29

#
Super_Hippo wrote...
What is the original size of the image?
1500x1422
Super_Hippo Super_Hippo

2017/11/29

#
Do you change the image in your act method? Or in other words, if you don't start the scenario and add a Puppy with right click on the class, is the image huge or 20x20? Are you sure it is compiled? Sometimes, when the auto-compile doesn't work anymore, you have to restart Greenfoot.
You need to login to post a reply.