SVGBuilderExtensions.AddStop
Contents
[
Hide
]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
Parameter | Description |
---|---|
TBuilder | The type of the SVG element builder, facilitating fluent API usage. |
builder | The SVG builder instance to which the ‘stop’ element will be added. |
stopColor | The color at the stop. Optional parameter. |
stopOpacity | The opacity at the stop. Optional parameter. |
offset | The offset of the stop within the gradient. Can be a double or a ValueTuple with StopUnitType. Optional parameter. |
id | The unique identifier for the stop element. Optional parameter. |
extend | An optional action to further configure the stop element builder. |
Return Value
The builder instance, allowing for method chaining.
See Also
- class OneOf<T1,T2>
- enum StopUnitType
- class SVGStopElementBuilder
- interface ISVGElementBuilder
- interface IGradientStopElementBuilder
- class SVGBuilderExtensions
- namespace Aspose.Svg.Builder
- assembly Aspose.SVG
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
Parameter | Description |
---|---|
TBuilder | The type of the SVG element builder. |
builder | The builder instance. |
configure | The configuration action for the ‘stop’ element. |
Return Value
The builder instance for chaining.
See Also
- class SVGStopElementBuilder
- interface ISVGElementBuilder
- interface IGradientStopElementBuilder
- class SVGBuilderExtensions
- namespace Aspose.Svg.Builder
- assembly Aspose.SVG