Hi,
Recently, I have upgraded Aspose.Diagram to version 18.11 from version 16.11. Since then, I am facing text wrapping issue on the diagram.
Here is the code snippet:
currentShape.Text.Value.Clear();
currentShape.Chars.Clear();
currentShape.TextBlock.TextDirection.Value = TextDirectionValue.Horizontal;
currentShape.TextBlock.VerticalAlign.Value = VerticalAlignValue.Middle;
currentShape.Text.Value.Add(new Cp(0));
currentShape.Text.Value.Add(new Txt(“Shelf\r\nPartNumber Description”));
currentShape.Chars.Add(new Aspose.Diagram.Char());
currentShape.Chars[0].IX = 0;
currentShape.Chars[0].Color.Value = color;
currentShape.Chars[0].Font.Value = 3;
currentShape.Chars[0].Style.Value = StyleValue.Bold;
currentShape.TextXForm.TxtWidth.Value = currentShape.XForm.Width.Value;
currentShape.TextXForm.TxtPinX.Ufe.F = “Width*0.5”;
The text “Shelf\r\nPartNumber Description” comes in 3 lines like
Shelf
PartNumber
Description
The same code works perfect with version 16.11. like
Shelf
PartNumber Description
What is the reason for wrapping of the text in the new dll version?
Please suggest
Thanks,
Sharanya