Difference between revisions of "Sprite:getSize"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2021.10<br/> '''Class:''' Sprite<br/> === Description === Returns the width and height of the sprite in pixels. The width and hei...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns the width and height of the sprite in pixels. The width and height are calculated based on the bounds of the content of the sprite.
 
Returns the width and height of the sprite in pixels. The width and height are calculated based on the bounds of the content of the sprite.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number), (number) = Sprite:getSize()
 
(number), (number) = Sprite:getSize()
 
</source>
 
</source>

Revision as of 15:31, 13 July 2023

Available since: Gideros 2021.10
Class: Sprite

Description

Returns the width and height of the sprite in pixels. The width and height are calculated based on the bounds of the content of the sprite. <syntaxhighlight lang="lua"> (number), (number) = Sprite:getSize() </source>

Return values

Returns (number) the sprite width
Returns (number) the sprite height