display.getDefault()

Type Function
Library display.*
Return value various
Revision 2017.3083
Keywords defaults, get default, color, graphics, vector objects
See also display.setDefault()

Overview

Get default display values including default colors for display objects, anchor point defaults, texture wrapping settings, etc.

Syntax

display.getDefault( key )
key (required)

String. Specifies the key to get the default value for.

Display Object Keys

These keys indicate default anchor values and anchor bounds for all display objects.

Color Keys

A color key indicates which default color value is set.

Native Keys

Texture Keys

Examples

-- Fill color default values
local defaultR, defaultG, defaultB, defaultA = display.getDefault( "fillColor" )
print( defaultR, defaultG, defaultB, defaultA )

-- Default "anchorX" value
local defaultAnchorX = display.getDefault( "anchorX" )
print( defaultAnchorX )

-- Default "anchorY" value
local defaultAnchorY = display.getDefault( "anchorY" )
print( defaultAnchorY )