Hi,
You haven't specified whether this is a WinForm or a WebForm project. If it is a WinForm project, then to create a shape and place it on the clicked position in the drawing view you should subscribe to the MouseDown event of the drawing view and in the event handler you should hit test the drawing document to check whether the user has clicked on a free position and then create and add a shape to the document if he has. Here's a simple implementation:
private void OnViewMouseDown(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left)
return;
NPointF location = new NPointF(e.Location);
NNodeList shapes = view.Document.HitTest(location, -1, NFilters.Shape2D, view.ProvideDocumentHitTestContext());
if (shapes.Count == 0)
{
// Create a circle shape and place it on the clicked position
location = view.SceneToDevice.InvertPoint(new NPointF(e.Location));
NShape shape = new NEllipseShape(location.X - 30, location.Y - 30, 60, 60);
view.Document.ActiveLayer.AddChild(shape);
}
}
If you want an image, you can simply apply an image fill style (or even better use a style sheet) to the newly created shape.
Best Regards,
Nevron Support Team