i want to make the picture smaller, it is in the world it is not an actor
Thank you


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import greenfoot.*; public class LevelScreen extends World { public LevelOne () { GreenfootImage image = getImage (); image.scale (image.getWidth () - 300 , image.getHeight ()- 300 ); setImage (image); } public LevelScreen() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super ( 600 , 400 , 1 ); } } |
1 2 3 | GreenfootImage bg = new GreenfootImage( "filename.jpg" ); // adjust filename as needed bg.scale(getWidth(), getHeight()); setBackground(bg); |