Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Images

[18:14] static extends: object

Static helper around FXGL's Kotlin-only top-level functions in com.almasb.fxgl.texture.ImagesKt. The Kotlin source declares these as package-level (fun toImage(node: Node): Image); the compiler emits them as static methods on an ImagesKt class that has no Aussom wrapper of its own. Use: img = Images.toImage(myNodeWrapper); tex = new Texture(img);

Methods

  • toImage (Node)

    Snapshots a JavaFX Node into an Image. The returned AJO wraps javafx.scene.image.Image and can be handed to new Texture(...) or any setter that takes an Image.

    • @p Node is an Aussom wrapper whose .obj holds a JavaFX Node, or a raw AussomJavaObject around a Node.
    • @r An AussomJavaObject around javafx.scene.image.Image.