View Source GGity.Element.Rect (GGity v0.5.0)

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

CSS presentation attributes:

  • :fill - string: sets value of CSS fill

    Values must be valid CSS color names or hex values.

  • :color - string: sets value of CSS stroke

    Values must be valid CSS color names or hex values.

  • :size - number: sets value of CSS stroke-width

Other attributes:

  • :height - number: 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

@type 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
@spec 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).