BB.Camera.Annotation.Points (bb_camera v0.3.0)

Copy Markdown View Source

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.

Summary

Functions

Build a points annotation.

Like new/1, but raises.

Types

kind()

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

t()

@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()
}

Functions

new(opts)

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

Build a points annotation.

new!(opts)

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

Like new/1, but raises.