I have this image(https://i.stack.imgur.com/ucafS.jpg) and am trying to make it take up the whole screen. Heres my code
static Texture img;
static Sprite sprite;
public static void load(){
img = new Texture(Gdx.files.internal("menu/stick.PNG"));
//libgdx scales it , it wont mess up
img.setFilter(TextureFilter.Linear, TextureFilter.Linear);
sprite = new Sprite(img);
sprite.flip(false, true);
sprite.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
}
The output still doesnt show the stick figure taking up the whole screen. Output:https://i.stack.imgur.com/kGTfV.jpg
Am i going about this the wrong way? I thought by setting the sprite(the object rendering the image to the screen) to the size of the screen, the image should take up the whole screen as well.