Sha256: 7aa378e43258dc5e41ac781516a9c3f091cc817faf448d5670d77a51d64c2104

Contents?: true

Size: 919 Bytes

Versions: 2

Compression:

Stored size: 919 Bytes

Contents

module Asposeslidesjava
  module AddSmartArt
    def initialize()
        # Creating a SmartArt Shape
        create_smartart_shape()
    end    
    
    def create_smartart_shape()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Create an instance of Presentation class
        pres = Rjb::import('com.aspose.slides.Presentation').new

        # Get the first slide
        slide = pres.getSlides().get_Item(0)

        # Add Smart Art Shape
        smart = slide.getShapes().addSmartArt(0, 0, 400, 400, Rjb::import('com.aspose.slides.SmartArtLayoutType').BasicBlockList)

        # Write the presentation as a PPTX file  
        pres.save(data_dir + "SimpleSmartArt.pptx", Rjb::import('com.aspose.slides.SaveFormat').Pptx)

        puts "Created smartart shape, 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/SmartArt/addsmartart.rb
asposeslidesjava-0.0.1 lib/asposeslidesjava/SmartArt/addsmartart.rb