Hi All,
I have an issue with Sprite:getWidth().
The documentation says: "The width is calculated based on the bounds of the content of the sprite."
I have a sprite with several children.
Some of the children are text, some images.
It does not get rotated or anything.
When I use getWidth() I do not get the real width of the sprite. Instead I am getting something that appears to be random number.
I suspect this is because some of the children of the sprite are text sprites...
Has anyone experienced the same problem?
Any thoughts?
Thanks
Vlad
Comments
try with Sprite:getBounds()?
I will try getBounds and post here if it does not work for me.
could you provide simple example so I could confirm that? And we could report it as bug
I will try to create a simple project with test case and post it here.
"Sprite:getBounds() function returns wrong values when there are more than 2 level of hierarchies and rotation".
I have to install it and check. I have more than 2 levels of hierarchy...