SVGBuilderExtensions.Rect

SVGBuilderExtensions.Rect<TBuilder> method

Sets the ‘x’, ‘y’, ‘width’, and ‘height’ attributes for an SVG element to define a rectangle.

public static TBuilder Rect<TBuilder>(this TBuilder builder, double x, double y, double width, 
    double height, LengthType type = LengthType.Px)
    where TBuilder : ISVGElementBuilder, IRectAttributeSetter
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
xThe x-coordinate of the rectangle.
yThe y-coordinate of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
typeThe type of length measurement for all dimensions (default is pixels).

Return Value

The builder instance for chaining.

See Also