Difference between revisions of "Application:getDeviceSafeArea"

From GiderosMobile
(prefixindex)
m (Text replacement - "</source" to "</syntaxhighlight")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
'''Available since:''' Gideros 2017.11.3<br/>
 
'''Available since:''' Gideros 2017.11.3<br/>
'''Class:''' [[Application|Application]]<br/>
+
'''Class:''' [[Application]]<br/>
  
 
=== Description ===
 
=== 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.
 
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 />
+
<syntaxhighlight lang="lua">
 
 
<source lang="lua">
 
 
(number), (number), (number), (number) = application:getDeviceSafeArea(logical)
 
(number), (number), (number), (number) = application:getDeviceSafeArea(logical)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
'''logical''': (boolean) Returns the margin in logical scale if set to true. '''optional'''
+
'''logical''': (boolean) returns the margin in logical scale if set to true '''optional'''
<br/>
 
  
 
=== Return values ===
 
=== Return values ===
'''Returns''' (number) Minimum x<br/>
+
'''Returns''' (number) minimum x<br/>
'''Returns''' (number) Minimum y<br/>
+
'''Returns''' (number) minimum y<br/>
'''Returns''' (number) Maximum x<br/>
+
'''Returns''' (number) maximum x<br/>
'''Returns''' (number) Maximum y<br/>
+
'''Returns''' (number) maximum y<br/>
 
 
----
 
{{Special:PrefixIndex/Application}}
 
<br/>
 
  
{{Special:PrefixIndex/Event.APPLICATION}}
+
{{Application}}

Latest revision as of 18:18, 12 July 2023

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