Skip to content

net.kernelpanicsoft.archie.gui.util

Types

HsvColor

@Immutable



data class HsvColor(
    val hue: Float, 
    val saturation: Float, 
    val value: Float, 
    val alpha: Float
)

An immutable colour representation using the Hue-Saturation-Value model with an alpha channel.

KColor

@Serializable



data class KColor(
    val red: Int = 0, 
    val green: Int = 0, 
    val blue: Int = 0, 
    val alpha: Int = 255
)

A serializable, immutable ARGB colour value for use in GUI composables.

Functions

addVertex

fun VertexConsumer.addVertex(
    matrix: Matrix4f, 
    x: Int, 
    y: Int, 
    z: Int
): VertexConsumer

Adds a vertex to this VertexConsumer using integer screen coordinates.

drawRectOutline

fun GuiGraphics.drawRectOutline(
    x: Int, 
    y: Int, 
    width: Int, 
    height: Int, 
    color: Int, 
    thickness: Int = 1
)

Draws a hollow rectangle outline using RenderType.gui.

fun GuiGraphics.drawRectOutline(
    type: RenderType, 
    x: Int, 
    y: Int, 
    width: Int, 
    height: Int, 
    color: Int, 
    thickness: Int = 1
)

Draws a hollow rectangle outline with an explicit RenderType.

fillGradient

fun GuiGraphics.fillGradient(
    x: Int, 
    y: Int, 
    width: Int, 
    height: Int, 
    topLeftColor: Int, 
    topRightColor: Int, 
    bottomLeftColor: Int, 
    bottomRightColor: Int
)

Draws a four-corner gradient rectangle on the GUI.

fun GuiGraphics.fillGradient(
    type: RenderType, 
    x: Int, 
    y: Int, 
    width: Int, 
    height: Int, 
    topLeftColor: Int, 
    topRightColor: Int, 
    bottomLeftColor: Int, 
    bottomRightColor: Int
)

Draws a four-corner gradient rectangle with an explicit RenderType.