Leggi il colore dell'effetto bagliore della forma
Contents
[
Hide
]
Possibili scenari di utilizzo
Se vuoi leggere il colore dell’effetto bagliore di qualsiasi forma, usa ilForma.Glow.Colorproprietà. Ti aiuterà a trovare le varie proprietà relative al colore dell’effetto bagliore applicato in una forma.
Leggi il colore dell’effetto bagliore della forma
Si prega di vedere il seguente codice di esempio e il suofile excel di origine l’output della console come riferimento. Lo screenshot seguente mostra l’effetto bagliore della forma all’interno del file excel di origine quando viene visualizzato in Microsoft Excel.
Java codice per leggere il colore dell’effetto bagliore della forma
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(ReadColorGlowEffect.class) + "DrawingObjects/"; | |
//Read the source excel file | |
Workbook wb = new Workbook(dataDir + "sourceGlowEffectColor.xlsx"); | |
//Access first worksheet | |
Worksheet ws = wb.getWorksheets().get(0); | |
//Access the shape | |
Shape sh = ws.getShapes().get(0); | |
//Read the glow effect color and its various properties | |
GlowEffect ge = sh.getGlow(); | |
CellsColor clr = ge.getColor(); | |
System.out.println("Color: " + clr.getColor()); | |
System.out.println("ColorIndex: " + clr.getColorIndex()); | |
System.out.println("IsShapeColor: " + clr.isShapeColor()); | |
System.out.println("Transparency: " + clr.getTransparency()); | |
System.out.println("Type: " + clr.getType()); |
Output della console generato dal codice di esempio
Ecco l’output della console del codice di esempio precedente quando eseguito con il file fornitofile excel di origine.
Color: com.aspose.cells.Color@deff0000
ColorIndex: 16711672
IsShapeColor: true
Transparency: 0.13
Type: 2