IMathMatrix

IMathMatrix 接口

指定矩阵对象,包含按行和列布局的子元素。需要注意的是,矩阵没有内置的分隔符。要将矩阵放入括号中,应该使用分隔符对象 (IMathDelimiter)。可以使用空参数在矩阵中创建间隙。

public interface IMathMatrix : IMathElement

属性

名称描述
AsIMathElement { get; }允许获取基本的 IMathElement 接口 IMathElement
BaseJustification { get; set; }指定相对于周围文本的垂直对齐方式。可能的值是 top、bottom 和 center。默认值:Center
ColumnCount { get; }矩阵中的列数
ColumnGap { get; set; }矩阵列之间的水平间距值;如果 ColumnGapRule 设置为 3 (“Exactly”),则单位解释为 twips(1/20 点);如果 ColumnGapRule 设置为 4 (“Multiple”),则单位解释为 0.5 em 的增量。在其他情况下被忽略。默认值:0
ColumnGapRule { get; set; }矩阵列之间的水平间距类型;水平间距单位可以是 ems 或 points(存储为 twips)。默认值:SingleSpacingGap (0)
HidePlaceholders { get; set; }隐藏空矩阵元素的占位符 默认值:false
Item { get; set; }矩阵的元素
MinColumnWidth { get; set; }最小列宽,以 twips 为单位(1/20 点)。间隔(也称为“列间距”或“间隔宽度”)会添加到 MinColumnWidth,以确定矩阵列间距(不同列的相同边缘之间的距离)。默认值:0.
RowCount { get; }矩阵中的行数
RowGap { get; set; }矩阵行之间的垂直间距值;如果 RowGapRule 设置为 3 (“Exactly”),则单位解释为 twips(1/20 点);如果 RowGapRule 设置为 4 (“Multiple”),则单位解释为半行。默认值:0
RowGapRule { get; set; }矩阵行之间的垂直间距类型;垂直间距单位可以是行或点(存储为 twips)。默认值:SingleSpacingGap (0)

方法

名称描述
DeleteColumn(int)删除指定的列
DeleteRow(int)删除指定的行
GetColumnAlignment(int)获取指定列的水平对齐方式
InsertColumnAfter(int)在指定列后插入新列,最初新列中的所有元素均为 null。
InsertColumnBefore(int)在指定列前插入新列,最初新列中的所有元素均为 null。
InsertRowAfter(int)在指定行后插入新行,最初新行中的所有元素均为 null。
InsertRowBefore(int)在指定行前插入新行,最初新行中的所有元素均为 null。
SetColumnAlignment(int, MathHorizontalAlignment)设置指定列的水平对齐方式
SetColumnsAlignment(int, uint, MathHorizontalAlignment)设置指定列的水平对齐方式

示例

示例:

[C#]
IMathMatrix matrix = new MathMatrix(2, 3);
matrix[0, 0] = new MathematicalText("item.1.1");

另请参阅