Examples of IAutoShape


Examples of com.aspose.slides.IAutoShape

    // Get first slide
    ISlide sld = pres.getSlides().get_Item(0);

    // Add an AutoShape of Rectangle type
    IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle,
        150, 75, 150, 50);

    // Add TextFrame to the Rectangle
    ashp.addTextFrame("Aspose TextBox");

    // Disable shape fill in case we want to get shadow of text.
    ashp.getFillFormat().setFillType(FillType.NoFill);

    // Add outer shadow and set all necessary parameters
    OuterShadow shadow = new OuterShadow();
    ashp.getEffectFormat().setOuterShadowEffect(shadow);
    shadow.setBlurRadius(4.0);
    shadow.setDirection(45);
    shadow.setDistance(3);
    shadow.setRectangleAlign(RectangleAlignment.TopLeft);
    shadow.getShadowColor().setPresetColor(PresetColor.Black);
View Full Code Here

Examples of com.aspose.slides.IAutoShape

    //===========================================================
    // 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
View Full Code Here

Examples of com.aspose.slides.IAutoShape

    // Add an AutoShape of Rectangle Type
    IShape pptxShape = slide.getShapes().addAutoShape(ShapeType.Rectangle,
        150, 150, 150, 50);

    // Cast the shape to AutoShape
    IAutoShape pptxAutoShape = (IAutoShape) pptxShape;

    // Access ITextFrame associated with the AutoShape
    pptxAutoShape.addTextFrame("");

    ITextFrame ITextFrame = pptxAutoShape.getTextFrame();

    // Add some text to the frame
    ITextFrame.getParagraphs().get_Item(0).getPortions().get_Item(0)
        .setText("Aspose.Slides");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.