public interface IMathFraction extends IMathElement
Specifies the fraction object, consisting of a numerator and denominator separated by a fraction bar. The fraction bar can be horizontal or diagonal, depending on the fraction properties. The fraction object is also used to represent the stack function, which places one element above another, with no fraction bar.
Example:IMathFraction mathFraction = new MathematicalText("x").divide("y"); IMathFraction mathFraction2 = new MathFraction(new MathematicalText("x"), new MathematicalText("y"), MathFractionTypes.Linear);
Modifier and Type | Method and Description |
---|---|
IMathElement |
getDenominator()
Denominator
|
int |
getFractionType()
Fraction type
Default: Bar
|
IMathElement |
getNumerator()
Numerator
|
void |
setFractionType(int value)
Fraction type
Default: Bar
|
accent, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, asArgumentOfFunction, divide, divide, divide, divide, enclose, enclose, function, function, group, group, integral, integral, integral, integral, integral, join, join, nary, nary, overbar, radical, radical, setLowerLimit, setLowerLimit, setSubscript, setSubscript, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheLeft, setSubSuperscriptOnTheRight, setSubSuperscriptOnTheRight, setSuperscript, setSuperscript, setUpperLimit, setUpperLimit, toBorderBox, toBorderBox, toBox, toMathArray, underbar
int getFractionType()
Fraction type Default: Bar
Example:IMathFraction mathFraction = new MathematicalText("x").divide("y"); mathFraction.setFractionType(MathFractionTypes.Linear);
void setFractionType(int value)
Fraction type Default: Bar
Example:IMathFraction mathFraction = new MathematicalText("x").divide("y"); mathFraction.setFractionType(MathFractionTypes.Linear);
IMathElement getNumerator()
Numerator
Example:IMathFraction mathFraction = new MathematicalText("x").divide("y"); IMathElement numerator = mathFraction.getNumerator();
IMathElement getDenominator()
Denominator
Example:IMathFraction mathFraction = new MathematicalText("x").divide("y"); IMathElement denominator = mathFraction.getDenominator();