MathPortion
MathPortion class
代表一个包含数学上下文的部分。
public sealed class MathPortion : Portion, IMathPortion
Constructors
Name | Description |
---|---|
MathPortion() | 初始化一个 MathPortion 类的新实例。 |
Properties
Name | Description |
---|---|
Field { get; } | 返回此部分的字段。只读 IField 。 |
MathParagraph { get; } | 数学段落 |
PortionFormat { get; } | 返回一个格式化对象,该对象包含没有应用继承的文本部分的显式设置的格式属性。只读 IPortionFormat 。 |
Text { get; set; } | 获取或设置部分的纯文本。可读写字符串。 |
Methods
Name | Description |
---|---|
AddField(IFieldType) | 将此部分转换为自动更新的字段。 |
AddField(string) | 将此部分转换为自动更新的字段。 |
GetCoordinates() | 获取部分开始的坐标。点的 X 坐标表示从第一个字符开始的部分,包括左侧边距。Y 坐标包括顶部边距。 |
GetRect() | 获取包围部分的矩形的坐标。矩形包括部分中的所有文本行,包括空行。 |
RemoveField() | 将此字段部分转换为简单部分。 |
Examples
示例:
[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
- class Portion
- interface IMathPortion
- namespace Aspose.Slides.MathText
- assembly Aspose.Slides