Giggly.Label.Style (giggly v0.2.0)

Copy Markdown View Source

The style Giggly asks a label (Giggly.Label) to draw itself in: what the theme gives the title it stands for, or what an annotation gives its label.

  • size — the font's size, in points.
  • color — the text's colour, "#RRGGBB".
  • opacity — from 0, clear, to 1, opaque, apart from the colour.
  • family — the font family: "" Giggly's default sans-serif, "sans", "serif" and "mono" the generic families, any other a font's name.
  • face — :plain, :bold, :italic or :bold_italic.

A field added later arrives with a default, so a label written against these fields keeps working.

Summary

Types

t()

@type t() :: %Giggly.Label.Style{
  color: String.t(),
  face: :plain | :bold | :italic | :bold_italic,
  family: String.t(),
  opacity: float(),
  size: float()
}