In the diagram generated by the following code, when saved in .VSDX or .EMF, the text in “Start 7”, and “Circle” shapes is not centered. Can you help to check and fix ?
// http://www.aspose.com/docs/display/diagramnet/Create+a+New+Diagram
// https://github.com/aspose-diagram/Aspose.Diagram-for-.NET/tree/master/Examples/Data/Knowledge-Base
// https://forum.aspose.com/t/4882
public static void Test1()
{
// Create a new diagram, Basic Shapes.vss is from aspose github
Diagram diagram = new Diagram(@"Basic Shapes.vss", LoadFileFormat.VSS);
// Add a new rectangle shape
long shapeId = diagram.AddShape(4.25, 5.5, 2, 1, @"Rectangle", 0);
Shape shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@"Rectangle text."));
// Add a new star shape
shapeId = diagram.AddShape(2.0, 5.5, 2, 2, @"Star 7", 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@"Star text."));
// Add a new hexagon shape
shapeId = diagram.AddShape(7.0, 5.5, 2, 2, @"Hexagon", 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@"Hexagon text."));
// Add a new circle shape
shapeId = diagram.AddShape(2.0, 2.5, 2, 2, @"Circle", 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
shape.Text.Value.Add(new Txt(@"Circle 1."));
// Add a new circle shape
shapeId = diagram.AddShape(2.0, 8.0, 2, 2, @"Circle", 0);
shape = diagram.Pages[0].Shapes.GetShape(shapeId);
Para para = new Para();
para.IX = shape.Paras.Add(para);
para.HorzAlign.Value = HorzAlignValue.Center;
shape.Text.Value.Add(new Txt(@"Circle 2."));
// Save the new diagram
// Bug: In .vsdx and .emf, the text in "Start 7", and "Circle" shapes is not centered.
string outputDiagramPath = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + "." + System.Reflection.MethodBase.GetCurrentMethod().Name;
diagram.Save(outputDiagramPath + ".vsdx", SaveFileFormat.VSDX);
diagram.Save(outputDiagramPath + ".vdx", SaveFileFormat.VDX);
diagram.Save(outputDiagramPath + ".emf", SaveFileFormat.EMF);
}