قراءة لون تأثير إضاءة الشكل

سيناريوات الاستخدام المحتملة

إذا كنت ترغب في قراءة لون تأثير الإضاءة لأي شكل، يرجى استخدام الخاصية Shape.Glow.Color. ستساعدك في العثور على الخصائص المتعلقة بلون تأثير الإضاءة للشكل.

قراءة لون تأثير الإضاءة للشكل

يرجى الاطلاع على الكود النموذجي التالي وملف الإكسل الأصلي وإخراج الكونسول للرجوع إلى. تظهر اللقطة الشاشة التالية تأثير الاضاءة للشكل داخل ملف الإكسل الأصلي عند عرضه في Microsoft Excel.

todo:image_alt_text

الكود C# لقراءة لون تأثير إضاءة الأشكال

// 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);
// Read the source excel file
Workbook book = new Workbook(dataDir + "sourceGlowEffectColor.xlsx");
// Access first worksheet
Worksheet sheet = book.Worksheets[0];
// Access the shape
Shape shape = sheet.Shapes[0];
// Read the glow effect color and its various properties
GlowEffect effect = shape.Glow;
CellsColor color = effect.Color;
Console.WriteLine("Color: " + color.Color);
Console.WriteLine("ColorIndex: " + color.ColorIndex);
Console.WriteLine("IsShapeColor: " + color.IsShapeColor);
Console.WriteLine("Transparency: " + color.Transparency);
Console.WriteLine("Type: " + color.Type);

مخرج الكونسول

إليك إخراج الكونسول للرمز النموذجي أعلاه عند تنفيذه مع ملف الإكسل الأصلي المقدم.

Color: Color [A=222, R=255, G=0, B=0]

ColorIndex: 16711672

IsShapeColor: True

Transparency: 0.13

Type: RGB