3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/asposeslidesjava/Text/wordart.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/Text/'
pres = Rjb::import('com.aspose.slides.Presentation').new
slide = pres.getSlides().get_Item(0)
ashp = slide.getShapes().addAutoShape(Rjb::import('com.aspose.slides.ShapeType').Rectangle, 150, 75, 400, 300)
ashp.getFillFormat().setFillType(Rjb::import('com.aspose.slides.FillType').NoFill)
ashp.addTextFrame("Aspose TextBox")
port = ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0)
pf = port.getPortionFormat()
pf.setFontHeight(50)
ef = pf.getEffectFormat()
ef.enableInnerShadowEffect()
ef.getInnerShadowEffect().setBlurRadius(8.0)
ef.getInnerShadowEffect().setDirection(90)
ef.getInnerShadowEffect().setDistance(6.0)
ef.getInnerShadowEffect().getShadowColor().setB(189)
ef.getInnerShadowEffect().getShadowColor().setColorType(Rjb::import('com.aspose.slides.ColorType').Scheme)
ef.getInnerShadowEffect().getShadowColor().setSchemeColor(Rjb::import('com.aspose.slides.SchemeColor').Accent1)
save_format = Rjb::import('com.aspose.slides.SaveFormat')
pres.save(data_dir + "WordArt.pptx", save_format.Pptx)
puts "Done with word art, please check the output file."
end
|