Primitives

eu.joaocosta.interim.api.Primitives
See thePrimitives companion object
trait Primitives

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Primitives.type
object InterIm.type

Members list

Value members

Concrete methods

final def custom[T](area: Rect, color: Color, data: T)(using uiContext: UiContext): Unit

Advanced operation to add a custom primitive to the list of render operations.

Advanced operation to add a custom primitive to the list of render operations.

Supports an arbitrary data value. It's up to the backend to interpret it as it sees fit. If the backend does not know how to interpret it, it can just render a colored rect.

Value parameters

data

custom value to be interpreted by the backend.

Attributes

def onBottom[T](body: UiContext ?=> T)(using uiContext: UiContext): T

Applies the operations in a code block at the previous z-index.

Applies the operations in a code block at the previous z-index.

Attributes

def onTop[T](body: UiContext ?=> T)(using uiContext: UiContext): T

Applies the operations in a code block at the next z-index.

Applies the operations in a code block at the next z-index.

Attributes

final def rectangle(area: Rect, color: Color)(using uiContext: UiContext): Unit

Draws a rectangle filling a the specified area with a color.

Draws a rectangle filling a the specified area with a color.

Attributes

final def text(area: Rect, color: Color, text: String, font: Font, horizontalAlignment: HorizontalAlignment, verticalAlignment: VerticalAlignment)(using uiContext: UiContext): Unit

Draws a block of text in the specified area with a color.

Draws a block of text in the specified area with a color.

Value parameters

font

font definition

horizontalAlignment

how the text should be aligned horizontally

text

text to write

verticalAlignment

how the text should be aligned vertically

Attributes