Difference between revisions of "Sprite:getWidth"

From GiderosMobile
(a little bit of update)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Returns the width of the sprite in pixels. The width is calculated based on the bounds of the content of the sprite.
Returns the width of the sprite, in pixels. The width is calculated based on the<br />
 
bounds of the content of the sprite.<br />
 
<br />
 
If the parameter "true" is passed, the original width is returned without transformations.</translate>
 
 
<source lang="lua">
 
<source lang="lua">
(any), (any) = Sprite:getWidth(withoutTransform)
+
(number) = Sprite:getWidth(withoutTransform)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''withoutTransform''': (boolean) <translate>If true, return the width of the Sprite without transformations else return the transformed width</translate> '''optional'''<br/>
+
 
=== <translate>Return values</translate> ===
+
If the parameter '''withoutTransform''' is set to true, the original width is returned without transformations.
'''<translate>Returns</translate>''' (any) <translate>Width of the sprite.</translate><br/>
+
 
'''<translate>Returns</translate>''' (any) <translate>Width of the sprite.</translate><br/>
+
=== Parameters ===
 +
'''withoutTransform''': (boolean) if true, returns the width of the Sprite without transformations else returns the transformed width '''optional'''<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (number) the width of the sprite<br/>
  
 
{{Sprite}}
 
{{Sprite}}

Revision as of 00:35, 4 February 2021

Available since: Gideros 2011.6
Class: Sprite

Description

Returns the width of the sprite in pixels. The width is calculated based on the bounds of the content of the sprite.

(number) = Sprite:getWidth(withoutTransform)


If the parameter withoutTransform is set to true, the original width is returned without transformations.

Parameters

withoutTransform: (boolean) if true, returns the width of the Sprite without transformations else returns the transformed width optional

Return values

Returns (number) the width of the sprite