Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Set Size of Texture
Print
Pages: [
1
]
Author
Topic: Set Size of Texture (Read 3716 times)
0 Members and 1 Guest are viewing this topic.
Jalfor
Jr. Member
Posts: 62
Set Size of Texture
«
on:
October 03, 2012, 12:31:35 pm »
Hi,
Is there any way of creating or resizing a texture to a certain size. I know there is the scale function though that multiplies the size by the given amount instead of setting it to something.
Thanks
Logged
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.
Laurent
Administrator
Hero Member
Posts: 32498
Re: Set Size of Texture
«
Reply #1 on:
October 03, 2012, 12:34:57 pm »
Do you want to resize a texture or a sprite (this is totally different)?
Logged
Laurent Gomila - SFML developer
Jalfor
Jr. Member
Posts: 62
Re: Set Size of Texture
«
Reply #2 on:
October 03, 2012, 02:37:48 pm »
Well, I'm not entirely sure. Whatever will simply scale up or down the size of the sprite that is drawn on the screen.
Logged
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.
Laurent
Administrator
Hero Member
Posts: 32498
Re: Set Size of Texture
«
Reply #3 on:
October 03, 2012, 02:45:22 pm »
Sprite::setScale or Sprite::scale. If you want to give a size instead of a factor, then it's straight-forward to do the conversion (scale = new_size / initial_size).
Logged
Laurent Gomila - SFML developer
Jalfor
Jr. Member
Posts: 62
Re: Set Size of Texture
«
Reply #4 on:
October 04, 2012, 06:56:32 am »
Alright, thanks
Logged
If a picture tells 1000 words, then a YouTube video clearly tells 1000000 making a YouTube video obviously a larger work than the Lord Of The Rings, or some other massive novel. Thus are the laws of YouTube videos.
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Set Size of Texture