loom & weft
Made for Swift.

Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.

LOOM Unreleased (PR #2) / TERMINAL ALIASES FROM WEFT

Point

Zero-based columns and rows in terminal cells. Comparable orders by row first, then column. It does not measure Unicode scalars or pixels.

loom.Point is an alias for weft.Point. It is available through import loom. The underlying type’s members are documented here.

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.

Example

let first = Point(x: 5, y: 0)
let second = Point(x: 0, y: 1)
_ = first < second
Members on this page

Feature guides and release status

Point

Type Alias
typealias Point = weft.weft.Point

Zero-based columns and rows in terminal cells. Comparable orders by row first, then column. It does not measure Unicode scalars or pixels.

Source · TerminalExports.swift:4

Underlying weft API

Point

Structure
struct Point

Conforms to: Swift.Comparable, Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.

Integer terminal coordinates.

A column is a terminal cell, not a Unicode scalar.

Source · Point.swift:4

x

Instance Property
var x: Int

Zero-based column in terminal cells.

Source · Point.swift:5

y

Instance Property
var y: Int

Zero-based row in terminal cells.

Source · Point.swift:6

init(x:y:)

Initializer
init(x: Int, y: Int)

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

Parameters (2)
x
Argument type and any default are shown in the declaration; see the behavior notes above.
y
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Point.swift:8

<(_:_:)

Operator
static func < (lhs: `Self`, rhs: `Self`) -> Bool

Orders positions by row, then by column.

Parameters (2)
lhs
Argument type and any default are shown in the declaration; see the behavior notes above.
rhs
Argument type and any default are shown in the declaration; see the behavior notes above.

Returns Bool.

Source · Point.swift:14