MathPortion Class

Represents a portion with mathematical context inside.
Inheritance Hierarchy
SystemObject
  Aspose.SlidesPortion
    Aspose.Slides.MathTextMathPortion

Namespace:  Aspose.Slides.MathText
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.11.0.0 (20.11)
Syntax
public sealed class MathPortion : Portion, 
	IMathPortion

The MathPortion type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleMathPortion
Initializes a new instance of the MathPortion class.
Properties
  NameDescription
Public propertyField
Returns a field of this portion. Read-only IField.
(Inherited from Portion.)
Public propertyCode exampleMathParagraph
Math paragraph
Public propertyPortionFormat
Returns oformatting bject which contains explicitly set formatting properties of the text portion with no inheritance applied. Read-only IPortionFormat.
(Inherited from Portion.)
Public propertyText
Gets or sets the plain text of a portion. Read/write String.
(Inherited from Portion.)
Methods
  NameDescription
Public methodAddField(String)
Converts this portion to the automaticaly updated field.
(Inherited from Portion.)
Public methodAddField(IFieldType)
Converts this portion to the automaticaly updated field.
(Inherited from Portion.)
Public methodEquals (Inherited from Object.)
Public methodGetCoordinates
Get coordinates of the beginning of the portion. The X coordinate of point represents the portion beginning from the first character including left side bearing. The Y coordinate includes top side bearing.
(Inherited from Portion.)
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetRect
Get coordinates of rect that bounds portion. The rect includes all the lines of text in portion, including empty ones.
(Inherited from Portion.)
Public methodGetType (Inherited from Object.)
Public methodRemoveField
Converts this field portion to the simple portion.
(Inherited from Portion.)
Public methodToString (Inherited from Object.)
Examples
Example:
[C#]
using (Presentation pres = new Presentation())
{
    IAutoShape shape = pres.Slides[0].Shapes.AddMathShape(0, 0, 300, 50);
    IParagraph paragraph = shape.TextFrame.Paragraphs[0];
    MathPortion mathPortion = new MathPortion();
    paragraph.Portions.Add(mathPortion);
}
See Also