الحصول على نقاط الاتصال من الشكل
Contents
[
Hide
]
تقدم Aspose.Cells ميزات غنية لإدارة الأشكال في جدول البيانات. في بعض الأحيان هناك حاجة للحصول على نقاط الاتصال من شكل ما من أجل محاذاته أو وضعه في المكان المناسب. لهذا الغرض، تُطلب كافة نقاط الاتصال. يمكن استخدام الكود التالي للحصول على قائمة نقاط الاتصال من الشكل حيث يتم استخدام الدالة Shape.GetConnectionPoints().
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Instantiate a new Workbook. | |
Workbook workbook = new Workbook(); | |
// Get the first worksheet in the book. | |
Worksheet worksheet = workbook.getWorksheets().get(0); | |
// Add a new textbox to the collection. | |
int textboxIndex = worksheet.getTextBoxes().add(2, 1, 160, 200); | |
// Access your text box which is also a shape object from shapes collection | |
Shape shape = workbook.getWorksheets().get(0).getShapes().get(0); | |
// Get all the connection points in this shape | |
zo[] ConnectionPoints = shape.getConnectionPoints(); |