FrameTickEventArgs

Inheritance: java.lang.Object

public class FrameTickEventArgs

Represents arguments of the PresentationPlayer.FrameTick event.


Presentation pres = new Presentation("pres.pptx");
 try {
     PresentationAnimationsGenerator animationsGenerator = new PresentationAnimationsGenerator(pres);
     try {
         PresentationPlayer player = new PresentationPlayer(animationsGenerator, 33);
         try {
             final int[] frameNumber = {0};
             player.setFrameTick((sender, args) -> {
                 args.getFrame().save(String.format("frame_%d.png", frameNumber[0]++));
             });
             animationsGenerator.run(pres.getSlides());
         } finally {
             if (player != null) player.dispose();
         }
     } finally {
         if (animationsGenerator != null) animationsGenerator.dispose();
     }
 } finally {
     if (pres != null) pres.dispose();
 }

Methods

MethodDescription
getPlayer()Get the presentation player
getFrame()Get the current PresentationPlayer frame.

getPlayer()

public final PresentationPlayer getPlayer()

Get the presentation player

Returns: PresentationPlayer

getFrame()

public final IImage getFrame()

Get the current PresentationPlayer frame.


Presentation pres = new Presentation("pres.pptx");
 try {
     PresentationAnimationsGenerator animationsGenerator = new PresentationAnimationsGenerator(pres);
     try {
         PresentationPlayer player = new PresentationPlayer(animationsGenerator, 33);
         try {
             final int[] frameNumber = {0};
             player.setFrameTick((sender, args) -> {
                 args.getFrame().save(String.format("frame_%d.png", frameNumber[0]++));
             });
             animationsGenerator.run(pres.getSlides());
         } finally {
             if (player != null) player.dispose();
         }
     } finally {
         if (animationsGenerator != null) animationsGenerator.dispose();
     }
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: IImage