substitute abstract method

Color substitute(
  1. String? id,
  2. String elementName,
  3. String attributeName,
  4. Color color,
)

Returns a new color to use in place of color during SVG parsing.

The SVG parser will call this method each time it encounters a color value in the SVG. This allows for dynamic color substitution based on the context.

  • id: An optional identifier for the current element being parsed.
  • elementName: The name of the SVG element currently being parsed.
  • attributeName: The name of the attribute where the color is specified.
  • color: The original color value that needs to be substituted.

Implementing subclasses should provide specific logic to determine the substitute color based on the provided parameters.

Implementation

Color substitute(
  String? id,
  String elementName,
  String attributeName,
  Color color,
);