Screen

class Screen(address: Long) : GemNativeObj

Screen object. It supports rendering in an OpenGL context. It is possible to use the rendering in two ways:

  • Render on demand. The UI requests the screen to be rendered in the attached context.

  • Render automatically. For example when the map is scrolled or rotated the map is rendered automatically in the attached context and the UI is notified when finished. View objects require a Screen in order to be created. After creation a View will hold a strong pointer to its Screen.

Constructors

Link copied to clipboard
constructor(address: Long)

Types

Link copied to clipboard
object Companion

Screen 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

All canvases.

Link copied to clipboard

Gets OpenGL Context

Link copied to clipboard

Rendering rule. Default value if ERR_OnDemand

Link copied to clipboard

Viewport

Link copied to clipboard

All views.

Functions

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
fun handleTouchEvent(event: ETouchEvent, touchId: Int, tXy: Xy)

Handle a screen touch event with the given id, see TouchEvent for types

Link copied to clipboard
external fun hitTestFloat(xy: XyF): Canvas?

Hit test returns the map service under the given screen coordinates. With float type: coordinates are screen fraction ( 0 - 1.f )

Link copied to clipboard
external fun hitTestInt(tXy: Xy): Canvas?

Hit test returns the map service under the given screen coordinates. With int type: coordinates are screen

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
external fun needsRender()

Mark screen with pending render request

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
fun render()

This requests a redraw of the map. TRenderRule must be ERenderOnDemand

Link copied to clipboard
external fun resetContext()
Link copied to clipboard
external fun resetContextTrue()

Reset screen context. The context is lost and the screen will reset all its resources Notifies screen that the attached OpenGLContext has changed. This will trigger updates in the SDK textures, font etc.

Link copied to clipboard
external fun resize(size: Size)

Resize the screen

Link copied to clipboard
external fun scrollEvent(delta: Int, tXy: Xy)

Handles a scroll event