Search
Factory.CreateSvgNode Method (PointF, SizeF, SvgContent)
See Also
 





Creates a new SvgNode instance at the specified position with the specified size and adds it to the Nodes collection of the underlying diagram.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public SvgNode CreateSvgNode (
    PointF location,
    SizeF size,
    SvgContent content
)

Visual Basic  Copy Code

Public Function CreateSvgNode( _
    location As PointF, _
    size As SizeF, _
    content As SvgContent _
) As SvgNode

 Parameters

location

The position of the new node.

size

The size of the new node.

content

The content of the new node.

 Return Value

The newly created SvgNode instance.

 Remarks

The method creates an SVG node at the position specified by location. The size of the node is set by size.

 Example

The following example illustrates how to create new SvgContent from an SVG file and how to create an SvgNode based on this content. The variable diagram references an existing Diagram object and fileName contains the name of the SVG file to load.

C#  Copy Code

SvgNode node = diagram.Factory.CreateSvgNode(0, 0, 20, 20);

SvgContent content = new SvgContent();
content.Parse(fileName);

node.Content = content;

Visual Basic  Copy Code

Dim node As SvgNode = diagram.Factory.CreateSvgNode(0, 0, 20, 20)

Dim content As New SvgContent()
content.Parse(fileName)

node.Content = content

 See Also