SFML community forums
Help => Graphics => Topic started by: man'O'war 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
-
No, but you can easily track the factor yourself.
-
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.
-
Indeed, sounds clear now.
Thank you for your help.