Content:
- Examples
- Properties
- Methods

Adds an image into your layout.

img = ui.addImage( parent, file, options='Image', width?, height? ) → ui object: Image

Please note that a canvas image cannot switch to Button or Avatar in setOptions method.

Here are the available methods of the Image Component.

Examples

Example - Basic Image click to expand contents 

Example - Avatar click to expand contents 

Example - Button click to expand contents 

Example - Drawings click to expand contents 

Example - Text and Shapes click to expand contents 

Example - Analog Clock click to expand contents 

Example - Scratch Pad click to expand contents 

Properties

The following properties are available on the Image object:

absHeightNumber
absLeftNumber
absTopNumber
absWidthNumber
backColorString
backImageString
borderNumber
borderColorString
borderStyleString
cornerRadiusNumber
disabledBoolean
elObject
elStyleString
errorIconString
fillString
fillColorString
fontFileString
heightNumber
imageString
isVisibleBoolean
leftNumber
lineCapString
lineJoinString
lineWidthNumber
marginsList
miterLimitNumber
opacityNumber
optionsString
paddingList
parentObject
pixelDataList
positionObject
rotationNumber
strokeColorString
textColorString
textSizeNumber
textStyleString
topNumber
typeString
visibilityString
widthNumber

Methods

The following methods are available on the Image object:

clear()
getPixelColor( x, y, format ) → List
getPixelData( x, y, width, height ) → Object
getPosition( options ) → Object
gone()
hide()
measureText( text ) → Object
rotate( angle, x, y )
setScale( x, y )
show()