首页 > 解决方案 > 如何通过 aspose.diagram 将文本的方向更改为 rtl

问题描述

我使用以下代码来更改文本的方向,但它们都不能正常工作。

//----------------------------------------------------------------The first way
var layOptions = new Aspose.Diagram.AutoLayout.LayoutOptions();
**layOptions.Direction = Aspose.Diagram.AutoLayout.LayoutDirection.RightToLeft;**
layOptions.EnlargePage = true;
layOptions.LayoutStyle = Aspose.Diagram.AutoLayout.LayoutStyle.FlowChart;
layOptions.SpaceShapes = 1;
diagram.Layout(layOptions);
//----------------------------------------------------------------The second way
string rectangleMaster = @"Rectangle";
int pageNumber = 0;
double width = 2, height = 2, pinX = 4.25, pinY = 9.5;
long rectangleId = diagram.AddShape(
    pinX, pinY, width, height, rectangleMaster, pageNumber);
Shape shape = diagram.Pages[pageNumber].Shapes.GetShape(rectangleId);
shape.Text.Value.Clear();
shape.Chars.Clear();
shape.Chars.Add(new Aspose.Diagram.Char());
**shape.Chars[0].RTLText.Value = BOOL.True;**
**shape.Text.Value.Add(new Txt(@"مدیر مجموعه"));**

标签: c#right-to-leftvisioaspose

解决方案


推荐阅读