Package-level declarations

Types

Link copied to clipboard
object Audio

Represents the Audio controller by raylib, which is used to manage audio devices and settings.

Link copied to clipboard
class AudioStream(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.AudioStream>) : Playable

Represents an audio stream in raylib, which is a dynamic audio data structure that can be used for streaming audio data. An audio stream should be unloaded when it is no longer needed.

Link copied to clipboard
data class BoundingBox3D(val min: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, val max: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>)

A 3D rectangular bounding box.

Link copied to clipboard
class Camera2D(raw: ERROR CLASS: Symbol not found for raylib.internal.Camera2D)

Represents a 2D Camera in raylib.

Link copied to clipboard
class Camera3D(raw: ERROR CLASS: Symbol not found for raylib.internal.Camera3D)

Represents a 3D Camera representing what the user is seeing.

Link copied to clipboard
value class CameraMode3D

Represents the mode of the 3D camera.

Link copied to clipboard
value class CameraProjection3D

Represents the projection of the current camera.

Link copied to clipboard
object Canvas

The canvas management object.

Link copied to clipboard
data class Color(val r: ERROR CLASS: Symbol not found for UByte, val g: ERROR CLASS: Symbol not found for UByte, val b: ERROR CLASS: Symbol not found for UByte, val a: ERROR CLASS: Symbol not found for UByte = 255.toUByte())

Represents a color with red, green, blue, and alpha components.

Link copied to clipboard
class File(path: String)

Represents a file in raylib.

Link copied to clipboard
class Font(raw: ERROR CLASS: Symbol not found for raylib.internal.Font)

Represents a font in raylib.

Link copied to clipboard
object GamePad

The current gamepad state, if one or multiple are connected.

Link copied to clipboard
class Image(raw: ERROR CLASS: Symbol not found for CValue<ERROR CLASS: Symbol not found for raylib.internal.Image>)

Represents a raylib image.

Link copied to clipboard
enum Key : Enum<Key>

Represents a keyboard key.

Link copied to clipboard
object Keyboard

The current keyboard state.

Link copied to clipboard
class Material(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Material>)

Represents a raylib material.

Link copied to clipboard
data class MaterialMap(val texture: Texture2D? = null, val color: Color = Color.WHITE, val value: Float? = null)

Represents a raylib material map.

Link copied to clipboard
data class Matrix4(val m0: Float, val m1: Float, val m2: Float, val m3: Float, val m4: Float, val m5: Float, val m6: Float, val m7: Float, val m8: Float, val m9: Float, val m10: Float, val m11: Float, val m12: Float, val m13: Float, val m14: Float, val m15: Float)

A 4x4 matrix.

Link copied to clipboard
class Mesh(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Mesh>)

Represents a raylib mesh.

Link copied to clipboard
class Model(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Model>)

Represents a raylib model.

Link copied to clipboard
object Mouse

The current mouse and cursor state.

Link copied to clipboard
class MusicStream(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for Music>) : Playable

Represents a music stream in raylib, which is a processed audio data structure that can be played, paused, or stopped. A music stream is typically loaded from a file and should be unloaded when it is no longer needed.

Link copied to clipboard

The format of the image or texture.

Link copied to clipboard
interface Playable

Represents a playable audio format in raylib.

Link copied to clipboard
data class RenderTexture2D(val id: ERROR CLASS: Symbol not found for UInt, val texture: Texture2D, val depth: Texture2D)

Represents a render texture in raylib, which includes a color texture and a depth texture.

Link copied to clipboard
typealias Sampler2D = ERROR CLASS: Symbol not found for UInt

The type alias for a 2D texture sampler in raylib. Corresponds to the Texture2D.id property.

Link copied to clipboard
open class Shader

Represents a raylib shader.

Link copied to clipboard
class Sound(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Sound>) : Playable

Represents a sound in raylib, which is a processed audio data structure that can be played, paused, or stopped. A sound is typically loaded from a wave and should be unloaded when it is no longer needed.

