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

Author Topic: Multiple images on one sprite  (Read 1291 times)

0 Members and 1 Guest are viewing this topic.

Arshak

  • Newbie
  • *
  • Posts: 1
    • View Profile
Multiple images on one sprite
« 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]

Gibgezr

  • Newbie
  • *
  • Posts: 33
    • View Profile
Multiple images on one sprite
« Reply #1 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.

 

anything