MathPhantom
内容
[
隐藏
]MathPhantom 类
表示一个幻影数学对象 (<m:phant>),它会影响其子元素的布局,但不一定显示出来。幻影可以隐藏其基础表达式,同时保留其宽度、高度或深度,以对齐公式或保留空间。可见性和几何行为由诸如 Show、ZeroWid、ZeroAsc、ZeroDesc 和 Transp 等属性控制。
public sealed class MathPhantom : MathElementBase, IMathPhantom
构造函数
| Name | Description |
|---|---|
| MathPhantom(IMathElement) | 使用指定的基础数学元素初始化 MathPhantom 类的新实例。 |
属性
| Name | Description |
|---|---|
| Base { get; } | 基础参数 |
| Show { get; set; } | 获取或设置一个值,指示是否显示基础元素。 |
| Transp { get; set; } | 获取或设置一个值,指示幻影在基于类的间距规则中是否透明。 |
| ZeroAsc { get; set; } | 获取或设置一个值,指示是否将基础元素的上升(基线以上的高度)视为零。 |
| ZeroDesc { get; set; } | 获取或设置一个值,指示是否将基础元素的下降(基线以下的深度)视为零。 |
| ZeroWidth { get; set; } | 获取或设置一个值,指示是否将基础元素的宽度视为零。 |
方法
| Name | Description |
|---|---|
| Accent(char) | 设置一个重音标记(此元素顶部的字符) |
| AsArgumentOfFunction(IMathElement) | 使用此实例作为参数,获取指定函数 |
| AsArgumentOfFunction(MathFunctionsOfOneArgument) | 使用此实例作为参数,获取指定函数 |
| AsArgumentOfFunction(string) | 使用此实例作为参数,获取指定函数 |
| AsArgumentOfFunction(MathFunctionsOfTwoArguments, IMathElement) | 使用此实例作为参数和指定的附加参数,获取指定函数 |
| AsArgumentOfFunction(MathFunctionsOfTwoArguments, string) | 使用此实例作为参数和指定的附加参数,获取指定函数 |
| Divide(IMathElement) | 使用此分子和指定的分母创建一个分数 |
| Divide(string) | 使用此分子和指定的分母创建一个分数 |
| Divide(IMathElement, MathFractionTypes) | 使用此分子和指定的分母创建指定类型的分数 |
| Divide(string, MathFractionTypes) | 使用此分子和指定的分母创建指定类型的分数 |
| Enclose() | 将数学元素括在圆括号中 |
| virtual Enclose(char, char) | 使用指定字符(如圆括号或其他字符)将数学元素括起来 |
| Function(IMathElement) | 使用此实例作为函数名,取单参数函数 |
| Function(string) | 使用此实例作为函数名,取单参数函数 |
| GetChildren() | 获取子元素 |
| Group() | 使用底部花括号将此元素放入分组 |
| Group(char, MathTopBotPositions, MathTopBotPositions) | 使用分组字符(如底部花括号或其他)将此元素放入分组 |
| Integral(MathIntegralTypes) | 获取没有上下限的积分 |
| Integral(MathIntegralTypes, IMathElement, IMathElement) | 获取积分 |
| Integral(MathIntegralTypes, string, string) | 获取积分 |
| Integral(MathIntegralTypes, IMathElement, IMathElement, MathLimitLocations) | 获取积分 |
| Integral(MathIntegralTypes, string, string, MathLimitLocations) | 获取积分 |
| virtual Join(IMathElement) | 连接数学元素并形成数学块 |
| virtual Join(string) | 连接数学文本并形成数学块 |
| Nary(MathNaryOperatorTypes, IMathElement, IMathElement) | 创建 N 元运算符 |
| Nary(MathNaryOperatorTypes, string, string) | 创建 N 元运算符 |
| Overbar() | 在此元素顶部设置一条横线 |
| Radical(IMathElement) | 指定给定次数的数学根号,使用指定的参数。 |
| Radical(string) | 指定给定次数的数学根号,使用指定的参数。 |
| SetLowerLimit(IMathElement) | 获取下限 |
| SetLowerLimit(string) | 获取下限 |
| SetSubscript(IMathElement) | 创建下标 |
| SetSubscript(string) | 创建下标 |
| SetSubSuperscriptOnTheLeft(IMathElement, IMathElement) | 在左侧创建下标和上标 |
| SetSubSuperscriptOnTheLeft(string, string) | 在左侧创建下标和上标 |
| SetSubSuperscriptOnTheRight(IMathElement, IMathElement) | 在右侧创建下标和上标 |
| SetSubSuperscriptOnTheRight(string, string) | 在右侧创建下标和上标 |
| SetSuperscript(IMathElement) | 创建上标 |
| SetSuperscript(string) | 创建上标 |
| SetUpperLimit(IMathElement) | 获取上限 |
| SetUpperLimit(string) | 获取上限 |
| ToBorderBox() | 将此元素放入边框盒中 |
| ToBorderBox(bool, bool, bool, bool, bool, bool, bool, bool) | 将此元素放入边框盒中 |
| ToBox() | 将此元素放入非可视框(逻辑分组),用于对方程或其他数学文本的组件进行分组。盒状对象可以(例如)用作具有或不具有对齐点的运算符仿真器,用作换行点,或分组以防止在其中换行。 |
| virtual ToMathArray() | 放入垂直数组中 |
| Underbar() | 在此元素底部设置一条横线 |
示例
示例:
[C#]
IMathPhantom phantom = new MathPhantom(new MathematicalText("1/2"));
phantom.Show = false; // 隐藏内容
phantom.ZeroWidth = false; // 保持宽度