MathPortion

Inheritance: java.lang.Object, com.aspose.slides.Portion

All Implemented Interfaces: com.aspose.slides.IMathPortion

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();
 }

Constructors

Constructor Description
MathPortion() Initializes a new instance of the MathPortion class.

Methods

Method Description
getMathParagraph() Math paragraph

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();
 }

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();
 }

Returns: IMathParagraph