UnderlineBackground

class UnderlineBackground(color: Color, val thickness: Float = 1.0f, val ratio: Float = 0.9f) : ColoredBackground

A Background specifically designed for underlining Text Nodes, where it isn't possible to use a Border.

ratio is the position of the underline as a proportion of the height. The default is 0.9f, because 1.0f is too far down.

Constructors

Link copied to clipboard
constructor(color: Color, thickness: Float = 1.0f, ratio: Float = 0.9f)

Properties

Link copied to clipboard
open override var color: Color
Link copied to clipboard
open override val colorProperty: ColorProperty
Link copied to clipboard
val ratio: Float = 0.9f
Link copied to clipboard
val thickness: Float = 1.0f

Functions

Link copied to clipboard
open override fun draw(x: Float, y: Float, width: Float, height: Float, size: Edges)

Draw the background of an area.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withColor(color: Color): UnderlineBackground

Returns a new instance of ColoredBackground with a different color. Other attributes of the border will be copied. e.g. For a RoundedBackground, the radius will be the same.