c# - 如何通过 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(@"مدیر مجموعه"));**
解决方案
推荐阅读
- google-cloud-firestore - 在 Firestore 中,是否可以将用户集合中的文档的 documentID 设置为用户的 uid?
- r - 计算投资组合周转率
- sql - 派生列的动态列名 - ORACLE SQL
- typescript - typescript - 类实例的默认值
- java - 当具有固定线程池的执行器服务与 Kafka 侦听器一起使用时,线程将从队列中删除
- javascript - 对齐图标二级菜单
- python - Python 2 中的 Python 3 sys.stdout.fileno() 等价物是什么?
- jquery - NaN 结果计算距离
- google-cloud-dataflow - Apache Beam:在实例内的所有线程之间共享资源
- javascript - 如何在将模式与 Apollo GraphQL 合并时将变量添加到片段