//===========================================================
// Arrow Shaped Line
//============================================================
///Add an autoshape of type line
IAutoShape shp = slide.getShapes().addAutoShape(ShapeType.Line, 50, 130, 300, 0);
//Apply some formatting on the line
shp.getLineFormat().setStyle (LineStyle.ThickBetweenThin);
shp.getLineFormat().setWidth ( 10);
shp.getLineFormat().setDashStyle (LineDashStyle.DashDot);
shp.getLineFormat().setBeginArrowheadLength(LineArrowheadLength.Short);
shp.getLineFormat().setBeginArrowheadStyle (LineArrowheadStyle.Oval);
shp.getLineFormat().setEndArrowheadLength (LineArrowheadLength.Long);
shp.getLineFormat().setEndArrowheadStyle (LineArrowheadStyle.Triangle);
shp.getLineFormat().getFillFormat().setFillType(FillType.Solid);
shp.getLineFormat().getFillFormat().getSolidFillColor().setColor(new Color(com.aspose.slides.PresetColor.Maroon));
//===========================================================
// Adding Formatted Ellipse in the Slide
//============================================================
//Add autoshape of ellipse type
shp = slide.getShapes().addAutoShape(ShapeType.Ellipse, 270, 350, 350, 50);
//Apply some formatting to ellipse shape
shp.getFillFormat().setFillType(FillType.Solid);
shp.getFillFormat().getSolidFillColor().setColor(new Color(PresetColor.Chocolate));
//Apply some formatting to the line of Ellipse
shp.getLineFormat().getFillFormat().setFillType(FillType.Solid);
shp.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK);
shp.getLineFormat().setWidth(5);
//============================================================
// Adding Formatted Rectangle to Slide
//============================================================
//Adding a rectangle shape into the slide by defining its X,Y position, width and height
shp = slide.getShapes().addAutoShape(ShapeType.Rectangle, 50, 350, 200, 100);
//Apply some formatting to ellipse shape
shp.getFillFormat().setFillType(FillType.Solid);
shp.getFillFormat().getSolidFillColor().setColor(new Color(PresetColor.Chocolate));
//Apply some formatting to the line of Ellipse
shp.getLineFormat().getFillFormat().setFillType(FillType.Solid);
shp.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK);
shp.getLineFormat().setWidth(5);
//Writing the presentation as a PPT file
pres.save("data/ImageInSlides_Aspose.pptx", SaveFormat.Pptx);
//Print Message