Image

open class Image : GemNativeObj

Image object On creation, the icon object is invalid ( uid returns SdkImages.InvalidId).

Inheritors

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)
constructor(address: Long, isRef: Boolean)

Types

Link copied to clipboard
object Companion

Image's companion object.

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard

Icon aspect ratio as pair of width_aspect( 0, 1.f ), height_aspect( 0, 1.f )

Link copied to clipboard
val size: Size?

Preferred size of the Image. This can be used to preserve the aspect ratio when requesting different sizes.

Link copied to clipboard
val type: Int

Type of the image. See EImageFileFormat

Link copied to clipboard
val uid: Long

Unique ID of the instance

Functions

Link copied to clipboard
open fun asBitmap(width: Int, height: Int): Bitmap?

Converts a Image to Bitmap.

Link copied to clipboard
open external fun assign(value: Image)

Assign from existing Image

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
open external fun isEqualTo(value: Image): Boolean

Tests for equality

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
open external fun isValid(): Boolean

Checks if the Image is valid or not.

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
open external fun render(bitmap: IBitmap): Int

Render the Image into the provided IBitmap.