Canvas

open class Canvas(address: Long) : GemNativeObj

Canvas is a part of a screen object custom rendered by the user

Inheritors

Constructors

Link copied to clipboard
constructor(address: Long)

Types

Link copied to clipboard
object Companion

Canvas companion

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

The parent screen

Link copied to clipboard

Get view viewport in parent screen coordinates

Link copied to clipboard

Get screen viewport in parent screen ratio

Functions

Link copied to clipboard
external fun captureAsImage(rect: Rect): Image?
external fun captureAsImage(buffer: DataBuffer, rect: Rect): Int
external fun captureAsImage(filePath: String, rect: Rect): Int

Make a screen region capture of the current map in JPEG format. No cursor/on-screen info is included.

Link copied to clipboard
external fun detach()

Detach canvas from rendering process If OpenGL context is not available anymore during canvas destruction, this method should be called when the context is still valid in order to do all needed cleanups

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard

Handles a keyboard event

Link copied to clipboard
external fun isMapView(): Boolean

Check if canvas is a MapView object

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
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
external fun resize(screenRatio: RectF)

Resize the view