What a viewer draws over a camera's video for one message.
Every coordinate in primitives is in pixels of a frame width by height,
the frame the message describes - not the size the video happens to be
displayed at, which the viewer scales to. Primitives are drawn in order, so
a later one is on top of an earlier one.
lifetime is how long the layer stays up with nothing newer to replace it,
counted from the message's capture time, or :infinity to stay until
replaced. A layer with no primitives clears what was there. See
BB.Camera.Annotation for how a viewer treats a layer.
The primitives follow Foxglove's ImageAnnotations: BB.Camera.Annotation.Points,
BB.Camera.Annotation.Circle and BB.Camera.Annotation.Text. Foxglove keeps
them in a list per kind and draws the kinds in a fixed order; one list
here lets the implementation choose what goes on top.
Summary
Types
@type primitive() :: BB.Camera.Annotation.Points.t() | BB.Camera.Annotation.Circle.t() | BB.Camera.Annotation.Text.t()
@type t() :: %BB.Camera.Annotation.Layer{ height: pos_integer(), lifetime: Localize.Unit.t() | :infinity, primitives: [primitive()], width: pos_integer() }