Difference between revisions of "Application:setScaleMode"

From GiderosMobile
(6 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 ===
<translate><br />
+
Sets the automatic scale mode of the application.
Sets the automatic scale mode of the application. Accepted values are:<br />
 
<br />
 
&lt;ul&gt;<br />
 
&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 />
 
&lt;li&gt;Application.LETTERBOX = &quot;letterbox&quot;&lt;/li&gt;<br />
 
&lt;li&gt;Application.CROP = &quot;crop&quot;&lt;/li&gt;<br />
 
&lt;li&gt;Application.STRETCH = &quot;stretch&quot;&lt;/li&gt;<br />
 
&lt;li&gt;Application.FIT_WIDTH = &quot;fitWidth&quot;&lt;/li&gt;<br />
 
&lt;li&gt;Application.FIT_HEIGHT = &quot;fitHeight&quot;&lt;/li&gt;<br />
 
&lt;/ul&gt;<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
Application:setScaleMode(scaleMode)
+
application:setScaleMode(scaleMode)
 
</source>
 
</source>
 +
 +
 +
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 ===
 
=== Parameters ===
'''scaleMode''': (string) <translate></translate> <br/>
+
'''scaleMode''': (string) the scale mode to apply<br/>
 +
 
 +
{{Application}}

Revision as of 19:46, 5 December 2020

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