Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
[SOLVED] Zoom Factor/Scale for the sf::View
Print
Pages: [
1
]
Author
Topic: [SOLVED] Zoom Factor/Scale for the sf::View (Read 2776 times)
0 Members and 1 Guest are viewing this topic.
man'O'war
Newbie
Posts: 46
What needs to be done is done by those capable.
[SOLVED] Zoom Factor/Scale for the sf::View
«
on:
March 22, 2014, 11:13:03 am »
Hello.
I'm wondering if it is possible to get the current zoom factor of a sf::View.
because i'm using a mouse-drag system and i need the zoom Factor/scale to fit the movement properly.
Coriadly
Dr.Crow
«
Last Edit: March 22, 2014, 02:20:50 pm by Dr.Crow
»
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11030
Re: Zoom Factor/Scale for the sf::View
«
Reply #1 on:
March 22, 2014, 11:16:02 am »
No, but you can easily track the factor yourself.
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: Zoom Factor/Scale for the sf::View
«
Reply #2 on:
March 22, 2014, 12:22:30 pm »
Unlike the scale of
sf::Transformable
objects,
sf::View
's zoom factor is not a separate attribute. It merely scales the view rectangle, so
zoom(factors)
is just a shortcut for
setSize(getSize() * factors)
, with
*
being component-wise multiplication.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
man'O'war
Newbie
Posts: 46
What needs to be done is done by those capable.
Re: Zoom Factor/Scale for the sf::View
«
Reply #3 on:
March 22, 2014, 02:20:24 pm »
Indeed, sounds clear now.
Thank you for your help.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
[SOLVED] Zoom Factor/Scale for the sf::View