IdenticonSvg.Draw (IdenticonSvg v1.0.0)

Copy Markdown View Source

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

Summary

Functions

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

(since 0.9.0)

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).