IMathFraction

All Implemented Interfaces: com.aspose.slides.IMathElement

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);

Methods

Method Description
getFractionType() Fraction type Default: Bar
setFractionType(int value) Fraction type Default: Bar
getNumerator() Numerator
getDenominator() Denominator

getFractionType()

public abstract int getFractionType()

Fraction type Default: Bar


Example:
 
 IMathFraction mathFraction = new MathematicalText("x").divide("y");
 mathFraction.setFractionType(MathFractionTypes.Linear);

Returns: int

setFractionType(int value)

public abstract void setFractionType(int value)

Fraction type Default: Bar


Example:
 
 IMathFraction mathFraction = new MathematicalText("x").divide("y");
 mathFraction.setFractionType(MathFractionTypes.Linear);

Parameters:

Parameter Type Description
value int

getNumerator()

public abstract IMathElement getNumerator()

Numerator


Example:
 
 IMathFraction mathFraction = new MathematicalText("x").divide("y");
 IMathElement numerator = mathFraction.getNumerator();

Returns: IMathElement

getDenominator()

public abstract IMathElement getDenominator()

Denominator


Example:
 
 IMathFraction mathFraction = new MathematicalText("x").divide("y");
 IMathElement denominator = mathFraction.getDenominator();

Returns: IMathElement