Difference between revisions of "Sprite:getHeight"

From GiderosMobile
(mostly formatting :-) and removed language)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns the height of the sprite in pixels. The height is calculated based on the bounds of the content of the sprite.
 
Returns the height of the sprite in pixels. The height is calculated based on the bounds of the content of the sprite.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number) = Sprite:getHeight(withoutTransform)
 
(number) = Sprite:getHeight(withoutTransform)
 
</source>
 
</source>

Revision as of 14:31, 13 July 2023

Available since: Gideros 2011.6
Class: Sprite

Description

Returns the height of the sprite in pixels. The height is calculated based on the bounds of the content of the sprite. <syntaxhighlight lang="lua"> (number) = Sprite:getHeight(withoutTransform) </source>


If withoutTransform is set to true, the original height is returned without accounting for transformations.

Parameters

withoutTransform: (boolean) if true, returns the height without transformation, else returns the transformed height optional

Return values

Returns (number) the height of the sprite