# `Linocut.Sheet`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/linocut/lib/linocut/sheet.ex#L1)

A sprite sheet cut into frames.

    Linocut.Sheet.cut(raster, band: 0, gap: 6)

The sheet's background must already be clear. Rows of frames are found as bands of
pixels separated by blank rows, and frames within a band as runs of columns separated by
blank columns. Every frame comes back the same size, each centred across and standing on
the band's own floor, so a walk cycle keeps its feet on one line.

# `box`

```elixir
@type box() :: {integer(), integer(), pos_integer(), pos_integer()}
```

# `cut`

```elixir
@spec cut(FrenchCurve.Raster.t(), keyword()) :: [FrenchCurve.Raster.t()]
```

The frames of `raster`, left to right.

## Options

  * `:band` — which row of frames to cut, counting from the top. Default `0`
  * `:gap` — how many blank columns or rows separate one frame or row from the next.
    Default `6`
  * `:alpha` — the alpha at or above which a pixel counts. Default `16`

# `cut_all`

```elixir
@spec cut_all(FrenchCurve.Raster.t(), keyword()) :: [FrenchCurve.Raster.t()]
```

Every band's frames, top band first, all padded to one size.

Takes `cut/2`'s `:gap` and `:alpha`.

# `rows`

```elixir
@spec rows(FrenchCurve.Raster.t(), non_neg_integer()) :: [boolean()]
```

The rows of `raster` holding any pixel, as `{row, holds?}`.

# `runs`

```elixir
@spec runs([boolean()], non_neg_integer()) :: [{non_neg_integer(), non_neg_integer()}]
```

Runs of `true` in `flags`, as `{first, last}`, joining runs closer than `gap` apart.

---

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