形状またはチャートのグローエフェクトの操作
Contents
[
Hide
]
可能な使用シナリオ
Aspose.Cellsは、形状またはチャートのグローエフェクトを操作するためのShape.Glowプロパティを提供しています。あなたの要件に応じて異なる結果を得るために設定することができる以下のサブプロパティが含まれています。
- GlowEffect.Size
- GlowEffect.Transparency
次のスクリーンショットは、形状のグローエフェクトを設定するためのMicrosoft Excelインターフェイスを示しています。
形状またはチャートのグローエフェクトの操作
次のサンプルコードは、ソースエクセルファイルを読み込み、最初のワークシートの最初の図形にアクセスして、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-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getSharedDataDir(WorkingWithGlowEffect.class) + "articles/"; | |
// Load your source excel file | |
Workbook wb = new Workbook(dataDir + "WorkingWithGlowEffect_in.xlsx"); | |
// Access first worksheet | |
Worksheet ws = wb.getWorksheets().get(0); | |
// Access first shape | |
Shape sh = ws.getShapes().get(0); | |
// Set the glow effect of the shape | |
// Set its Size and Transparency properties | |
GlowEffect ge = sh.getGlow(); | |
ge.setSize(30); | |
ge.setTransparency(0.4); | |
// Save the workbook in xlsx format | |
wb.save(dataDir + "WorkingWithGlowEffect_out.xlsx"); |