العمل مع تأثير الانعكاس للشكل أو المخطط مع Node.js عبر C++
سيناريوهات الاستخدام المحتملة
يوفر Aspose.Cells for Node.js via C++ الخاصية Shape.getReflection() بالإضافة إلى فئة ReflectionEffect للعمل مع تأثير الانعكاس للشكل أو المخطط. تحتوي فئة ReflectionEffect على الخصائص التالية والتي يمكن ضبطها لتحقيق نتائج مختلفة حسب متطلبات التطبيق.
- ReflectionEffect.getBlur()
- ReflectionEffect.getDirection()
- ReflectionEffect.getDistance()
- ReflectionEffect.getFadeDirection()
- ReflectionEffect.getRotWithShape()
- ReflectionEffect.getSize()
- ReflectionEffect.getTransparency()
- ReflectionEffect.getType()
العمل مع تأثير الانعكاس للشكل أو الرسم البياني
يقوم الرمز النموذجي التالي بتحميل ملف إكسل المصدر (5115424.xlsx) والوصول إلى الشكل الأول في ورقة العمل الافتراضية. يضبط خصائص مختلفة من فئة Shape.getReflection() ثم يحفظ دفتر العمل في ملف إكسل الإخراج (5115423.xlsx).
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Load your source excel file
const workbook = new AsposeCells.Workbook(path.join(dataDir, "sample.xlsx"));
// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);
// Access first shape
const shape = worksheet.getShapes().get(0);
// Set the reflection effect of the shape, set its Blur, Size, Transparency and Distance properties
const reflectionEffect = shape.getReflection();
reflectionEffect.setBlur(30);
reflectionEffect.setSize(90);
reflectionEffect.setTransparency(0);
reflectionEffect.setDistance(80);
// Save the workbook in xlsx format
workbook.save(path.join(dataDir, "output_out.xlsx"));