private void InitDocument() { document.Style.TextStyle = new NTextStyle(new Font("Arial", 9), Color.Black); NGraphTemplate template; // create rectangular grid template template = new NRectangularGridTemplate(); template.Origin = new NPointF(10, 23); template.VerticesShape = BasicShapes.Rectangle; template.Create(document); // create tree template template = new NGenericTreeTemplate(); template.Origin = new NPointF(250, 23); template.VerticesShape = BasicShapes.Triangle; template.Create(document); // create elliptical grid template template = new NEllipticalGridTemplate(); template.Origin = new NPointF(10, 250); template.VerticesShape = BasicShapes.Ellipse; template.Create(document); // create a shape with a 1D shape which reflexes it NBasicShapesFactory factory = new NBasicShapesFactory(document); NShape shape = factory.CreateShape((int)BasicShapes.Rectangle); shape.Bounds = new NRectangleF(350, 350, 100, 100); document.ActiveLayer.AddChild(shape); NBezierCurveShape bezier = new NBezierCurveShape(); bezier.StyleSheetName = NDR.NameConnectorsStyleSheet; document.ActiveLayer.AddChild(bezier); bezier.FromShape = shape; bezier.ToShape = shape; bezier.Reflex(); }
private void InitDocument() { NGraphTemplate template; // create rectangular grid template template = new NRectangularGridTemplate(); template.Origin = new NPointF(10, 23); template.VerticesShape = BasicShapes.Rectangle; template.Create(document); // create tree template template = new NGenericTreeTemplate(); template.Origin = new NPointF(250, 23); template.VerticesShape = BasicShapes.Triangle; template.Create(document); // create elliptical grid template template = new NEllipticalGridTemplate(); template.Origin = new NPointF(10, 250); template.VerticesShape = BasicShapes.Ellipse; template.Create(document); }