com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class MathElementBase

  • java.lang.Object
    • com.aspose.slides.MathElementBase
    • Method Detail

      • getParent_Immediate

        public com.aspose.slides.IDOMObject getParent_Immediate()

        Returns Parent_Immediate object. Read-only IDOMObject.

      • join

        public IMathBlock join(IMathElement mathElement)

        Joins a mathematical element and forms a mathematical block


        Example:
         
         IMathElement element1 = new MathematicalText("x");
         IMathElement element2 = new MathematicalText("y");
         IMathBlock block = element1.join(element2);
         
        Specified by:
        join in interface IMathElement
        Parameters:
        mathElement - The element to be joined
        Returns:
        A new IMathBlock containing this instance and specified argument
      • join

        public IMathBlock join(java.lang.String mathText)

        Joins a mathematical text and forms a mathematical block


        Example:
         
         IMathElement element = new MathematicalText("x");
         IMathBlock block = element.join("+y");
         
        Specified by:
        join in interface IMathElement
        Parameters:
        mathText - Mathematical text to be joined
        Returns:
        A new IMathBlock containing this instance and specified argument
      • divide

        public final IMathFraction divide(IMathElement denominator)

        Creates a fraction with this numerator and specified denominator


        Example:
         
         IMathElement numerator = new MathematicalText("x");
         IMathElement denumerator = new MathematicalText("y");
         IMathFraction fraction = numerator.divide(denumerator);
         
        Specified by:
        divide in interface IMathElement
        Parameters:
        denominator - Denominator
        Returns:
        new fraction
      • divide

        public final IMathFraction divide(java.lang.String denominator)

        Creates a fraction with this numerator and specified denominator


        Example:
         
         IMathElement numerator = new MathematicalText("x");
         IMathFraction fraction = numerator.divide("y");
         
        Specified by:
        divide in interface IMathElement
        Parameters:
        denominator - Denominator
        Returns:
        new fraction
      • divide

        public final IMathFraction divide(IMathElement denominator,
                                          int fractionType)

        Creates a fraction of the specified type with this numerator and specified denominator


        Example:
         
         IMathElement numerator = new MathematicalText("x");
         IMathElement denumerator = new MathematicalText("y");
         IMathFraction fraction = numerator.divide(denumerator, MathFractionTypes.Linear);
         
        Specified by:
        divide in interface IMathElement
        Parameters:
        denominator - Denominator
        fractionType - Fraction type: Bar, NoBar, Skewed, Linear
        Returns:
        new fraction
      • divide

        public final IMathFraction divide(java.lang.String denominator,
                                          int fractionType)

        Creates a fraction of the specified type with this numerator and specified denominator


        Example:
         
         IMathElement numerator = new MathematicalText("x");
         IMathFraction fraction = numerator.divide("y", MathFractionTypes.Linear);
         
        Specified by:
        divide in interface IMathElement
        Parameters:
        denominator - Denominator
        fractionType - Fraction type: Bar, NoBar, Skewed, Linear
        Returns:
        new fraction
      • enclose

        public final IMathDelimiter enclose()

        Encloses a math element in parenthesis


        Example:
         
         IMathElement element = new MathematicalText("x");
         IMathDelimiter delimiter = element.enclose();
         
        Specified by:
        enclose in interface IMathElement
        Returns:
        The math element of type IMathDelimiter which includes the parenthesis
      • enclose

        public IMathDelimiter enclose(char beginningCharacter,
                                      char endingCharacter)

        Encloses a math element in specified characters such as parenthesis or another characters as framing


        Example:
         
         IMathElement element = new MathematicalText("x");
         IMathDelimiter delimiter = element.enclose('[', ']');
         
        Specified by:
        enclose in interface IMathElement
        Parameters:
        beginningCharacter - Beginning character (usually left bracket)
        endingCharacter - Ending character (usually right bracket)
        Returns:
        The math element of type IMathDelimiter which includes specified characters as framing
      • function

        public final IMathFunction function(IMathElement functionArgument)

        Takes a function of an argument using this instance as the function name


        Example:
         
         IMathElement functionName = new MathematicalText("sin");
         IMathElement functionArg = new MathematicalText("x");
         IMathFunction func = functionName.function(functionArg);
         
        Specified by:
        function in interface IMathElement
        Parameters:
        functionArgument - An argument of the function
        Returns:
        New math element of type IMathFunction
      • function

        public final IMathFunction function(java.lang.String functionArgument)

        Takes a function of an argument using this instance as the function name


        Example:
         
         IMathElement functionName = new MathematicalText("sin");
         IMathFunction func = functionName.function("x");
         
        Specified by:
        function in interface IMathElement
        Parameters:
        functionArgument - An argument of the function
        Returns:
        New math element of type IMathFunction
      • asArgumentOfFunction

        public final IMathFunction asArgumentOfFunction(IMathElement functionName)

        Takes specified function using this instance as the argument


        Example:
         
         IMathElement functionName = new MathematicalText("sin");
         IMathElement functionArg = new MathematicalText("x");
         IMathFunction func = functionArg.asArgumentOfFunction(functionName);
         
        Specified by:
        asArgumentOfFunction in interface IMathElement
        Parameters:
        functionName - Function name
        Returns:
        New math element of type IMathFunction
      • asArgumentOfFunction

        public final IMathFunction asArgumentOfFunction(java.lang.String functionName)

        Takes specified function using this instance as the argument


        Example:
         
         IMathElement functionArg = new MathematicalText("x");
         IMathFunction func = functionArg.asArgumentOfFunction("cos");
         
        Specified by:
        asArgumentOfFunction in interface IMathElement
        Parameters:
        functionName - Function name
        Returns:
        New math element of type IMathFunction
      • asArgumentOfFunction

        public final IMathFunction asArgumentOfFunction(int functionType)

        Takes specified function using this instance as the argument


        Example:
         
         IMathElement functionName = new MathematicalText("sin");
         IMathElement functionArg = new MathematicalText("x");
         IMathFunction func = functionArg.asArgumentOfFunction(functionName);
         
        Specified by:
        asArgumentOfFunction in interface IMathElement
        Parameters:
        functionType - One of the common function type of one argument
        Returns:
        New math element of type IMathFunction
      • asArgumentOfFunction

        public final IMathFunction asArgumentOfFunction(int functionType,
                                                        IMathElement additionalArgument)

        Takes specified function using this instance as the argument and specified additional argument


        Example:
         
         IMathElement functionArg = new MathematicalText("x");
         IMathElement logarithmBase = new MathematicalText("5");
         IMathFunction func = functionArg.asArgumentOfFunction(MathFunctionsOfTwoArguments.Log, logarithmBase); // Returns the logarithm of 'x' to the base '5'
         
        Specified by:
        asArgumentOfFunction in interface IMathElement
        Parameters:
        functionType - One of the common function type of two arguments: Log, Lim, Min, Max
        additionalArgument - Additional argument depending on the type of function
        Returns:
        New math element of type IMathFunction
      • asArgumentOfFunction

        public final IMathFunction asArgumentOfFunction(int functionType,
                                                        java.lang.String additionalArgument)

        Takes specified function using this instance as the argument and specified additional argument


        Example:
         
         IMathElement functionArg = new MathematicalText("x");
         IMathFunction func = functionArg.asArgumentOfFunction(MathFunctionsOfTwoArguments.Log, "5"); // Returns the logarithm of 'x' to the base '5'
         
        Specified by:
        asArgumentOfFunction in interface IMathElement
        Parameters:
        functionType - One of the common function type of two arguments: Log, Lim, Min, Max
        additionalArgument - Additional argument depending on the type of function
        Returns:
        New math element of type IMathFunction
      • setSubscript

        public final IMathSubscriptElement setSubscript(IMathElement subscript)

        Creates subscript


        Example:
         
         IMathElement element = new MathematicalText("N");
         IMathElement index = new MathematicalText("i");
         IMathSubscriptElement subscript = element.setSubscript(index);
         
        Specified by:
        setSubscript in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the right)
        Returns:
        New math element of type IMathSubscriptElement
      • setSubscript

        public final IMathSubscriptElement setSubscript(java.lang.String subscript)

        Creates subscript


        Example:
         
         IMathElement element = new MathematicalText("N");
         IMathSubscriptElement subscript = element.setSubscript("i");
         
        Specified by:
        setSubscript in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the right)
        Returns:
        New math element of type IMathSubscriptElement
      • setSuperscript

        public final IMathSuperscriptElement setSuperscript(IMathElement superscript)

        Creates superscript


        Example:
         
         IMathElement element = new MathematicalText("N");
         IMathElement index = new MathematicalText("4");
         IMathSuperscriptElement superscript = element.setSuperscript(index);
         
        Specified by:
        setSuperscript in interface IMathElement
        Parameters:
        superscript - Superscript (upper index on the right)
        Returns:
        New math element of type IMathSuperscriptElement
      • setSuperscript

        public final IMathSuperscriptElement setSuperscript(java.lang.String superscript)

        Creates superscript


        Example:
         
         IMathElement element = new MathematicalText("N");
         IMathSuperscriptElement superscript = element.setSuperscript("4");
         
        Specified by:
        setSuperscript in interface IMathElement
        Parameters:
        superscript - Superscript (upper index on the right)
        Returns:
        New math element of type IMathSuperscriptElement
      • setSubSuperscriptOnTheRight

        public final IMathRightSubSuperscriptElement setSubSuperscriptOnTheRight(IMathElement subscript,
                                                                                 IMathElement superscript)

        Creates subscript and superscript on the right


        Example:
         
         IMathElement baseElement = new MathematicalText("N");
         IMathElement subscript = new MathematicalText("i");
         IMathElement superscript = new MathematicalText("j");
         IMathRightSubSuperscriptElement subsuperscript = baseElement.setSubSuperscriptOnTheRight(subscript, superscript);
         
        Specified by:
        setSubSuperscriptOnTheRight in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the right)
        superscript - Superscript (upper index on the right)
        Returns:
        New math element of type IMathRightSubSuperscriptElement
      • setSubSuperscriptOnTheRight

        public final IMathRightSubSuperscriptElement setSubSuperscriptOnTheRight(java.lang.String subscript,
                                                                                 java.lang.String superscript)

        Creates subscript and superscript on the right


        Example:
         
         IMathElement baseElement = new MathematicalText("N");
         IMathRightSubSuperscriptElement subsuperscript = baseElement.setSubSuperscriptOnTheRight("i", "j");
         
        Specified by:
        setSubSuperscriptOnTheRight in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the right)
        superscript - Superscript (upper index on the right)
        Returns:
        New math element of type IMathRightSubSuperscriptElement
      • setSubSuperscriptOnTheLeft

        public final IMathLeftSubSuperscriptElement setSubSuperscriptOnTheLeft(IMathElement subscript,
                                                                               IMathElement superscript)

        Creates subscript and superscript on the left


        Example:
         
         IMathElement baseElement = new MathematicalText("N");
         IMathElement subscript = new MathematicalText("i");
         IMathElement superscript = new MathematicalText("j");
         IMathLeftSubSuperscriptElement leftSubsuperscript = baseElement.setSubSuperscriptOnTheLeft(subscript, superscript);
         
        Specified by:
        setSubSuperscriptOnTheLeft in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the left)
        superscript - Superscript (upper index on the left)
        Returns:
        New math element of type IMathLeftSubSuperscriptElement
      • setSubSuperscriptOnTheLeft

        public final IMathLeftSubSuperscriptElement setSubSuperscriptOnTheLeft(java.lang.String subscript,
                                                                               java.lang.String superscript)

        Creates subscript and superscript on the left


        Example:
         
         IMathElement baseElement = new MathematicalText("N");
         IMathLeftSubSuperscriptElement leftSubsuperscript = baseElement.setSubSuperscriptOnTheLeft("i", "j");
         
        Specified by:
        setSubSuperscriptOnTheLeft in interface IMathElement
        Parameters:
        subscript - Subscript (lower index on the left)
        superscript - Superscript (upper index on the left)
        Returns:
        New math element of type IMathLeftSubSuperscriptElement
      • radical

        public final IMathRadical radical(IMathElement degree)

        Specifies the mathematical root of the given degree from the specified argument.


        Example:
         
         IMathElement baseElement = new MathematicalText("2px");
         IMathElement degree = new MathematicalText("y");
         IMathRadical radical = baseElement.radical(degree);
         
        Specified by:
        radical in interface IMathElement
        Parameters:
        degree - Argument of Radical
        Returns:
        New instance of type IMathRadical
      • radical

        public final IMathRadical radical(java.lang.String degree)

        Specifies the mathematical root of the given degree from the specified argument.


        Example:
         
         IMathElement baseElement = new MathematicalText("2px");
         IMathRadical radical = baseElement.radical("3");
         
        Specified by:
        radical in interface IMathElement
        Parameters:
        degree - Argument of Radical
        Returns:
        New instance of type IMathRadical
      • setUpperLimit

        public final IMathLimit setUpperLimit(IMathElement limit)

        Takes upper limit


        Example:
         
         IMathElement baseElement = new MathematicalText("y");
         IMathElement limitValue = new MathematicalText("yāˆ’>1");
         IMathLimit limitElement = baseElement.setUpperLimit(limitValue);
         
        Specified by:
        setUpperLimit in interface IMathElement
        Parameters:
        limit - limit
        Returns:
        New instance of type IMathLimit
      • setUpperLimit

        public final IMathLimit setUpperLimit(java.lang.String limit)

        Takes upper limit


        Example:
         
         IMathElement baseElement = new MathematicalText("y");
         IMathLimit limitElement = baseElement.setUpperLimit("yāˆ’>1");
         
        Specified by:
        setUpperLimit in interface IMathElement
        Parameters:
        limit - limit
        Returns:
        New instance of type IMathLimit
      • setLowerLimit

        public final IMathLimit setLowerLimit(IMathElement limit)

        Takes lower limit


        Example:
         
         IMathElement baseElement = new MathematicalText("lim");
         IMathElement limitValue = new MathematicalText("š‘›ā†’āˆž");
         IMathLimit limitElement = baseElement.setLowerLimit(limitValue);
         
        Specified by:
        setLowerLimit in interface IMathElement
        Parameters:
        limit - limit
        Returns:
        New instance of type IMathLimit
      • setLowerLimit

        public final IMathLimit setLowerLimit(java.lang.String limit)

        Takes lower limit


        Example:
         
         IMathElement baseElement = new MathematicalText("lim");
         IMathLimit limitElement = baseElement.setLowerLimit("š‘›ā†’āˆž");
         
        Specified by:
        setLowerLimit in interface IMathElement
        Parameters:
        limit - limit
        Returns:
        New instance of type IMathLimit
      • nary

        public final IMathNaryOperator nary(int type,
                                            IMathElement lowerLimit,
                                            IMathElement upperLimit)

        Creates a N-ary operator


        Example:
         
         IMathElement baseElement = new MathematicalText("i-1");
         IMathElement lowerLimit = new MathematicalText("i=0");
         IMathElement upperLimit = new MathematicalText("š‘›");
         IMathNaryOperator naryOperator = baseElement.nary(MathNaryOperatorTypes.Summation, lowerLimit, upperLimit);
         
        Specified by:
        nary in interface IMathElement
        Parameters:
        type - The N-ary operator type
        lowerLimit - The lower limit
        upperLimit - The upper limit
        Returns:
        New instance of type IMathNaryOperator
      • nary

        public final IMathNaryOperator nary(int type,
                                            java.lang.String lowerLimit,
                                            java.lang.String upperLimit)

        Creates a N-ary operator


        Example:
         
         IMathNaryOperator naryOperator = new MathematicalText("i").nary(MathNaryOperatorTypes.Summation, "i=0", "š‘›");
         
        Specified by:
        nary in interface IMathElement
        Parameters:
        type - The N-ary operator type
        lowerLimit - The lower limit
        upperLimit - The upper limit
        Returns:
        New instance of type IMathNaryOperator
      • toMathArray

        public IMathArray toMathArray()

        Puts in a vertical array


        Example:
         
         IMathArray array = new MathematicalText("x1").join("x2").join("x3").toMathArray();
         
        Specified by:
        toMathArray in interface IMathElement
        Returns:
        New instance of type IMathArray
      • integral

        public final IMathNaryOperator integral(int integralType,
                                                IMathElement lowerLimit,
                                                IMathElement upperLimit,
                                                int limitLocations)

        Takes the integral


        Example:
         
         IMathElement baseElement = new MathematicalText("š‘„");
         IMathElement lowerLimit = new MathematicalText("1");
         IMathElement upperLimit = new MathematicalText("2");
         IMathNaryOperator integral = baseElement.integral(MathIntegralTypes.Simple, lowerLimit, upperLimit, MathLimitLocations.UnderOver);
         
        Specified by:
        integral in interface IMathElement
        Parameters:
        integralType - Integral type
        lowerLimit - Lower limit of integral
        upperLimit - Upper limit of integral
        limitLocations - location of limits
        Returns:
        New instance of type IMathNaryOperator
      • integral

        public final IMathNaryOperator integral(int integralType,
                                                IMathElement lowerLimit,
                                                IMathElement upperLimit)

        Takes the integral


        Example:
         
         IMathElement baseElement = new MathematicalText("š‘„");
         IMathElement lowerLimit = new MathematicalText("1");
         IMathElement upperLimit = new MathematicalText("2");
         IMathNaryOperator integral = baseElement.integral(MathIntegralTypes.Simple, lowerLimit, upperLimit, MathLimitLocations.UnderOver);
         
        Specified by:
        integral in interface IMathElement
        Parameters:
        integralType - Integral type
        lowerLimit - Lower limit of integral
        upperLimit - Upper limit of integral
        Returns:
        New instance of type IMathNaryOperator
      • integral

        public final IMathNaryOperator integral(int integralType)

        Takes the integral without limits


        Example:
         
         IMathElement baseElement = new MathematicalText("š‘„");
         IMathNaryOperator integral = baseElement.integral(MathIntegralTypes.Contour);
         
        Specified by:
        integral in interface IMathElement
        Parameters:
        integralType - Integral type
        Returns:
        New instance of type IMathNaryOperator
      • integral

        public final IMathNaryOperator integral(int integralType,
                                                java.lang.String lowerLimit,
                                                java.lang.String upperLimit,
                                                int limitLocations)

        Takes the integral


        Example:
         
         IMathElement baseElement = new MathematicalText("š‘„");
         IMathNaryOperator integral = baseElement.integral(MathIntegralTypes.Simple, "1", "5", MathLimitLocations.UnderOver);
         
        Specified by:
        integral in interface IMathElement
        Parameters:
        integralType - Integral type
        lowerLimit - Lower limit of integral
        upperLimit - Upper limit of integral
        limitLocations - location of limits
        Returns:
        New instance of type IMathNaryOperator
      • integral

        public final IMathNaryOperator integral(int integralType,
                                                java.lang.String lowerLimit,
                                                java.lang.String upperLimit)

        Takes the integral


        Example:
         
         IMathElement baseElement = new MathematicalText("š‘„");
         IMathNaryOperator integral = baseElement.integral(MathIntegralTypes.Simple, "1", "5");
         
        Specified by:
        integral in interface IMathElement
        Parameters:
        integralType - Integral type
        lowerLimit - Lower limit of integral
        upperLimit - Upper limit of integral
        Returns:
        New instance of type IMathNaryOperator
      • accent

        public final IMathAccent accent(char accentCharacter)

        Sets an accent mark (a character on the top of this element)


        Example:
         
         IMathAccent accent = new MathematicalText("x").accent('~');
         
        Specified by:
        accent in interface IMathElement
        Parameters:
        accentCharacter - Accent character. The value should be within the range of (U+0300ā€“U+036F) or (U+20D0ā€“U+20EF)
        Returns:
        New instance of type IMathAccent
      • overbar

        public final IMathBar overbar()

        Sets a bar on the top of this element


        Example:
         
         IMathBar bar = new MathematicalText("x").overbar();
         
        Specified by:
        overbar in interface IMathElement
        Returns:
        New instance of type IMathBar
      • underbar

        public final IMathBar underbar()

        Sets a bar on the bottom of this element


        Example:
         
         IMathBar bar = new MathematicalText("x").underbar();
         
        Specified by:
        underbar in interface IMathElement
        Returns:
        New instance of type IMathBar
      • group

        public final IMathGroupingCharacter group(char character,
                                                  int position,
                                                  int verticalJustification)

        Places this element in a group using a grouping character such as bottom curly bracket or another


        Example:
         
         IMathGroupingCharacter groupingElement = new MathematicalText("x;y;z").group('ā”', MathTopBotPositions.Bottom, MathTopBotPositions.Top);
         
        Specified by:
        group in interface IMathElement
        Parameters:
        character - Grouping Character such as BOTTOM CURLY BRACKET (U+23DF) or any other
        position - Position of grouping character
        verticalJustification - Vertical justification of group character. Specifies the alignment of the object with respect to the baseline. For example, when the group character is above the object, VerticalJustification of Top signifies that the top of the object falls on the baseline; when VerticalJustification is set to Bottom, the bottom of the object is on the baseline
        Returns:
        New instance of type IMathGroupingCharacter
      • toBorderBox

        public final IMathBorderBox toBorderBox()

        Places this element in a border-box


        Example:
         
         IMathBorderBox borderBox = new MathematicalText("x+y+z").toBorderBox();
         
        Specified by:
        toBorderBox in interface IMathElement
        Returns:
        Border-box with this element placed inside
      • toBorderBox

        public final IMathBorderBox toBorderBox(boolean hideTop,
                                                boolean hideBottom,
                                                boolean hideLeft,
                                                boolean hideRight,
                                                boolean strikethroughHorizontal,
                                                boolean strikethroughVertical,
                                                boolean strikethroughBottomLeftToTopRight,
                                                boolean strikethroughTopLeftToBottomRight)

        Places this element in a border-box


        Example:
         
         IMathBorderBox borderBox = new MathematicalText("x+y+z").toBorderBox(false, false, true, true, false, false, false, false);
         
        Specified by:
        toBorderBox in interface IMathElement
        Parameters:
        hideTop - Hide Top Edge
        hideBottom - Hide Bottom Edge
        hideLeft - Hide Left Edge
        hideRight - Hide Right Edge
        strikethroughHorizontal - Border Box Strikethrough Horizontal
        strikethroughVertical - Border Box Strikethrough Vertical
        strikethroughBottomLeftToTopRight - Border Box Strikethrough Bottom-Left to Top-Right
        strikethroughTopLeftToBottomRight - Border Box Strikethrough Top-Left to Bottom-Right
        Returns:
        Border-box with this element placed inside
      • toBox

        public final IMathBox toBox()

        Places this element in a non-visual box (logical grouping) which is used to group components of an equation or other instance of mathematical text. A boxed object can (for example) serve as an operator emulator with or without an alignment point, serve as a line break point, or be grouped such as not to allow line breaks within.


        Example:
         
         IMathBox box = new MathematicalText("x:=y").toBox();
         
        Specified by:
        toBox in interface IMathElement
        Returns:
        Logical box with this element placed inside