Companion

object Companion

Functions

Link copied to clipboard
fun fromCellular(width: Int, height: Int, cellSize: Int): Image

Creates an image filled with a cellular noise pattern.

Link copied to clipboard
fun fromChecked(width: Int, height: Int, checksX: Int, checksY: Int, col1: Color, col2: Color): Image

Creates a checked pattern image with two colors.

Link copied to clipboard
fun fromColor(width: Int, height: Int, color: Color): Image

Creates an image filled with the specified color.

Link copied to clipboard
fun fromLinearGradient(width: Int, height: Int, angle: Int, start: Color, end: Color): Image

Creates an image with a linear gradient between two colors.

Link copied to clipboard
fun fromPerlinNoise(width: Int, height: Int, offsetX: Int = 0, offsetY: Int = 0, scale: Float = 1.0f): Image

Creates an image filled with Perlin noise.

Link copied to clipboard
fun fromRadialGradient(width: Int, height: Int, density: Float, inner: Color, outer: Color): Image

Creates an image with a radial gradient between two colors.

Link copied to clipboard
fun fromSquareGradient(width: Int, height: Int, density: Float, inner: Color, outer: Color): Image

Creates an image with a square gradient between two colors.

Link copied to clipboard
fun fromText(width: Int, height: Int, text: String): Image

Creates a grayscale image from the provided text string.

Link copied to clipboard
fun fromWhiteNoise(width: Int, height: Int, factor: Float = 0.5f): Image

Creates an image filled with white noise.

Link copied to clipboard
fun load(path: String): Image

Loads an image from the specified file path.

fun load(file: File): Image

Loads an image from the specified file.

Link copied to clipboard

Gets an Image from a Texture2D.

Link copied to clipboard

Takes a screenshot of the current screen.