com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class MathPortion

  • All Implemented Interfaces:
    IMathPortion, IPortion, IPresentationComponent, ISlideComponent


    public final class MathPortion
    extends Portion
    implements IMathPortion

    Represents a portion with mathematical context inside.


    Example:
     
     Presentation pres = new Presentation();
     try {
             IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addMathShape(0, 0, 300, 50);
             IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
             MathPortion mathPortion = new MathPortion();
             paragraph.getPortions().add(mathPortion);
     } finally {
            if (pres != null) pres.dispose();
     }
     
    • Constructor Detail

      • MathPortion

        public MathPortion()

        Initializes a new instance of the MathPortion class.


        Example:
         
         Presentation pres = new Presentation();
         try {
                 IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addMathShape(0, 0, 300, 50);
                 IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
                 MathPortion mathPortion = new MathPortion();
                 paragraph.getPortions().add(mathPortion);
         } finally {
                if (pres != null) pres.dispose();
         }
         
    • Method Detail

      • getMathParagraph

        public final IMathParagraph getMathParagraph()

        Math paragraph


        Example:
         
         Presentation pres = new Presentation();
         try {
             IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addMathShape(0, 0, 300, 50);
             IMathParagraph mathParagraph = ((MathPortion)shape.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0)).getMathParagraph();
             mathParagraph.add(new MathBlock(new MathematicalText("x+y")));
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Specified by:
        getMathParagraph in interface IMathPortion