SvgGradientServer Class

Definition

Namespace Svg
Assembly Svg.Custom.dll
Show inherited members (110)

Svg.Custom copy of the upstream gradient server base class.

The original implementation delegates stop-color and stop-opacity to the generic attribute inheritance machinery. That is normally fine, but W3C gradients such as pservers-grad-18-b rely on two SVG-specific edge cases:

  • stop-color="inherit" on a child stop must resolve through the parent gradient's computed stop color, which differs from simply scanning for any ancestor value.
  • stop-opacity="inherit" must follow the same parent-computed rule even when the keyword survives only as a raw presentation attribute.
  • Neither property should fall back through xlink:href; resvg fixtures such as e-stop-018 expect referenced gradients to keep the initial stop defaults unless the referenced gradient explicitly authors a stop value of its own.

Upstream stores inherit for paint servers as the shared Inherit sentinel, which generic code can misread as a concrete black color. This local copy keeps the rest of the upstream behavior intact, but routes the stop getters through Svg.SvgStopInheritanceResolver so Svg.Skia follows the same inheritance chain Chrome does, without carrying a permanent submodule patch.

public abstract class SvgGradientServer : SvgPaintServer, ISvgElement, ISvgTransformable, ICloneable, ISvgNode
Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (7)

Methods (4)