Image

APIRendererImage

Image {
    source: 'http://lorempixel.com/200/140/'
    onLoad: function(error){
        if (error){
            console.error("Can't load this image");
        } else {
            console.log("Image has been loaded");
        }
    }
}

Source

Image.New(options)

Parameters:
  • options — Objectoptional
Returns:
Image

Source

Image::constructor()

Extends:
Item
Returns:
Image

Source

Image.pixelRatio

Type:
Float
Default value:
1

Image.onPixelRatioChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Image::width

Type:
Float
Default value:
-1

Source

Image::height

Type:
Float
Default value:
-1

Source

Image::source

Type:
String

The image source URL or data URI.

Image::onSourceChange(oldValue)

Parameters:
  • oldValue — String
Type:
Signal

Source

Image::resolution

Type:
Float
Default value:
1
Read Only

Source

Image::sourceWidth

Type:
Float
Default value:
0
Read Only

Image::onSourceWidthChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Image::sourceHeight

Type:
Float
Default value:
0
Read Only

Image::onSourceHeightChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Image::loaded

Type:
Boolean
Default value:
false
Read Only

Source

Image::onLoadedChange(oldValue)

Parameters:
  • oldValue — Boolean
Type:
Signal

Source

Image::onLoad()

Type:
Signal

Source

Image::onError(error)

Parameters:
  • error — Error
Type:
Signal

Source