OverlappingBorder

class OverlappingBorder(val actualSize: Edges) : Border

A border which ignores Region.borderSize, and uses the size passed to the constructor instead. If actualSize is larger than Region.borderSize, then the border will encroach into the node's content/padding.

In hindsight, the name is misleading as the border remains WITHIN the confines of the Region's allocated space. However, the node's content may overlap the border, if the node's borderSize is smaller than actualSize.

Currently used by MarkdownToStyled to format block-quotes, underline and headings. MarkdownToStyled uses a StyledTextArea, which uses a fixed size font and the same line height for all lines, But we can use an OverlappingBorder whose actualSize is Edges( 0, 0, 1, 0 ) to make it underlined.

Constructors

Link copied to clipboard
constructor(actualSize: Edges)

Properties

Link copied to clipboard

Functions

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

Does the same as PlainBorder, but size is ignored in favour of actualSize.

Link copied to clipboard
open override fun toString(): String