Word 문서에서 Group 셰이프 작업
때로는 Word 문서에 group shape를 추가해야 할 때가 있습니다. 이러한 group shape는 여러 모양으로 구성됩니다.
Microsoft Word에서는 Group 명령/버튼을 사용하여 group shape를 빠르게 추가할 수 있습니다. 그룹의 개별 도형은 개별적으로 이동할 수 있습니다.
Aspose.Words에서는 GroupShape 클래스를 사용하여 group shape를 추가하는 것이 매우 쉽습니다. Shape 클래스를 이용하여 별도로 Shape를 생성한 후 append_child 방식을 이용하여 GroupShape 객체에 추가합니다.
다음 코드 예제에서는 Word 문서에 group shape를 추가하는 방법을 보여줍니다
# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET | |
doc = aw.Document() | |
doc.ensure_minimum() | |
groupShape = aw.drawing.GroupShape(doc) | |
accentBorderShape = aw.drawing.Shape(doc, aw.drawing.ShapeType.ACCENT_BORDER_CALLOUT1) | |
accentBorderShape.width = 100 | |
accentBorderShape.height = 100 | |
groupShape.append_child(accentBorderShape) | |
actionButtonShape = aw.drawing.Shape(doc, aw.drawing.ShapeType.ACTION_BUTTON_BEGINNING) | |
actionButtonShape.left = 100 | |
actionButtonShape.width = 100 | |
actionButtonShape.height = 200 | |
groupShape.append_child(actionButtonShape) | |
groupShape.width = 200 | |
groupShape.height = 200 | |
groupShape.coord_size = drawing.Size(200, 200) | |
builder = aw.DocumentBuilder(doc) | |
builder.insert_node(groupShape) | |
doc.save(docs_base.artifacts_dir + "WorkingWithShapes.add_group_shape.docx") |
다음은 Aspose.Words에서 지원되는 Shape
유형 중 일부입니다. 전체 목록은 aspose.words.drawing.ShapeType 열거를 참조하세요