Şeklin Zırhlanma Efektinin Rengini Oku
Olası Kullanım Senaryoları
Herhangi bir şeklin ışıltı efektinin rengini okumak istiyorsanız, lütfen Shape.Glow.Color özelliğini kullanın. Bu, bir şekle uygulanan ışıltı efektinin rengi ile ilgili çeşitli özellikleri bulmanıza yardımcı olacaktır.
Şeklin Parlama Efektinin Rengini Oku
Lütfen aşağıdaki örnek kodu ve kaynak excel dosyası ile ilgili konsol çıktısını görün. Aşağıdaki ekran görüntüsü, Microsoft Excel’de görüntülendiğinde kaynak excel dosyasındaki şeklin ışıltı efektini gösterir.
Şeklin Işıltı Efektinin Rengini Okumak için Java Kodu
// 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()); |
Örnek Kod Tarafından Oluşturulan Konsol Çıktısı
Yukarıdaki örnek kodun, sağlanan kaynak excel dosyası ile yürütüldüğünde konsol çıktısı aşağıdaki gibidir.
Color: com.aspose.cells.Color@deff0000
ColorIndex: 16711672
IsShapeColor: true
Transparency: 0.13
Type: 2