Link copied to clipboard
class Texture2D(val id: {raylib/Sampler2D=} ERROR CLASS: Symbol not found for UInt, val width: Int, val height: Int, val mipmaps: Int = 1, val format: PictureFormat = PictureFormat.UNCOMPRESSED_R32G32B32A32)

Represents a two-dimensional texture in raylib.

Link copied to clipboard
class Wave(raw: ERROR CLASS: Symbol not found for CPointer<ERROR CLASS: Symbol not found for raylib.internal.Wave>)

Represents a wave in raylib, which is a raw audio data structure that can be loaded from a file or generated procedurally.

Link copied to clipboard
object Window

The window management object.

Properties

Link copied to clipboard

The current directory of where the application is running.

Link copied to clipboard
val cwd: String?

The current working directory.

Functions

Link copied to clipboard
fun Canvas.arc(cx: Float, cy: Float, radius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)
fun Canvas.arc(cx: Int, cy: Int, radius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)

Draws an arc outline on the canvas.

Link copied to clipboard
fun Canvas.basisSpline(color: Color = Color.BLACK, thick: Float, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.basisSpline(color: Color = Color.BLACK, thick: Float, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a basis spline on the canvas.

Link copied to clipboard
fun Canvas.billboard(camera: Camera3D, texture: Texture2D, x: Float, y: Float, z: Float, scale: Float = 1.0f, tint: Color = Color.WHITE)

Draws a billboard texture in 3D space.

Link copied to clipboard
fun Canvas.camera2D(camera: Camera2D, block: Canvas.() -> Unit)

Draws within a 2D camera context.

Link copied to clipboard
fun Canvas.camera3D(camera: Camera3D, block: Canvas.() -> Unit)

Draws within a 3D camera context.

Link copied to clipboard
fun Canvas.capsule(x1: Float, y1: Float, z1: Float, x2: Float, y2: Float, z2: Float, radius: Float, slices: Int = 8, rings: Int = 8, color: Color = Color.BLACK)

Draws a capsule's wires in 3D space.

Link copied to clipboard
fun Canvas.catmullRomSpline(color: Color = Color.BLACK, thick: Float, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.catmullRomSpline(color: Color = Color.BLACK, thick: Float, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a Catmull-Rom spline on the canvas.

Link copied to clipboard
fun Canvas.circle(cx: Int, cy: Int, radius: Float, color: Color = Color.BLACK)

Draws a circle outline on the canvas.

Link copied to clipboard
fun Canvas.circle3(cx: Float, cy: Float, cz: Float, radius: Float, rotX: Float, rotY: Float, rotZ: Float, rotAngle: Float, color: Color = Color.BLACK)

Draws a circle in 3D space.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.compress(): ERROR CLASS: Symbol not found for UByteArray

Compresses this byte array using DEFLATE algorithm.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.crc32(): ERROR CLASS: Symbol not found for UInt
fun ByteArray.crc32(): ERROR CLASS: Symbol not found for UInt

Computes the CRC32 hash of this byte array.

Link copied to clipboard
fun Canvas.cubicBezierSpline(color: Color = Color.BLACK, thick: Float, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.cubicBezierSpline(color: Color = Color.BLACK, thick: Float, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a cubic bezier spline on the canvas.

Link copied to clipboard
fun Canvas.cylinder(x: Float, y: Float, z: Float, radius: Float, height: Float, color: Color = Color.BLACK)
fun Canvas.cylinder(x: Float, y: Float, z: Float, radiusTop: Float, radiusBottom: Float = radiusTop, height: Float, color: Color = Color.BLACK)
fun Canvas.cylinder(x: Float, y: Float, z: Float, radiusTop: Float, radiusBottom: Float = radiusTop, height: Float, slices: Int = 8, color: Color = Color.BLACK)

Draws a cylinder's wires in 3D space.

fun Canvas.cylinder(x1: Float, y1: Float, z1: Float, x2: Float, y2: Float, z2: Float, radiusTop: Float, radiusBottom: Float = radiusTop, sides: Int = 8, color: Color = Color.BLACK)

Draws a cylinder in 3D space with differing start and end points between bases.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.decompress(): ERROR CLASS: Symbol not found for UByteArray

Decompresses this byte array using INFLATE algorithm.

Link copied to clipboard
fun Canvas.draw(x: Float, y: Float, color: Color = Color.BLACK)
fun Canvas.draw(x: Int, y: Int, color: Color = Color.BLACK)

Draws a pixel on the canvas.

fun Canvas.draw(x: Int, y: Int, z: Int, color: Color)

Draws a 3D point on the canvas.

Link copied to clipboard
fun Canvas.drawBoundingBox(box: BoundingBox3D, color: Color = Color.RED)

Draws a 3D bounding box on the canvas.

Link copied to clipboard
fun Canvas.drawImage(image: Image, x: Int, y: Int, tint: Color = Color.WHITE)

Draws an image on the canvas at the specified position with an optional tint color.

Link copied to clipboard
fun Canvas.drawMesh(mesh: Mesh, material: Material)

Draws a 3D mesh on the canvas with identity transform (at origin).

fun Canvas.drawMesh(mesh: Mesh, material: Material, transformations: List<Matrix4>)
fun Canvas.drawMesh(mesh: Mesh, material: Material, vararg transformations: Matrix4)

Draws multiple instances of a 3D mesh on the canvas.

fun Canvas.drawMesh(mesh: Mesh, material: Material, transform: Matrix4)

Draws a 3D mesh on the canvas.

fun Canvas.drawMesh(mesh: Mesh, material: Material, position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotationAxis: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotationAngle: Float, scale: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>)
fun Canvas.drawMesh(mesh: Mesh, material: Material, x: Float, y: Float, z: Float, rotX: Float = 0.0f, rotY: Float = 0.0f, rotZ: Float = 0.0f, rotAngle: Float = 0.0f, scaleX: Float = 0.0f, scaleY: Float = 0.0f, scaleZ: Float = 0.0f)
fun Canvas.drawMesh(mesh: Mesh, material: Material, x: Int, y: Int, z: Int, rotX: Float = 0.0f, rotY: Float = 0.0f, rotZ: Float = 0.0f, rotAngle: Float = 0.0f, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f)

Draws a 3D mesh on the canvas with position, rotation, and scale.

Link copied to clipboard
fun Canvas.drawModel(model: Model, position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, scale: Float = 1.0f, tint: Color = Color.WHITE)
fun Canvas.drawModel(model: Model, x: Float, y: Float, z: Float, scale: Float = 1.0f, tint: Color = Color.WHITE)
fun Canvas.drawModel(model: Model, x: Int, y: Int, z: Int, scale: Float = 1.0f, tint: Color = Color.WHITE)

Draws a 3D model on the canvas.

fun Canvas.drawModel(model: Model, position: ERROR CLASS: Symbol not found for Triple<kotlin/Int, kotlin/Int, kotlin/Int>, rotation: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotAngle: Float, scale: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float> = (1F to 1F to 1F), tint: Color = Color.WHITE)
fun Canvas.drawModel(model: Model, position: ERROR CLASS: Symbol not found for Triple<kotlin/Int, kotlin/Int, kotlin/Int>, rotation: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotAngle: Float, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f, tint: Color = Color.WHITE)
fun Canvas.drawModel(model: Model, x: Int, y: Int, z: Int, rotX: Float, rotY: Float, rotZ: Float, rotAngle: Float, scale: Float = 1.0f, tint: Color = Color.WHITE)
fun Canvas.drawModel(model: Model, x: Float, y: Float, z: Float, rotX: Float, rotY: Float, rotZ: Float, rotAngle: Float, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f, tint: Color = Color.WHITE)

Draws a 3D model on the canvas with extended parameters.

Link copied to clipboard
fun Canvas.drawModelWires(model: Model, position: ERROR CLASS: Symbol not found for Triple<kotlin/Int, kotlin/Int, kotlin/Int>, scale: Float = 1.0f, tint: Color = Color.BLACK)
fun Canvas.drawModelWires(model: Model, x: Int, y: Int, z: Int, scale: Float = 1.0f, tint: Color = Color.BLACK)

Draws the wires of a 3D model on the canvas.

fun Canvas.drawModelWires(model: Model, position: ERROR CLASS: Symbol not found for Triple<kotlin/Int, kotlin/Int, kotlin/Int>, rotation: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotAngle: Float, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f, tint: Color = Color.BLACK)
fun Canvas.drawModelWires(model: Model, x: Int, y: Int, z: Int, rotX: Float, rotY: Float, rotZ: Float, rotAngle: Float, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f, tint: Color = Color.BLACK)

Draws the wires of a 3D model on the canvas with extended parameters.

Link copied to clipboard
fun Canvas.drawText(position: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, text: String, color: Color = Color.WHITE, fontSize: Int = 12, font: Font = Font.default(), spacing: Float = 1.0f, rotationAxis: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float> = 0F to 0F, rotation: Float = 0.0f)
fun Canvas.drawText(x: Float, y: Float, text: String, color: Color = Color.WHITE, fontSize: Int = 12, font: Font = Font.default(), spacing: Float = 1.0f, rotX: Float = 0.0f, rotY: Float = 0.0f, rotation: Float = 0.0f)
fun Canvas.drawText(x: Int, y: Int, text: String, color: Color = Color.WHITE, fontSize: Int = 12, font: Font = Font.default(), spacing: Float = 1.0f, rotX: Float = 0.0f, rotY: Float = 0.0f, rotation: Float = 0.0f)

Draws text on the given canvas.

Link copied to clipboard
fun Canvas.drawTexture(texture: Texture2D, x: Float, y: Float, tint: Color = Color.WHITE)
fun Canvas.drawTexture(texture: Texture2D, x: Int, y: Int, tint: Color = Color.WHITE)

Draws a texture on the canvas at the specified position with an optional tint color.

fun Canvas.drawTexture(texture: Texture2D, x: Float, y: Float, rotation: Float, scale: Float = 1.0f, tint: Color = Color.WHITE)

Draws a texture on the canvas at the specified position with rotation, scale, and optional tint color.

fun Canvas.drawTexture(texture: Texture2D, x: Int, y: Int, rotation: Float, scale: Float = 1.0f, tint: Color = Color.WHITE)

Draws a texture on the canvas at the specified position with rotation, scale, and an optional tint color.

fun Canvas.drawTexture(texture: Texture2D, x: Float, y: Float, rotation: Float, centerX: Float = 0.0f, centerY: Float = 0.0f, scale: Float = 1.0f, tint: Color = Color.WHITE)
fun Canvas.drawTexture(texture: Texture2D, x: Int, y: Int, rotation: Float, centerX: Int = 0, centerY: Int = 0, scale: Float = 1.0f, tint: Color = Color.WHITE)

Draws a texture on the canvas at the specified position.

Link copied to clipboard
fun Canvas.ellipse(cx: Int, cy: Int, hradius: Float, vradius: Float, color: Color = Color.BLACK)

Draws an ellipse outline on the canvas.

Link copied to clipboard

Ends the 2D camera on the current window.

Link copied to clipboard

Ends the 3D camera on the current window.

Link copied to clipboard

Ends rendering to the current RenderTexture2D and returns to the default framebuffer.

Link copied to clipboard
fun Canvas.fillArc(cx: Float, cy: Float, radius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)
fun Canvas.fillArc(cx: Int, cy: Int, radius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)

Draws an arc on the canvas as a filled sector.

Link copied to clipboard
fun Canvas.fillCapsule(x1: Float, y1: Float, z1: Float, x2: Float, y2: Float, z2: Float, radius: Float, slices: Int = 8, rings: Int = 8, color: Color = Color.BLACK)

Draws a capsule in 3D space.

Link copied to clipboard
fun Canvas.fillCircle(cx: Int, cy: Int, radius: Float, color: Color = Color.BLACK)

Draws a filled circle on the canvas.

Link copied to clipboard
fun Canvas.fillCircleGradient(cx: Int, cy: Int, radius: Float, inner: Color, outer: Color)

Draws a filled circle with a radial gradient on the canvas.

Link copied to clipboard
fun Canvas.fillCylinder(x: Float, y: Float, z: Float, radius: Float, height: Float, color: Color = Color.BLACK)
fun Canvas.fillCylinder(x: Float, y: Float, z: Float, radiusTop: Float, radiusBottom: Float = radiusTop, height: Float, color: Color = Color.BLACK)
fun Canvas.fillCylinder(x: Float, y: Float, z: Float, radiusTop: Float, radiusBottom: Float = radiusTop, height: Float, slices: Int = 8, color: Color = Color.BLACK)

Draws a cylinder in 3D space.

fun Canvas.fillCylinder(x1: Float, y1: Float, z1: Float, x2: Float, y2: Float, z2: Float, radiusTop: Float, radiusBottom: Float = radiusTop, sides: Int = 8, color: Color = Color.BLACK)

Draws a cylinder in 3D space with differing start and end points between bases.

Link copied to clipboard
fun Canvas.fillEllipse(cx: Int, cy: Int, hradius: Float, vradius: Float, color: Color = Color.BLACK)

Draws a filled ellipse on the canvas.

Link copied to clipboard
fun Canvas.fillPolygon(cx: Float, cy: Float, sides: Int, radius: Float, rotation: Float = 0.0f, color: Color = Color.BLACK)
fun Canvas.fillPolygon(cx: Int, cy: Int, sides: Int, radius: Float, rotation: Float = 0.0f, color: Color = Color.BLACK)

Draws a filled polygon on the canvas.

Link copied to clipboard
fun Canvas.fillRect(x: Float, y: Float, width: Float, height: Float, color: Color = Color.BLACK)
fun Canvas.fillRect(x: Int, y: Int, width: Int, height: Int, color: Color = Color.BLACK)

Draws a filled rectangle on the canvas.

fun Canvas.fillRect(x: Float, y: Float, width: Float, height: Float, rotation: Float, color: Color = Color.BLACK)
fun Canvas.fillRect(x: Int, y: Int, width: Int, height: Int, rotation: Float, color: Color = Color.BLACK)

Draws a rotated filled rectangle on the canvas.

Link copied to clipboard
fun Canvas.fillRectGradient(x: Int, y: Int, width: Int, height: Int, col1: Color, col2: Color, vertical: Boolean = true)

Draws a filled rectangle with a gradient on the canvas.

fun Canvas.fillRectGradient(x: Float, y: Float, width: Float, height: Float, topLeft: Color, bottomLeft: Color, topRight: Color, bottomRight: Color)
fun Canvas.fillRectGradient(x: Int, y: Int, width: Int, height: Int, topLeft: Color, bottomLeft: Color, topRight: Color, bottomRight: Color)

Draws a filled rectangle with a four-corner gradient on the canvas.

Link copied to clipboard
fun Canvas.fillRectPrism(x: Float, y: Float, z: Float, width: Float, height: Float, length: Float, color: Color = Color.BLACK)

Draws a rectangular prism in 3D space.

Link copied to clipboard
fun Canvas.fillRing(cx: Float, cy: Float, iradius: Float, oradius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)
fun Canvas.fillRing(cx: Int, cy: Int, iradius: Float, oradius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)

Draws a filled ring on the canvas, in between two radii.

Link copied to clipboard
fun Canvas.fillRoundRect(x: Float, y: Float, width: Float, height: Float, roundness: Float, segments: Int = 0, color: Color = Color.BLACK)
fun Canvas.fillRoundRect(x: Int, y: Int, width: Int, height: Int, roundness: Float, segments: Int = 0, color: Color = Color.BLACK)

Draws a filled rounded rectangle on the canvas.

Link copied to clipboard
fun Canvas.fillSphere(x: Float, y: Float, z: Float, radius: Float, color: Color)
fun Canvas.fillSphere(x: Float, y: Float, z: Float, radius: Float, rings: Int = 8, slices: Int = 8, color: Color = Color.BLACK)

Draws a sphere in 3D space.

Link copied to clipboard
fun Canvas.fillTriangle(x1: Int, y1: Int, x2: Int, y2: Int, x3: Int, y3: Int, color: Color = Color.BLACK)

Draws a filled triangle on the canvas.

Link copied to clipboard

Decodes a Base64 string to a byte array.

Link copied to clipboard
fun String.fromBase64U(): ERROR CLASS: Symbol not found for UByteArray

Decodes a Base64 string to a byte array.

Link copied to clipboard
fun Canvas.grid(slices: Int = 10, spacing: Float = 1.0f)

Draws a grid in 3D space.

Link copied to clipboard

Converts this path to an absolute path in the application directory. If appDir is null or the path starts with appDir, the original path is returned.

Link copied to clipboard
fun Canvas.line(pos1: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, pos2: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, color: Color = Color.BLACK)
fun Canvas.line(x1: Float, y1: Float, x2: Float, y2: Float, color: Color = Color.BLACK)
fun Canvas.line(x1: Int, y1: Int, x2: Int, y2: Int, color: Color = Color.BLACK)

Draws a line on the canvas.

fun Canvas.line(pos1: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, pos2: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, thick: Float, color: Color = Color.BLACK)
fun Canvas.line(x1: Float, y1: Float, x2: Float, y2: Float, thick: Float, color: Color = Color.BLACK)
fun Canvas.line(x1: Int, y1: Int, x2: Int, y2: Int, thick: Float, color: Color = Color.BLACK)

Draws a line on the canvas using triangles and quads.

Link copied to clipboard
fun Canvas.line3(x1: Int, y1: Int, z1: Int, x2: Int, y2: Int, z2: Int, color: Color = Color.BLACK)

Draws a 3D line on the canvas.

Link copied to clipboard
fun Canvas.linearSpline(color: Color = Color.BLACK, thick: Float, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.linearSpline(color: Color = Color.BLACK, thick: Float, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a linear spline on the canvas.

Link copied to clipboard
fun Canvas.lineBezier(x1: Int, y1: Int, x2: Int, y2: Int, thick: Float, color: Color = Color.BLACK)

Draws a cubic bezier line on the canvas.

Link copied to clipboard
fun Canvas.lineStrip(color: Color = Color.BLACK, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.lineStrip(color: Color = Color.BLACK, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws multiple lines on the canvas.

Link copied to clipboard

Gets an Image from a Texture2D.

Creates a Texture2D from an Image.

Link copied to clipboard

Creates a Texture2D from an Image and then frees the image from memory.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.md5(): String

Computes the MD5 hash of this byte array.

Link copied to clipboard
fun openURL(url: String)

Opens a URL in the system's default browser

Link copied to clipboard
fun Canvas.polygon(cx: Float, cy: Float, sides: Int, radius: Float, rotation: Float = 0.0f, color: Color = Color.BLACK)
fun Canvas.polygon(cx: Int, cy: Int, sides: Int, radius: Float, rotation: Float = 0.0f, color: Color = Color.BLACK)
fun Canvas.polygon(cx: Float, cy: Float, sides: Int, radius: Float, rotation: Float = 0.0f, lineThick: Int, color: Color = Color.BLACK)

Draws a polygon outline on the canvas.

Link copied to clipboard
fun Canvas.quadraticBezierSpline(color: Color = Color.BLACK, thick: Float, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.quadraticBezierSpline(color: Color = Color.BLACK, thick: Float, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a quadratic bezier spline on the canvas.

Link copied to clipboard
fun Canvas.ray(px: Float, py: Float, pz: Float, dx: Float, dy: Float, dz: Float, color: Color = Color.BLACK)

Draws a ray in 3D space.

Link copied to clipboard
fun Canvas.rect(x: Int, y: Int, width: Int, height: Int, color: Color = Color.BLACK)

Draws a rectangle outline on the canvas.

fun Canvas.rect(x: Float, y: Float, width: Float, height: Float, lineThick: Float, color: Color = Color.BLACK)
fun Canvas.rect(x: Int, y: Int, width: Int, height: Int, lineThick: Float, color: Color = Color.BLACK)

Draws a rectangle outline on the canvas with specified line thickness.

Link copied to clipboard
fun Canvas.rect3(x: Float, y: Float, z: Float, width: Float, height: Float, color: Color = Color.BLACK)
fun Canvas.rect3(x: Int, y: Int, z: Int, width: Int, height: Int, color: Color = Color.BLACK)

Draws a rectangular plane in 3D space.

Link copied to clipboard
fun Canvas.rectPrism(x: Float, y: Float, z: Float, width: Float, height: Float, length: Float, color: Color = Color.BLACK)

Draws a rectangular prism's wires in 3D space.

Link copied to clipboard
fun Canvas.ring(cx: Float, cy: Float, iradius: Float, oradius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)

Draws a ring outline on the canvas.

fun Canvas.ring(cx: Int, cy: Int, iradius: Float, oradius: Float, startAngle: Float, endAngle: Float, segments: Int = 6, color: Color = Color.BLACK)
Link copied to clipboard
fun Canvas.roundRect(x: Float, y: Float, width: Float, height: Float, roundness: Float, segments: Int = 0, color: Color = Color.BLACK)
fun Canvas.roundRect(x: Float, y: Float, width: Float, height: Float, roundness: Float, lineThick: Float, segments: Int = 0, color: Color = Color.BLACK)

Draws a rounded rectangle outline on the canvas.

Link copied to clipboard
fun screenshot(save: String)

Takes and saves a screenshot.

Link copied to clipboard
fun Canvas.setLineSpacing(spacing: Int)

Sets the line spacing for text rendering on the given canvas.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.sha1(): String

Computes the SHA1 hash of this byte array.

Link copied to clipboard
fun Canvas.shader(shader: Shader, block: Canvas.() -> Unit)

Executes a block of code while using the given shader for 3D drawing on the canvas.

Link copied to clipboard
fun Canvas.sphere(x: Float, y: Float, z: Float, radius: Float, color: Color = Color.BLACK)
fun Canvas.sphere(x: Float, y: Float, z: Float, radius: Float, rings: Int = 8, slices: Int = 8, color: Color = Color.BLACK)

Draws a sphere's wires in 3D space.

Link copied to clipboard
fun Canvas.start2D(camera: Camera2D): ERROR CLASS: Unresolved name: memScoped

Starts a 2D camera on the current window.

Link copied to clipboard
fun Canvas.start3D(camera: Camera3D)

Starts a 3D camera on the current window.

Link copied to clipboard

Starts using the given shader for 3D drawing on the canvas.

Link copied to clipboard

Starts rendering to the specified RenderTexture2D.

Link copied to clipboard

Stops using the current shader for 3D drawing on the canvas.

Link copied to clipboard
fun Window.textureMode(renderTexture: RenderTexture2D, block: Window.() -> Unit)

Executes a block of code while rendering to the specified RenderTexture2D.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for UByteArray.toBase64(): String

Encodes this byte array to a Base64 string.

Link copied to clipboard

Converts a string path to a file.

Link copied to clipboard
fun Canvas.triangle(x1: Int, y1: Int, x2: Int, y2: Int, x3: Int, y3: Int, color: Color = Color.BLACK)

Draws a triangle outline on the canvas.

Link copied to clipboard
fun Canvas.triangle3(x1: Float, y1: Float, z1: Float, x2: Float, y2: Float, z2: Float, x3: Float, y3: Float, z3: Float, color: Color = Color.BLACK)

Draws a triangle in 3D space.

Link copied to clipboard
fun Canvas.triangleFan(color: Color = Color.BLACK, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.triangleFan(color: Color = Color.BLACK, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a triangle fan on the canvas.

Link copied to clipboard
fun Canvas.triangleStrip(color: Color = Color.BLACK, vararg points: ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>)
fun Canvas.triangleStrip(color: Color = Color.BLACK, points: List<ERROR CLASS: Symbol not found for Pair<kotlin/Int, kotlin/Int>>)

Draws a triangle strip on the canvas.

Link copied to clipboard
fun Canvas.triangleStrip3(color: Color = Color.BLACK, vararg points: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>)
fun Canvas.triangleStrip3(color: Color = Color.BLACK, points: List<ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>>)

Draws a triangle strip in 3D space.

Link copied to clipboard

Writes this image to a file.