SFML community forums

Help => Graphics => Topic started by: Arshak on March 17, 2011, 01:28:31 pm

Title: Multiple images on one sprite
Post by: Arshak on March 17, 2011, 01:28:31 pm
Hello!

I'm trying to make a small paint program and have some problems..


How can i make so multiple images(sf::Image) will be printed on one sprite(sf::Sprite)


Code: [Select]
sf::Image Image1;
               Image1.LoadFromFile("x.png");
sf::Image Image2;
               Image2.LoadFromFile("y.png");


Sprite.SetImage(Image2);


how can i make so i will be able to choose x/y positions of the image on sprite and have both image1 and image2 there


Thanks for you help!  :D [/code]
Title: Multiple images on one sprite
Post by: Gibgezr on March 18, 2011, 03:10:08 pm
You need RenderImage, which is only available in SFML 2. A RenderImage allows you to draw on an Image.