SVGBuilderExtensions.AddRadialGradient

AddRadialGradient<TBuilder>(this TBuilder, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, CoordinateUnits?, SpreadMethod?, string, string, Action<SVGRadialGradientElementBuilder>)

Adds a ‘radialGradient’ element to the SVG builder, specifying its center, radius, and focal points, along with other gradient properties.

public static TBuilder AddRadialGradient<TBuilder>(this TBuilder builder, 
    OneOf<double, (double, LengthType)> cx = null, OneOf<double, (double, LengthType)> cy = null, 
    OneOf<double, (double, LengthType)> r = null, OneOf<double, (double, LengthType)> fx = null, 
    OneOf<double, (double, LengthType)> fy = null, CoordinateUnits? gradientUnits = default, 
    SpreadMethod? spreadMethod = default, string href = null, string id = null, 
    Action<SVGRadialGradientElementBuilder> extend = null)
    where TBuilder : ISVGElementBuilder, IShapeElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder, facilitating fluent API usage.
builderThe SVG builder instance to which the ‘radialGradient’ element will be added.
cxThe x-coordinate of the center of the gradient. Can be a double or a ValueTuple with LengthType. Optional parameter.
cyThe y-coordinate of the center of the gradient. Can be a double or a ValueTuple with LengthType. Optional parameter.
rThe radius of the gradient. Can be a double or a ValueTuple with LengthType. Optional parameter.
fxThe x-coordinate of the focal point of the gradient. Can be a double or a ValueTuple with LengthType. Optional parameter.
fyThe y-coordinate of the focal point of the gradient. Can be a double or a ValueTuple with LengthType. Optional parameter.
gradientUnitsSpecifies the coordinate system for the gradient. Optional parameter.
spreadMethodDefines how the gradient spreads beyond its start and end points. Optional parameter.
hrefThe reference to another gradient, if applicable. Optional parameter.
idThe unique identifier for the gradient element. Optional parameter.
extendAn optional action to further configure the radial gradient element builder.

Return Value

The builder instance, allowing for method chaining.

See Also


AddRadialGradient<TBuilder>(this TBuilder, Action<SVGRadialGradientElementBuilder>)

Adds a ‘radialGradient’ element configuration to the builder.

public static TBuilder AddRadialGradient<TBuilder>(this TBuilder builder, 
    Action<SVGRadialGradientElementBuilder> configure)
    where TBuilder : ISVGElementBuilder, IPaintServerElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
configureThe configuration action for the ‘radialGradient’ element.

Return Value

The builder instance for chaining.

See Also