SVGBuilderExtensions.SetPreserveAspectRatio

SVGBuilderExtensions.SetPreserveAspectRatio<TBuilder> method

Sets the ‘preserveAspectRatio’ attribute for an SVG element.

public static TBuilder SetPreserveAspectRatio<TBuilder>(this TBuilder builder, 
    AspectRatioAlign align, AspectRatioScaling meetOrSlice = AspectRatioScaling.Meet)
    where TBuilder : ISVGElementBuilder, IPreserveAspectRatioAttributeSetter
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
alignThe alignment setting for the aspect ratio.
meetOrSliceSpecifies how an aspect ratio is preserved (default is ‘Meet’).

Return Value

The builder instance for chaining.

See Also