図形またはグラフの反射効果の操作
Contents
[
Hide
]
可能な使用シナリオ
Aspose.Cells for Python via .NETは、Shape.reflectionプロパティとReflectionEffectクラスを提供して、シェイプやチャートの反射効果を操作します。ReflectionEffectクラスには、さまざまな結果を得るために設定可能な以下のプロパティがあります。
図形またはグラフの反射効果の操作
次のサンプルコードは、source excel fileを読み込み、最初のシートの最初のシェイプにアクセスし、Shape.reflectionのさまざまなプロパティを設定し、その後ワークブックを出力excel fileに保存します。
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(".") | |
# Load your source excel file | |
wb = Workbook(dataDir + "sample.xlsx") | |
# Access first worksheet | |
ws = wb.worksheets[0] | |
# Access first shape | |
sh = ws.shapes[0] | |
# Set the reflection effect of the shape, set its Blur, Size, Transparency and Distance properties | |
re = sh.reflection | |
re.blur = 30.0 | |
re.size = 90.0 | |
re.transparency = 0.0 | |
re.distance = 80.0 | |
# Save the workbook in xlsx format | |
wb.save(dataDir + "output_out.xlsx") |