SVGImageElementBuilder Class

SVGImageElementBuilder class

Builder class for constructing an SVG ‘image’ element. This element is used to embed images within SVG graphics. It provides methods to set various attributes specific to the ‘image’ element and to add additional configurations like clip paths, masks, styles, and scripts.

public class SVGImageElementBuilder : SVGElementBuilder<SVGImageElement>, IAnimationElementBuilder, 
    ICompositeAttributeSetter, IDescriptiveElementBuilder, IPreserveAspectRatioAttributeSetter, 
    IRectAttributeSetter

Constructors

NameDescription
SVGImageElementBuilder()The default constructor.

Properties

NameDescription
Configurations { get; }

Methods

NameDescription
AddClipPath(Action<SVGClipPathElementBuilder>)Adds a clip path configuration to the SVG ‘image’ element.
AddMask(Action<SVGMaskElementBuilder>)Adds a mask configuration to the SVG ‘image’ element.
AddScript(Action<SVGScriptElementBuilder>)Adds a script configuration to the SVG ‘image’ element.
AddStyle(Action<SVGStyleElementBuilder>)Adds a style configuration to the SVG ‘image’ element.
Attribute(string, string)
virtual Build(Document)
virtual Build(SVGImageElement)
BuildElement(Document)
Href(string)Sets the ‘href’ attribute of the SVG ‘image’ element, specifying the URL of the image to be embedded.
HrefBase64FromBytes(byte[], string)Sets the ‘href’ attribute of the SVG ‘image’ element using base64 encoded bytes of an image.
HrefBase64FromFile(string)Sets the ‘href’ attribute of the SVG ‘image’ element using a base64 encoded image file.
HrefBase64FromFile(string, string)Sets the ‘href’ attribute of the SVG ‘image’ element using a base64 encoded image file with a specified MIME type.

See Also