Lavorare con l effetto di riflessione di forma o grafico con Node.js tramite C++
Possibili Scenari di Utilizzo
Aspose.Cells for Node.js via C++ fornisce la proprietà Shape.getReflection() insieme alla classe ReflectionEffect per lavorare con l’effetto di riflessione di forma o grafico. La classe ReflectionEffect contiene le seguenti proprietà che possono essere impostate per ottenere risultati diversi in base alle esigenze dell’applicazione.
- ReflectionEffect.getBlur()
- ReflectionEffect.getDirection()
- ReflectionEffect.getDistance()
- ReflectionEffect.getFadeDirection()
- ReflectionEffect.getRotWithShape()
- ReflectionEffect.getSize()
- ReflectionEffect.getTransparency()
- ReflectionEffect.getType()
Lavorare con l’Effetto Riflessione di una Forma o di un Grafico
Il seguente esempio di codice carica il file excel di origine e accede alla prima forma nel foglio di lavoro predefinito. Imposta proprietà diverse della classe Shape.getReflection() e poi salva il workbook nel file excel di output.
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"));