# `BB.Camera.Annotation.Points`
[🔗](https://github.com/beam-bots/bb_camera/blob/main/lib/bb/camera/annotation/points.ex#L5)

Points, or lines through them: Foxglove's `PointsAnnotation`.

`type` says how `points` are drawn:

- `:points` - each point on its own, as a dot `thickness` across in
  `outline_color`;
- `:line_strip` - a line from each point to the next;
- `:line_loop` - the same, closed back to the first point: a polygon, filled
  with `fill_color` if it has one;
- `:line_list` - separate segments, between the first and second points,
  the third and fourth, and so on.

Lines are `thickness` pixels wide, in pixels of the layer's frame. See
`BB.Camera.Annotation.Types` for points and colours.

Foxglove's per-point `outline_colors`, its per-annotation timestamp and its
metadata are left out: the whole layer has one capture time, in its
message's envelope.

# `kind`

```elixir
@type kind() :: :points | :line_strip | :line_loop | :line_list
```

# `t`

```elixir
@type t() :: %BB.Camera.Annotation.Points{
  fill_color: BB.Camera.Annotation.Types.color() | nil,
  outline_color: BB.Camera.Annotation.Types.color() | nil,
  points: [BB.Camera.Annotation.Types.point()],
  thickness: number(),
  type: kind()
}
```

# `new`

```elixir
@spec new(keyword()) :: {:ok, t()} | {:error, term()}
```

Build a points annotation.

# `new!`

```elixir
@spec new!(keyword()) :: t()
```

Like `new/1`, but raises.

---

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