Primitives

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

Object containing the default primitives.

By convention, all components are functions in the form def primitive(area, color, params...): Unit.

Attributes

Companion
trait
Graph
Supertypes
trait Primitives
class Object
trait Matchable
class Any
Self type
Primitives.type

Members list

Value members

Inherited 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

Inherited from:
Primitives
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

Inherited from:
Primitives
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

Inherited from:
Primitives
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

Inherited from:
Primitives
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

Inherited from:
Primitives