line

fun line(v1: Vec2f, v2: Vec2f, color: Color, color2: Color = color, thickness: Int = this.thickness, snap: Boolean = this.snap)

Draws a line from point A to point B.

Parameters

v1

starting vertex point

v2

ending vertex point

color

color of the start vertex

color2

color of the end vertex

thickness

the thickness of the line in pixels

snap

whether to snap the given coordinates to the center of the pixel


fun line(x: Float, y: Float, x2: Float, y2: Float, color: Color, color2: Color = color, thickness: Int = this.thickness, snap: Boolean = this.snap)

Draws a line from point A to point B.

Parameters

x

starting x-coord

y

starting y-coord

x2

ending x-coord

y2

ending y-coord

color

color of the start vertex

color2

color of the end vertex

thickness

the thickness of the line in pixels

snap

whether to snap the given coordinates to the center of the pixel


fun line(v1: Vec2f, v2: Vec2f, colorBits: Float = this.colorBits, colorBits2: Float = colorBits, thickness: Int = this.thickness, snap: Boolean = this.snap)

Draws a line from point A to point B.

Parameters

v1

starting vertex point

v2

ending vertex point

colorBits

packed color of the start vertex

colorBits2

packed color of the end vertex

thickness

the thickness of the line in world units

snap

whether to snap the given coordinates to the center of the pixel


fun line(x: Float, y: Float, x2: Float, y2: Float, colorBits: Float = this.colorBits, colorBits2: Float = colorBits, thickness: Int = this.thickness, snap: Boolean = this.snap)

Draws a line from point A to point B.

Parameters

x

starting x-coord

y

starting y-coord

x2

ending x-coord

y2

ending y-coord

colorBits

packed color of the start vertex

colorBits2

packed color of the end vertex

thickness

the thickness of the line in world units

snap

whether to snap the given coordinates to the center of the pixel