SFML community forums
Help => Graphics => Topic started by: ZeroAndOne on December 30, 2012, 09:09:35 am
-
I have a sprite sheet that I would like to animate by subdividing it into sub-rectangles but I am unable to, :( because the function getWidth() for the sprite sheet has been removed in SFML 2.0 and I don't know what has replaced it. ???
-
Is getSize() really difficult to find by looking at the API documentation? >:(
-
but isn't getSize() going to return the whole size of the image in Kbs or MBs? I want the number of pixels across the image and also the number of pixels on the height of the image. will getSize() be able to achieve this? If Yes. How?
-
The doc says that it returns the "size in pixels" (not in KB or MB), and the return value is a Vector2 (a pair of <x, y> values). So it returns exactly what you want: getSize().x is the width, getSize().y is the height.
-
thanks, I get it now.
-
I'll update the documentation to make this more explicit.