# `Linocut.Preview`
[🔗](https://github.com/jaman/cauldron/blob/v0.1.3/linocut/lib/linocut/preview.ex#L1)

Looking at rasters: on a sheet, in a terminal, or as a PNG.

    Linocut.Preview.sheet(headings, columns: 8, gap: 1)
    |> Linocut.Preview.to_terminal()
    |> IO.write()

`to_terminal/2` picks the terminal's graphics protocol, or braille where it has none;
`protocol:` forces one.

# `framed`

```elixir
@spec framed(FrenchCurve.Raster.t(), Linocut.Palette.spec()) :: FrenchCurve.Raster.t()
```

A raster with a one-pixel frame drawn around it, to see its edges.

# `png`

```elixir
@spec png(FrenchCurve.Raster.t()) :: binary()
```

The raster as PNG bytes.

# `sheet`

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

One raster with `rasters` laid out in rows of `columns`.

## Options

  * `:columns` — rasters per row. Default `8`
  * `:gap` — pixels between rasters. Default `1`
  * `:background` — the sheet's colour. Default transparent

# `to_terminal`

```elixir
@spec to_terminal(FrenchCurve.Raster.t(), keyword()) :: iodata()
```

The bytes that show `raster` in a terminal.

## Options

  * `:protocol` — `:kitty`, `:iterm2`, `:sixel` or `:braille`. Default: detected
  * `:fit` — `{columns, rows}` for pixel protocols

---

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