Difference between revisions of "Application:setScaleMode"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2012.2.2<br/>
 
'''Available since:''' Gideros 2012.2.2<br/>
 +
'''Class:''' [[Application]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Sets the automatic scale mode of the application.
Sets the automatic scale mode of the application. Accepted values are:<br />
+
<syntaxhighlight lang="lua">
<br />
+
application:setScaleMode(scaleMode)
&lt;ul&gt;<br />
+
</syntaxhighlight>
&lt;li&gt;Application.NO_SCALE = &quot;noScale&quot;&lt;/li&gt;<br />
+
 
&lt;li&gt;Application.CENTER = &quot;center&quot;&lt;/li&gt;<br />
+
 
&lt;li&gt;Application.PIXEL_PERFECT = &quot;pixelPerfect&quot;&lt;/li&gt;<br />
+
Accepted values for '''scaleMode''' are:
&lt;li&gt;Application.LETTERBOX = &quot;letterbox&quot;&lt;/li&gt;<br />
+
* Application.NO_SCALE
&lt;li&gt;Application.CROP = &quot;crop&quot;&lt;/li&gt;<br />
+
* Application.CENTER
&lt;li&gt;Application.STRETCH = &quot;stretch&quot;&lt;/li&gt;<br />
+
* Application.PIXEL_PERFECT
&lt;li&gt;Application.FIT_WIDTH = &quot;fitWidth&quot;&lt;/li&gt;<br />
+
* Application.LETTERBOX
&lt;li&gt;Application.FIT_HEIGHT = &quot;fitHeight&quot;&lt;/li&gt;<br />
+
* Application.CROP
&lt;/ul&gt;<br />
+
* Application.STRETCH
<br />
+
* Application.FIT_WIDTH
<source lang="lua">
+
* Application.FIT_HEIGHT
Application:setScaleMode(scaleMode)
+
 
</source>
 
 
=== Parameters ===
 
=== Parameters ===
'''scaleMode''': (string) <br/>
+
'''scaleMode''': (string) the scale mode to apply<br/>
 +
 
 +
{{Application}}

Latest revision as of 17:10, 12 July 2023

Available since: Gideros 2012.2.2
Class: Application

Description

Sets the automatic scale mode of the application.

application:setScaleMode(scaleMode)


Accepted values for scaleMode are:

  • Application.NO_SCALE
  • Application.CENTER
  • Application.PIXEL_PERFECT
  • Application.LETTERBOX
  • Application.CROP
  • Application.STRETCH
  • Application.FIT_WIDTH
  • Application.FIT_HEIGHT

Parameters

scaleMode: (string) the scale mode to apply