Enum EquationDelimiterShapeType

EquationDelimiterShapeType enumeration

This specifies the shape of delimiters in the delimiter object.

public enum EquationDelimiterShapeType

Values

NameValueDescription
Centered0The divider is centered around the entire height of its content.
Match1The divider is altered to exactly match their contents’ height.

Examples

using System;
using Aspose.Cells;
using Aspose.Cells.Drawing;
using Aspose.Cells.Drawing.Equations;

namespace AsposeCellsExamples
{
    public class EquationsClassEquationDelimiterShapeTypeDemo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];
            
            // Add equation shape
            TextBox textBox = worksheet.Shapes.AddEquation(3, 0, 3, 0, 100, 200);
            
            // Get equation node
            EquationNode mathNode = textBox.GetEquationParagraph().GetChild(0);
            
            // Create delimiter node with Match shape type
            DelimiterEquationNode delimiterNode = (DelimiterEquationNode)mathNode.AddChild(EquationNodeType.Delimiter);
            delimiterNode.DelimiterShape = EquationDelimiterShapeType.Match;
            delimiterNode.BeginChar = "{";
            delimiterNode.EndChar = "}";
            
            // Add content inside the delimiter
            EquationNode baseNode = delimiterNode.AddChild(EquationNodeType.Base);
            TextRunEquationNode textNode = (TextRunEquationNode)baseNode.AddChild(EquationNodeType.Text);
            textNode.Text = "Content";
            
            // Save the workbook
            workbook.Save("EquationDelimiterShapeTypeDemo.xlsx");
        }
    }
}

See Also