Giggly.Geom.Text (giggly v0.2.0)

Copy Markdown View Source

Text: each row's label at its x and y, written in its size, family, fontface, color and alpha, turned its angle, justified by its hjust and vjust, its lines lineheight apart.

Its options are check_overlap:, size_unit: and label_with:, a function turning each row's label into one another library lays out (Giggly.Label). Build one with Giggly.Geom.new(Giggly.Geom.Text, options), so each option left out takes its default. A geom drawing by delegation sets its rows up through it and draws them through it (Giggly.Geom).

Summary

Types

A unit a layer's text sizes are read in.

t()

Functions

Text from options validated against options/0.

The options text is built from, as a NimbleOptions schema: whether overlapping labels are left out, the unit its sizes are in, and a function laying each label out through another library.

Types

size_unit()

@type size_unit() :: :mm | :pt | :cm | :in | :pc

A unit a layer's text sizes are read in.

t()

@opaque t()

Functions

new(options)

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

Text from options validated against options/0.

options()

@spec options() :: keyword()

The options text is built from, as a NimbleOptions schema: whether overlapping labels are left out, the unit its sizes are in, and a function laying each label out through another library.