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

Copy Markdown View Source

A text label: Foxglove's TextAnnotation.

position is the label's bottom-left corner, and font_size is in pixels of the layer's frame, so a label scales with the picture it's on. See BB.Camera.Annotation.Types for points and colours. Foxglove's per-annotation timestamp and metadata are left out.

Summary

Functions

Build a text annotation.

Like new/1, but raises.

Types

t()

@type t() :: %BB.Camera.Annotation.Text{
  background_color: BB.Camera.Annotation.Types.color() | nil,
  font_size: number(),
  position: BB.Camera.Annotation.Types.point(),
  text: String.t(),
  text_color: BB.Camera.Annotation.Types.color()
}

Functions

new(opts)

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

Build a text annotation.

new!(opts)

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

Like new/1, but raises.