図形またはチャートのグロー効果の操作
Contents
[
Hide
]
考えられる使用シナリオ
Aspose.Cells は、シェイプまたはチャートのグロー効果を操作するための Shape.Glow プロパティを提供します。これには、要件に応じてさまざまな結果を得るために設定できる次のサブ プロパティが含まれています。
- GlowEffect.Size
- GlowEffect.透明度
次のスクリーンショットは、シェイプのグロー効果を設定するための Microsoft Excel インターフェイスを示しています。
図形またはチャートのグロー効果の操作
次のサンプル コードは、ソースエクセルファイル最初のワークシートの最初の形状にアクセスし、Shape.Glow プロパティのサブ プロパティを設定してから、ワークブックを出力エクセルファイル.
サンプルコード
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
// 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"); |