loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / ADDITIONAL WIDGETS AND TEXT

Fill

Fills a rectangle with a printable, single-cell grapheme.

Existing wide glyphs crossing its boundary are preserved in full.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Members on this page

Feature guides and release status

Fill

Structure
struct Fill

Conforms to: Widget.

Fills a rectangle with a printable, single-cell grapheme.

Existing wide glyphs crossing its boundary are preserved in full.

Source · Fill.swift:6

symbol

Instance Property
var symbol: String

The visible grapheme or symbol string.

Source · Fill.swift:7

style

Instance Property
var style: Style

Visual attributes used when painting this value.

Source · Fill.swift:8

init(_:style:)

Initializer
init(_ symbol: String = " ", style: Style = Style())

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (2)
symbol
Argument type and any default are shown in the declaration; see the behavior notes above.
style
Text/cell appearance.
Source · Fill.swift:10

render(in:buffer:)

Instance Method
func render(in area: Rect, buffer: inout Buffer)

Paints this widget into the assigned terminal-cell rectangle. Application code owns state, input routing, and terminal lifetime.

Parameters (2)
in
Argument type and any default are shown in the declaration; see the behavior notes above.
buffer
Mutable destination cell grid.
Source · Fill.swift:15