SVGBuilderExtensions.AddStop

AddStop<TBuilder>(this TBuilder, Color?, double?, OneOf<double, (double, StopUnitType)>, string, Action<SVGStopElementBuilder>)

Adds a ‘stop’ element to the gradient in the SVG builder, specifying color and opacity at a particular offset.

public static TBuilder AddStop<TBuilder>(this TBuilder builder, Color? stopColor = default, 
    double? stopOpacity = null, OneOf<double, (double, StopUnitType)> offset = null, 
    string id = null, Action<SVGStopElementBuilder> extend = null)
    where TBuilder : ISVGElementBuilder, IGradientStopElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder, facilitating fluent API usage.
builderThe SVG builder instance to which the ‘stop’ element will be added.
stopColorThe color at the stop. Optional parameter.
stopOpacityThe opacity at the stop. Optional parameter.
offsetThe offset of the stop within the gradient. Can be a double or a ValueTuple with StopUnitType. Optional parameter.
idThe unique identifier for the stop element. Optional parameter.
extendAn optional action to further configure the stop element builder.

Return Value

The builder instance, allowing for method chaining.

See Also


AddStop<TBuilder>(this TBuilder, Action<SVGStopElementBuilder>)

Adds a ‘stop’ element configuration to the builder for defining gradient stops.

public static TBuilder AddStop<TBuilder>(this TBuilder builder, 
    Action<SVGStopElementBuilder> configure)
    where TBuilder : ISVGElementBuilder, IGradientStopElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
configureThe configuration action for the ‘stop’ element.

Return Value

The builder instance for chaining.

See Also