SFML community forums
Help => General => Topic started by: delio on May 02, 2014, 03:55:22 pm
-
At first, Content's width is 50 px.
(http://upic.me/i/9l/5capture.png)
Then, I zoom in. So contents are bigger. It's width is 100px
(http://upic.me/i/e1/1capture1.png)
How can I get contents' width, when I've zoom?
I've try "view.getSize" .
but While Contents are bigger, "view.getSize.x" is lower.
delio
-
Sorry I've no idea what you're asking for...
If you want the zoom factor, then you need to track that on your own.
-
Sorry I've no idea what you're asking for...
If you want the zoom factor, then you need to track that on your own.
Sorry for bad explanation.
Ok I'll try it.
-
Taking a shot in the dark... but leading off what eXpl0it3r said. If your content is 50px wide and you zoom to a factor of 150% (1.5). Then your content will be 75 pixels wide. The formula is simple, value * scale. Just multiply whatever the original size is by the scale/zoom factor and you should be set.
-
Thanks :) , zsbzsb and eXpl0it3r