シェイプの調整値の変更
Contents
[
Hide
]
Aspose.Cells for Python via .NETは、Shapeの調整ポイントを変更するための Shape.geometry.shape_adjust_values プロパティを提供します。Microsoft Excel UIでは、調整は黄色のダイヤモンドノードとして表示されます。例:
- 角丸四角形は、円弧を変更するための調整があります
- 三角形は、ポイントの位置を変更するための調整があります
- 台形は、上部の幅を変更するための調整があります
- 矢印には、頭部と末尾の形状を変更するための2つの調整があります
この記事では、異なるシェイプの調整値を変更するための Shape.geometry.shape_adjust_values プロパティの使用方法について説明します。
以下のコードサンプルは、シェイプの調整値を変更する方法を示しています。
This file contains hidden or 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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Create workbook object from source excel file | |
workbook = Workbook(dataDir + "source.xlsx") | |
# Access first worksheet | |
worksheet = workbook.worksheets[0] | |
# Access first three shapes of the worksheet | |
shape1 = worksheet.shapes[0] | |
shape2 = worksheet.shapes[1] | |
shape3 = worksheet.shapes[2] | |
# Change the adjustment values of the shapes | |
shape1.geometry.shape_adjust_values[0].value = 0.5 | |
shape2.geometry.shape_adjust_values[0].value = 0.8 | |
shape3.geometry.shape_adjust_values[0].value = 0.5 | |
# Save the workbook | |
workbook.save(dataDir + "output_out.xlsx") |