reference monoe.image

Lua API Reference

Represents an image that can be loaded, cleared, and managed in the engine.

Properties

NameTypeDescription
uidintegerUnique ID for the engine-side image object

monoe.image.new

Creates a new `monoe.image` object. If a `path` is provided, the image will be loaded from that file.

Parameters

NameTypeDescription
pathstring|integer|nilFile path, existing UID, or nil for a new empty image

Returns


monoe.image:path

Returns the file path of the image.

Returns


monoe.image:load

Loads an image from a file path.

Parameters

NameTypeDescription
pathstringFile path to load

monoe.image:clear

Clears the image content, resetting it to empty.


monoe.image:replace

replaces the color a by the color b.

Parameters

NameTypeDescription
astring|monoe.color
bstring|monoe.color

monoe.image:overlay

Adds an overlay

Parameters

NameTypeDescription
imgmonoe.image|integer|string
xinteger
yinteger

monoe.image:free

Frees the engine-side resources associated with this image.