Nevron Open Vision Documentation
Common Shape Factory Features

All shape factories share a common set of features implemented by the abstract NShapesFactory class, which is the base class for all types of shape factories. Following is a brief summary:

You can also obtain information about the shape at a specified index with the help of the GetShapeInfo method - returns an instance of the NShapeInfo class.

A shape from a shape factory can be created with the help of the CreateShape method. The one and only parameter is the index of the shape which must be created. The following code example creates a pentagram shape:

Creating Shapes
Copy Code
// Create a pentagram 
NBasicShapesFactory factory = new NBasicShapesFactory();
NShape shape = factory.CreateShape(ENBasicShapes.Pentagram);

A shape factory can easily generate a library document. This is achieved with the help of the CreateLibrary method.

Send Feedback