使用addconnector(ShapeType, Single, Single, Single, Single) 方法創建連接器。 使用Connector.startshapeconnectedto 和 Connector.endshapeconnectedto 屬性加入形狀。 調用Connector.reroute() 方法創建最短的自動連接路徑。 最後,使用 Presentation.save(string, SaveFormat) 方法保存演示文稿。 以下代碼示例展示瞭如何...
使用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 ...
expression。BeginConnectedShape 表達代表ConnectorFormat 物件的變數。 傳回值 圖形 註解 如果所指定接點的起點並未附加至圖案,此屬性就會產生錯誤。 範例 本範例假設使用中簡報的第一張投影片已經包含名為 「Conn1To2」 之連接器所連接的兩個圖案。程式碼會將矩形和連接器新增至第一張投影片。 新增的連接線的起...
Thank you! Hi, I think there were some other open-source libraries, like this Python pptx library that I tried which includes some connector support: However, the implementation does not seem to be complete, see here: I also needed to control the path of the ...
一个接口,用于描述通过调用shapeCollection.toJSON()返回的数据。 PowerPoint.Interfaces.ShapeCollectionLoadOptions 表示形状的集合。 PowerPoint.Interfaces.ShapeCollectionUpdateData 用于更新对象上的ShapeCollection数据的接口,用于 在 中使用shapeCollection.set({ ... })。
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. ...
const line: PowerPoint.Shape = shapes.addLine(PowerPoint.ConnectorType.straight, { left: 400, top: 200, height: 20, width: 150 }); line.name = "StraightLine"; await context.sync(); }); 字段 展开表 curve = "Curve" 曲线连接线类型 [ API 集:PowerPointApi 1.4 ] elbow = "Elbow"...