GGity v0.3.0 GGity.Element.Rect View Source

Defines the data and functions used to style non-geom rect elements.

CSS presentation attributes:

  • :fill sets value of CSS fill
  • :color sets value of CSS stroke
  • :size sets value of CSS stroke-width

Other attributes:

  • :height sets value of SVG height (height of the key glyph box)

Link to this section Summary

Functions

Constructor for a Rect element.

Link to this section Types

Specs

t() :: %GGity.Element.Rect{
  color: term(),
  fill: term(),
  height: term(),
  size: term()
}

Link to this section Functions

Link to this function

element_rect(attributes)

View Source

Specs

element_rect(keyword()) :: GGity.Element.Line.t()

Constructor for a Rect element.

Setting the value of an attributed to nil will remove that property from the generated stylesheet altogether.

Calling element_rect(attributes) is equivalent to struct(GGity.Element.Line, attributes).