# `Hakushi.Ink`
[🔗](https://github.com/hattoriai/hakushi/blob/v0.6.0/lib/hakushi/ink.ex#L1)

The geometry of a stroke of ink (`Hakushi.Kits.Ink`): its outline, as
the `d` of an SVG path, whose width follows the pen's pressure.

The browser draws a stroke in progress with the same outline (the
bundle's `ink.ts`): the stroke a person sees as they draw it, and the
node it becomes when the pen lifts, are the same shape.

A point is `[x, y, pressure]`, the pressure from 0 to 1 (`0.5` for a
pointer with none, a mouse); `[x, y]` is a point of no pressure.

# `point`

```elixir
@type point() :: [number()]
```

A point of a stroke: `[x, y, pressure]` or `[x, y]`.

# `centerline`

```elixir
@spec centerline([point()]) :: String.t()
```

The line through a stroke's points, as the `d` of an SVG path: to aim at it.

# `fmt`

```elixir
@spec fmt(number()) :: String.t()
```

A number as a path writes it: to a tenth, halves away from zero, without
a `.0` (as the browser writes it).

# `outline`

```elixir
@spec outline([point()], number(), boolean()) :: String.t()
```

The outline of a stroke: the points on each side of its line, as far
from it as the pressure says (thinner with less), joined by curves
through their middles, with a round cap at each end. `flat` (a
highlighter) keeps one width.

# `reach`

```elixir
@spec reach(number(), boolean()) :: number()
```

How far a stroke's outline reaches from its points: the most it is wide, halved.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
