Şekil veya Grafik Gölgelendirme Efekti Çalışmak
Olası Kullanım Senaryoları
Aspose.Cells, Shape.ShadowEffect özelliği ve ShadowEffect sınıfını kullanarak şekil veya grafik gölgelendirme efektiyle çalışmak için sağlar. ShadowEffect sınıfı, aşağıdaki özellikleri içerir ve uygulama gereksinimlerine göre farklı sonuçlar elde etmek için bu özellikler ayarlanabilir.
Şekil veya Grafik Gölgelenme Efekti ile Çalışma
Aşağıdaki örnek kod, kaynak excel dosyasını yükler ve ilk çalışma sayfasındaki ilk şekle erişir ve Shape.ShadowEffect özelliğinin alt özelliklerini ayarlar ve ardından çalışma kitabını çıktı excel dosyasına kaydeder.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Load your source excel file | |
Workbook wb = new Workbook(dataDir + "sample.xlsx"); | |
// Access first worksheet | |
Worksheet ws = wb.Worksheets[0]; | |
// Access first shape | |
Shape sh = ws.Shapes[0]; | |
// Set the shadow effect of the shape, Set its Angle, Blur, Distance and Transparency properties | |
ShadowEffect se = sh.ShadowEffect; | |
se.Angle = 150; | |
se.Blur = 4; | |
se.Distance = 45; | |
se.Transparency = 0.3; | |
// Save the workbook in xlsx format | |
wb.Save(dataDir + "output_out.xlsx"); |