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 and Description |
---|
MathPortion()
Initializes a new instance of the MathPortion class.
|
Modifier and Type | Method and Description |
---|---|
IMathParagraph |
getMathParagraph()
Math paragraph
|
addField, addField, getCoordinates, getField, getParent_Immediate, getPortionFormat, getPresentation, getRect, getSlide, getText, removeField, setText
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(); }
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(); }
getMathParagraph
in interface IMathPortion