Difference between revisions of "Application:getDeviceSafeArea"

From GiderosMobile
(prefixindex)
Line 1: Line 1:
__NOTOC__
+
'''Available since:''' Gideros 2017.11.3<br/>
<languages />
+
'''Class:''' [[Application|Application]]<br/>
'''<translate>Available since</translate>:''' Gideros 2017.11.3<br/>
+
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/>
+
=== Description ===
=== <translate>Description</translate> ===
+
Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, either in physical coordinates or in logical coordinates.
<translate><br />
+
<br />
Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use,  
+
 
either in physical coordinates or in logical coordinates.<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
 
(number), (number), (number), (number) = application:getDeviceSafeArea(logical)
 
(number), (number), (number), (number) = application:getDeviceSafeArea(logical)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''logical''': (boolean) <translate>Returns the margin in logical scale if set to true.</translate> '''optional'''<br/>
+
=== Parameters ===
=== <translate>Return values</translate> ===
+
'''logical''': (boolean) Returns the margin in logical scale if set to true. '''optional'''
'''<translate>Returns</translate>''' (number) <translate>Minimum x</translate><br/>
+
<br/>
'''<translate>Returns</translate>''' (number) <translate>Minimum y</translate><br/>
+
 
'''<translate>Returns</translate>''' (number) <translate>Maximum x</translate><br/>
+
=== Return values ===
'''<translate>Returns</translate>''' (number) <translate>Maximum y</translate><br/>
+
'''Returns''' (number) Minimum x<br/>
 +
'''Returns''' (number) Minimum y<br/>
 +
'''Returns''' (number) Maximum x<br/>
 +
'''Returns''' (number) Maximum y<br/>
 +
 
 +
----
 +
{{Special:PrefixIndex/Application}}
 +
<br/>
 +
 
 +
{{Special:PrefixIndex/Event.APPLICATION}}

Revision as of 12:57, 2 December 2019

Available since: Gideros 2017.11.3
Class: Application

Description

Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, either in physical coordinates or in logical coordinates.

(number), (number), (number), (number) = application:getDeviceSafeArea(logical)

Parameters

logical: (boolean) Returns the margin in logical scale if set to true. optional

Return values

Returns (number) Minimum x
Returns (number) Minimum y
Returns (number) Maximum x
Returns (number) Maximum y