Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ColoredTexture

[14:7] extends: Texture

Wraps FXGL's ColoredTexture (com.almasb.fxgl.texture.ColoredTexture), a Texture subclass filled with a single solid color. Useful for placeholders, HUD bars, swatches, and quick test sprites.

Methods

  • ColoredTexture (int Width = 1, int Height = 1, ColorObj = null)

    Creates a solid-color texture of the given size.

    • @p Width is the pixel width.
    • @p Height is the pixel height.
    • @p ColorObj is a Color wrapper.
  • adopt (object Ajo)

    Wraps an existing ColoredTexture AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a ColoredTexture.
    • @r A new wrapper.