A single overlay layer used by Image.Plug.Pipeline.Ops.Draw.
The interpreter prefers SVG composition: when the layer source
resolves to (or can be expressed as) SVG, the overlay is rendered via
Image.from_svg/2 so it scales without raster artefacts. Bitmap
sources are decoded, optionally resized, and composited with the
configured opacity.
Position is either nil (centre) or {:offset, ...} with any
combination of :top / :bottom and :left / :right (a side and
its opposite cannot both be set; the provider rejects that at parse
time).
Summary
Types
@type fit() :: :contain | :cover | :crop | :pad | :scale_down
@type position() :: nil | {:offset, keyword()}
@type repeat() :: false | true | :x | :y
@type t() :: %Image.Plug.Pipeline.Ops.Draw.Layer{ background: nil | String.t(), fit: fit(), gravity: Image.Plug.Pipeline.Ops.Resize.gravity(), height: nil | pos_integer(), opacity: float(), position: position(), repeat: repeat(), rotate: 0 | 90 | 180 | 270, source: Image.Plug.Source.t(), width: nil | pos_integer() }