形状またはチャートのグローエフェクトの操作
Contents
[
Hide
]
可能な使用シナリオ
Aspose.Cellsは、形状やチャートのグローエフェクトを操作するための Shape.Glow プロパティと GlowEffect クラスを提供しています。 GlowEffect クラスには、アプリケーションの要件に応じて異なる結果を得るために設定できる以下のプロパティが含まれています。
形状またはチャートのグローエフェクトの操作
以下のサンプルコードは、ソースエクセルファイル を読み込み、最初のワークシート内の最初の形状にアクセスし、Shape.Glow プロパティのサブプロパティを設定し、その後、ワークブックを 出力エクセルファイル に保存します。
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-.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 glow effect of the shape, Set its Size and Transparency properties | |
GlowEffect ge = sh.Glow; | |
ge.Size = 30; | |
ge.Transparency = 0.4; | |
// Save the workbook in xlsx format | |
wb.Save(dataDir + "output_out.xlsx"); |