Quick Links: Gideros Home | Download Gideros | Developer Guide
is it needed to add a getSize api for the Sprite class
  • Xman +1 -1
    Member
    in most situations, we probably get the width and height at the same time, it will be a little more easier and efficient to get both since a little calculation is needed to get these two values.
  • hgy29hgy29 +1 -1
    Maintainer
    In fact you can already:
    local x,y,w,h=sprite:getBounds(sprite)
  • Xman +1 -1
    Member
    I knew getBounds can do the same result as when I discussed whether sprite:getWidth() is needed to add the withoutTransform argument that I will probably never use.

    a get size api maybe more straightforward.

  • Xman +1 -1
    Member
    And call the localBounds directly maybe a little more efficient without to find the target sprite.
  • hgy29hgy29 +1 -1
    Maintainer
    Agreed, this would be more straightforward.
  • Xman +1 -1 (+1 / -0 )
    Member
    Added!
    Call sprite:getSize() is more straightforward than call sprite:getBounds(targetSprite) to get the transformed values.

    Likes: SinisterSoft

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with OpenID

In this Discussion

Top Posters