View Source IdenticonSvg.Draw (IdenticonSvg v0.9.5)

Module of IdenticonSvg that contains functions related to drawing SVG elements and composing the SVG output of the requested identicon.

Link to this section Summary

Link to this section Functions

Link to this function

svg(paths, size, padding, fg_color, bg_color, opacity, opts \\ [only_group: false, curvature: 0.8])

View Source

Compose the SVG content out of the templates and return a string.

Arguments (all mandatory):

  • paths: the :paths field of the %Identicon{} struct, i.e. single-height polygon "strips" across the mirroring axis after neighbor detection.
  • size: the size of the identicon without padding.
  • padding: the requested padding (positive or zero integer).
  • fg_color and bg_color: foreground and background color hex strings.
  • opacity: requested opacity (0.0 to 1.0).