Plushie.Type.Alignment (Plushie v0.6.0)

Copy Markdown View Source

Alignment values for align_x and align_y widget props.

Horizontal: :left, :center, :right. Vertical: :top, :center, :bottom.

Summary

Functions

Encodes an alignment value to the wire format.

Types

horizontal()

@type horizontal() :: :left | :center | :right

t()

@type t() :: horizontal() | vertical()

vertical()

@type vertical() :: :top | :center | :bottom

Functions

encode(value)

@spec encode(alignment :: t()) :: String.t()

Encodes an alignment value to the wire format.

Examples

iex> Plushie.Type.Alignment.encode(:left)
"left"

iex> Plushie.Type.Alignment.encode(:center)
"center"

iex> Plushie.Type.Alignment.encode(:right)
"right"

iex> Plushie.Type.Alignment.encode(:top)
"top"

iex> Plushie.Type.Alignment.encode(:bottom)
"bottom"