Inchiostro
Contents
[
Hide
]
Questo articolo fornisce esempi di accesso a forme di inchiostro esistenti e rimozione delle stesse utilizzando Aspose.Slides for Android via Java.
❗ Nota: Le forme di inchiostro rappresentano l’input dell’utente da dispositivi specializzati. Aspose.Slides non può creare nuove pennellate di inchiostro programmaticamente, ma è possibile leggere e modificare gli inchiostri esistenti.
Accesso all’inchiostro
Leggi i tag dalla prima forma di inchiostro in una diapositiva.
static void accessInk() {
Presentation presentation = new Presentation("ink.pptx");
try {
ISlide slide = presentation.getSlides().get_Item(0);
IShape shape = slide.getShapes().get_Item(0);
if (shape instanceof IInk) {
IInk inkShape = (IInk) shape;
ITagCollection tags = inkShape.getCustomData().getTags();
if (tags.size() > 0) {
String tagName = tags.getNameByIndex(0);
// Usa tagName secondo necessità.
}
}
} finally {
presentation.dispose();
}
}
Rimuovi l’inchiostro
Elimina una forma di inchiostro dalla diapositiva se ne esiste una.
static void removeInk() {
Presentation presentation = new Presentation("ink.pptx");
try {
ISlide slide = presentation.getSlides().get_Item(0);
IInk ink = null;
for (IShape shape : slide.getShapes()) {
if (shape instanceof IInk) {
ink = (IInk) shape;
break;
}
}
if (ink != null) {
slide.getShapes().remove(ink);
}
} finally {
presentation.dispose();
}
}