ImgSrc

open class ImgSrc : UIResource

A ImgSrc class used to define an image for the UIKit.widgets.Image UI element

Each image is defined by an image slot which you can upload PNG/JPG images

All slots except Slot.s0 are persistent, meaning uploaded images for those slots are kept saved on the glasses between reboots

NOTE: The behaviour of adding 2 (or more) different UIKit.widgets.Image with the same slot to the same screen is undefined

See also

Inheritors

Constructors

Link copied to clipboard
constructor(nameWithExtension: String, slot: ImgSrc.Slot)

Constrictor receiving image name and a slot

constructor(data: ByteArray, iType: ImageType, slot: ImgSrc.Slot, width: Int, height: Int)

Constrictor receiving image binary data

Types

Link copied to clipboard

Image slots to be uploaded and used

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getMaxSizeBytes(): Int

Returns the maximum size allowed for the UIResource in bytes

Link copied to clipboard
open override fun getResourceName(): String

Returns the resource name that was set or empty string if not set

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun loadResource(): Boolean

Pre-Load the resource binary data from the application resources

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun wasConfigured(): Boolean

Return true if the resource information is valid and sufficient for upload

Properties

Link copied to clipboard

The height of the image pixels, available only after calling loadResource

Link copied to clipboard

The width of the image pixels, available only after calling loadResource

Link copied to clipboard