図形またはグラフの影効果の操作

可能な使用シナリオ

Aspose.Cellsは、形状やチャートの影の効果を操作するための Shape.ShadowEffect プロパティと ShadowEffect クラスを提供しています。 ShadowEffect クラスには、アプリケーションの要件に応じて異なる結果を得るために設定できる以下のプロパティが含まれています。

図形またはグラフの影効果の操作

次のサンプルコードは、ソースエクセルファイルをロードし、最初のワークシートの最初の図形にアクセスして、Shape.ShadowEffectプロパティのサブプロパティを設定し、その後、ワークブックを出力エクセルファイル で保存します。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Load your source excel file
Workbook wb = new Workbook(dataDir + "sample.xlsx");
// Access first worksheet
Worksheet ws = wb.Worksheets[0];
// Access first shape
Shape sh = ws.Shapes[0];
// Set the shadow effect of the shape, Set its Angle, Blur, Distance and Transparency properties
ShadowEffect se = sh.ShadowEffect;
se.Angle = 150;
se.Blur = 4;
se.Distance = 45;
se.Transparency = 0.3;
// Save the workbook in xlsx format
wb.Save(dataDir + "output_out.xlsx");