SVGBuilderExtensions.AddPath

AddPath<TBuilder>(this TBuilder, OneOf<string, Action<PathBuilder>>, OneOf<Color, Paint, string>, OneOf<Color, Paint, string>, string, Action<SVGPathElementBuilder>)

Adds a ‘path’ element to the SVG builder, specifying its path data and styles.

public static TBuilder AddPath<TBuilder>(this TBuilder builder, 
    OneOf<string, Action<PathBuilder>> d, OneOf<Color, Paint, string> fill = null, 
    OneOf<Color, Paint, string> stroke = null, string id = null, 
    Action<SVGPathElementBuilder> 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 ‘path’ element will be added.
dA OneOf type that can either be a string representing the path data or an action that configures a PathBuilder.
fillThe fill color or paint style for the path. Can be a Color or a Paint enum value or paint server ID. Optional parameter.
strokeThe stroke color or paint style for the path. Can be a Color or a Paint enum value or paint server ID. Optional parameter.
idThe unique identifier for the path element. Optional parameter.
extendAn optional action to further configure the path element builder.

Return Value

The builder instance, allowing for method chaining.

See Also


AddPath<TBuilder>(this TBuilder, Action<PathBuilder>, OneOf<Color, Paint, string>, OneOf<Color, Paint, string>, string, Action<SVGPathElementBuilder>)

Overload of AddPath that takes an action to configure a PathBuilder directly.

public static TBuilder AddPath<TBuilder>(this TBuilder builder, Action<PathBuilder> d, 
    OneOf<Color, Paint, string> fill = null, OneOf<Color, Paint, string> stroke = null, 
    string id = null, Action<SVGPathElementBuilder> 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 ‘path’ element will be added.
dAn action that configures a PathBuilder to define the path data.
fillThe fill color or paint style for the path. Can be a Color or a Paint enum value or paint server ID. Optional parameter.
strokeThe stroke color or paint style for the path. Can be a Color or a Paint enum value or paint server ID. Optional parameter.
idThe unique identifier for the path element. Optional parameter.
extendAn optional action to further configure the path element builder.

Return Value

The builder instance, allowing for method chaining.

See Also


AddPath<TBuilder>(this TBuilder, Action<SVGPathElementBuilder>)

Adds a ‘path’ element configuration to the builder.

public static TBuilder AddPath<TBuilder>(this TBuilder builder, 
    Action<SVGPathElementBuilder> configure)
    where TBuilder : ISVGElementBuilder, IShapeElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
configureThe configuration action for the ‘path’ element.

Return Value

The builder instance for chaining.

See Also