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

Author Topic: small part of an image  (Read 1332 times)

0 Members and 1 Guest are viewing this topic.

ERROR

  • Newbie
  • *
  • Posts: 7
    • View Profile
small part of an image
« on: April 21, 2013, 01:40:20 pm »
Hey,

I am trying to make a button and the letters should be taken from a big image. I already have the image with the whole alphabet in it. My problem is that I don't know how to make a small sprite out of the big one.

Hope somebody can help me with that problem.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: small part of an image
« Reply #1 on: April 21, 2013, 01:49:22 pm »
Please refer to the documentations and tutorials and this problem can easily be solved.
See this for what you need.
Notice the setTextureRect.
« Last Edit: April 21, 2013, 01:52:37 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

ERROR

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: small part of an image
« Reply #2 on: April 21, 2013, 02:12:18 pm »
Thanks ;).

I knew it would be really easy, but I just didn't know which function I had to use.


Thanks again.

 

anything