Tinta
Contents
[
Hide
]
Este artigo fornece exemplos de como acessar formas de tinta existentes e removê-las usando Aspose.Slides for Android via Java.
❗ Nota: Formas de tinta representam a entrada do usuário de dispositivos especializados. O Aspose.Slides não pode criar novos traços de tinta programaticamente, mas você pode ler e modificar a tinta existente.
Acessar Tinta
Leia as tags da primeira forma de tinta em um slide.
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);
// Use tagName conforme necessário.
}
}
} finally {
presentation.dispose();
}
}
Remover Tinta
Exclua uma forma de tinta do slide, se existir.
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();
}
}