DrawCommand

interface DrawCommand<P : Position2D<out P>?> : BiConsumer<GraphicsContext, Wormhole2D<P>>

Functional interface that models a command for JavaFX thread to draw something on a javafx.scene.canvas.Canvas.

Parameters

<P>

The position type

Functions

Link copied to clipboard
abstract fun accept(graphic: GraphicsContext, wormhole: Wormhole2D<P>)
The method consumes a graphic and a wormhole to draw something.
Link copied to clipboard
open fun andThen(after: BiConsumer<out Any, out Any>): BiConsumer<T, U>
Link copied to clipboard
open fun wrap(booleanSupplier: Supplier<Boolean>): DrawCommand<P>
Wrapper method that wraps this DrawCommand into another that checks if should execute or not the accept method.