Şekil veya Grafik Gölgelendirme Efekti Çalışmak
Olası Kullanım Senaryoları
Aspose.Cells, şekil veya grafik ışıltı efekti ile çalışmak için Shape.Glow özelliğini sağlar. İhtiyaçlarınıza göre farklı sonuçlar elde etmek için ayarlayabileceğiniz aşağıdaki alt özellikleri içerir.
- GlowEffect.Size
- GlowEffect.Transparency
Aşağıdaki ekran görüntüsü, Microsoft Excel arayüzünü şekil ışıltı efektini ayarlamak için gösterir.
Şekil veya Grafik Gölgelendirme Efekti Çalışmak
Aşağıdaki örnek kod, kaynak excel dosyasını yükler ve ilk çalışma sayfasındaki ilk şekle erişir ve Shape.Glow özelliğinin alt özelliklerini ayarlar ve ardından workbook’u çıkış excel dosyasına kaydeder.
Örnek Kod
// 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"); |