Podium.Drawing (Podium v0.3.0)

Copy Markdown View Source

DrawingML fill and line XML fragment generation.

Provides fill_xml/1 and line_xml/1 to render fill and line properties as OOXML fragments used inside shape, chart, and table elements.

Summary

Functions

Generates fill XML for shape properties.

Generates line XML for shape properties.

Functions

fill_xml(color)

@spec fill_xml(
  Podium.fill()
  | {:picture, String.t(), keyword()}
  | {:picture_fill, non_neg_integer()}
) ::
  String.t()

Generates fill XML for shape properties.

  • nil → <a:noFill/>
  • "FF0000" → solid fill with that RGB hex color
  • {:gradient, stops, opts} → gradient fill
  • {:pattern, preset, opts} → pattern fill

line_xml(color)

@spec line_xml(Podium.line()) :: String.t()

Generates line XML for shape properties.

  • nil → ""
  • "000000" → line with default width
  • [color: "000000", width: {2, :pt}, dash_style: :dash] → line with width and dash style