Line

open class Line : UIElement

A strait line defined by 2 points:

Supported transformations: Scale, Rotate, Translate

Constructors

Link copied to clipboard
constructor()
constructor(id: String)
constructor(x: Float, y: Float, x1: Float, y1: Float)

Constructor defining the line coordinates

constructor(id: String, x: Float, y: Float, x1: Float, y1: Float)

Constructor defining the line coordinates

Functions

Link copied to clipboard
protected open override fun onDraw(canvas: CanvasBuffer)

The draw method is called to actually draw the ui element visual representation to the CanvasBuffer

Link copied to clipboard
fun toAngle(length: Float, angle: Float): Line

Define the line parameters with angle & length

Link copied to clipboard
fun toCoord(lengthX: Float, lengthY: Float): Line

Define the line other coordinates