Lavorare con l Effetto Ombra di una Forma o di un Grafico

Possibili Scenari di Utilizzo

Aspose.Cells fornisce la proprietà Shape.ShadowEffect per lavorare con l’effetto ombra di una forma o di un grafico. Contiene le seguenti sottoproprietà che è possibile impostare per ottenere risultati diversi in base alle proprie esigenze.

La seguente schermata mostra l’interfaccia di Microsoft Excel per impostare l'Effetto Ombra della forma.

todo:image_alt_text

Lavorare con l’Effetto Ombra della forma o del grafico

Il seguente codice di esempio carica il file Excel di origine e accede alla prima forma nella prima scheda e imposta le sottoproprietà della proprietà Shape.ShadowEffect e quindi salva il documento di lavoro nel file Excel di output.

Codice di Esempio

// 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(WorkingWithShadowEffect.class) + "articles/";
// Loads the workbook which contains hidden external links
Workbook wb = new Workbook(dataDir + "WorkingWithShadowEffect_in.xlsx");
// Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
// Access first shape
Shape sh = ws.getShapes().get(0);
// Set the shadow effect of the shape
// Set its Angle, Blur, Distance and Transparency properties
ShadowEffect se = sh.getShadowEffect();
se.setAngle(150);
se.setBlur(4);
se.setDistance(45);
se.setTransparency(0.3);
// Save the workbook in xlsx format
wb.save(dataDir + "WorkingWithShadowEffect_out.xlsx");