Table of Contents

Sprite:getWidth

Available since version: Gideros 2011.6

Description:

Returns the width of the sprite, in pixels. The width is calculated based on the
bounds of the content of the sprite.
If the parameter "true" is passed, the original width is returned without transformations.

Syntax:

Sprite:getWidth([withoutTransform])

Parameters:

  • withoutTransform: (boolean) If true, return the width of the Sprite without transformations else return the transformed width

Return value:

  • any: Width of the sprite.
  • any: Width of the sprite.