使用addconnector(ShapeType, Single, Single, Single, Single) 方法創建連接器。 使用Connector.startshapeconnectedto 和 Connector.endshapeconnectedto 屬性加入形狀。 調用Connector.reroute() 方法創建最短的自動連接路徑。 最後,使用 Present
使用Presentation.getSlides().get_Item(0).getShapes()方法将形状的集合获取到IShapeCollection对象中。 使用IShapeCollection.addAutoShape(ShapeType.Ellipse,float,float,float,float)方法添加两个形状,并在IAutoShape对象中获取它们的引用。 使用IShapeCollection.addConnector(ShapeType.BentConnector2,float,float,float...
(ShapeType::BentConnector2, 0, 0, 10, 10); // 使用連接器連接形狀 connector->set_StartShapeConnectedTo(ellipse); connector->set_EndShapeConnectedTo(rectangle); // 調用 reroute 設置形狀之間的自動最短路徑 connector->Reroute(); // 保存演示文件 presentation->Save(outputFilePath, Aspose::Slides...
使用Shapes.Title返回代表幻灯片标题的Shape对象。 使用Shapes.AddTitle在无标题的幻灯片中添加标题并返回代表新建标题的Shape对象。 使用Shapes.Placeholders(索引) ,其中index是占位符的索引号,可返回代表占位符的Shape对象。 如果没有改变过幻灯片上形状的排列顺序,则以下三个语句是等效的(假定第一张幻灯片有标题)。
Create()) { // Add a slide to the PowerPoint file. ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank); //Add a rectangle shape on the slide IShape rectangle = slide.Shapes.AddShape(AutoShapeType.Rectangle, 420, 250, 100, 100); //Add connector with specified bounds IConnector ...
https://python-pptx.readthedocs.io/en/latest/dev/analysis/shp-connector.html I also needed to control the path of the line in my use case, which was also not straightforward to implement, so I did not persist much further. Hope that is helpful!
第一个参数是 ConnectorType 枚举或等效于枚举值之一的字符串,用于指定端点之间的换行方式。 ShapeAddOptions 类型的第二个可选参数可以指定线条的起点和终点。 或者,可以在创建形状后设置这些属性。 方法返回 对象 Shape。 备注 当形状是线条时,top和 对象的 和 leftShapeAddOptions 属性Shape指定相对于幻灯片的上...
To make the joint of a connector and a shape more clear, we can add connection points. 1. Open your PowerPoint in WPS Office. 2. Select the connector, and you can see four icons appear on the right of the shape. 3. Click theShape Outlineicon >Arrow Style. Then we can change its ...
用于更新对象上的 ShapeFill 数据的接口,用于 在 中使用 shapeFill.set({ ... })。 PowerPoint.Interfaces.ShapeFontData 一个接口,用于描述通过调用 shapeFont.toJSON()返回的数据。 PowerPoint.Interfaces.ShapeFontLoadOptions 表示形状的 TextRange 对象的字体属性,例如字体名称、字号和颜色。 PowerPoint.Interfa...
If we added connector lines to the shapes above, this is how it would look: To add connector lines: Go to AutoShapes on the Drawing toolbar. Select Connectors. You'll see the pop up menu below: Select the type of connector line that you want to use. ...