Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Sprite->setScale() problem
Print
Pages: [
1
]
Author
Topic: Sprite->setScale() problem (Read 1106 times)
0 Members and 1 Guest are viewing this topic.
jeres
Newbie
Posts: 2
Sprite->setScale() problem
«
on:
February 19, 2013, 04:08:14 pm »
Hi!
I wanted to keep sprite fullscreen by manipulating its scale. Well, it was working only on original window size. If window size is lower than original window size, then sprite size is lower than window size. If window size is greater than original, then sprite is greater than window. It looks like this
http://oi45.tinypic.com/2ck3n4.jpg
- window was 800x600 and I decreased its size.
Here's my code:
http://pastebin.com/hPPwSp1w
, and here's image I want to rescale
http://oi50.tinypic.com/ketd04.jpg
.
I'm using newest SFML, right from repo.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Sprite->setScale() problem
«
Reply #1 on:
February 19, 2013, 04:20:18 pm »
Don't scale the sprite, what you want is the default behaviour. Everything is stretched when the window is resized because the view (sf::View) doesn't change.
Logged
Laurent Gomila - SFML developer
jeres
Newbie
Posts: 2
Re: Sprite->setScale() problem
«
Reply #2 on:
February 19, 2013, 04:47:06 pm »
I see. Thanks.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Sprite->setScale() problem