public interface IPresentationAnimationPlayer
Represents a player of the animation.
Presentation presentation = new Presentation("animated.pptx"); try { PresentationAnimationsGenerator animationsGenerator = new PresentationAnimationsGenerator(presentation.getSlideSize().getSize()); { animationsGenerator.setNewAnimation(animationPlayer -> { System.out.println(String.format("Animation total duration: %f", animationPlayer.getDuration())); animationPlayer.setTimePosition(0); animationPlayer.getFrame().save("firstFrame.png"); animationPlayer.setTimePosition(animationPlayer.getDuration()); animationPlayer.getFrame().save("lastFrame.png"); }); animationsGenerator.run(presentation.getSlides()); } } finally { if (presentation != null) presentation.dispose(); }
PresentationAnimationsGenerator via its PresentationAnimationsGenerator.NewAnimation event.
| Modifier and Type | Method and Description |
|---|---|
double |
getDuration()
Get animation duration [ms]
|
IImage |
getFrame()
Get the frame for the current time position previously set with the
setTimePosition(double) method. |
void |
setTimePosition(double time)
Set the animation time position within the
Duration(getDuration()). |
double getDuration()
Get animation duration [ms]
void setTimePosition(double time)
Set the animation time position within the Duration(getDuration()).
time - Time position.IImage getFrame()
Get the frame for the current time position previously set with the setTimePosition(double) method.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.