Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - txt

Pages: [1]
1
Graphics / Re: My sprite is cutted
« on: March 08, 2022, 05:18:57 pm »
Thanks a lot, i just had to remove texture.update line, i m french, english is very hard for me...
And thanks for others advices

2
Graphics / My sprite is cutted
« on: March 08, 2022, 11:15:57 am »
Hi,

here is my code :

void corps::init(RenderWindow& w)
{
        texture.loadFromFile("image.png");
        texture.update(w);
        sprite.setTexture(texture);
        sprite.scale(Vector2f(0.5f, 0.5f));
}

void corps::afficher(RenderWindow& w)
{
        w.draw(cercle);
        w.draw(sprite);
        //supprimer le cerlce et mettre une image
}

My image is square logo, when i display it is cutted aat the top, it display all the image wide put only like 1/5 of the height image. I tried to change texture size but when i use IntRect... it give me an
error abort has been called

I just don't understand why is my image not displaying entirely and why resizing it give me error...

Pages: [1]
anything