Sha256: 6fc42fec4fa606ce803e9d1c5d68c5282e39ff6f0217da433516eddd99349e6d

Contents?: true

Size: 1001 Bytes

Versions: 2

Compression:

Stored size: 1001 Bytes

Contents

module Asposeslidesjava
  module Transitions
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate Presentation class that represents the presentation file
        pres = Rjb::import('com.aspose.slides.Presentation').new(data_dir + 'demo.pptx')

        transition_type = Rjb::import('com.aspose.slides.TransitionType')

        # Apply circle type transition on slide 1
        pres.getSlides().get_Item(0).getSlideShowTransition().setType(transition_type.Circle)

        # Apply comb type transition on slide 2
        pres.getSlides().get_Item(1).getSlideShowTransition().setType(transition_type.Comb)

        # Saving the presentation
        save_format = Rjb::import('com.aspose.slides.SaveFormat')
        pres.save(data_dir + "SimpleTransition.pptx", save_format.Pptx)

        puts "Done with simple transition, please check the output file."
    end    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asposeslidesjava-0.0.2 lib/asposeslidesjava/Slides/transitions.rb
asposeslidesjava-0.0.1 lib/asposeslidesjava/Slides/transitions.rb