// Path: mathdragon/src/main/java/org/teaminfty/math_dragon/view/TypefaceHolder.java
// public final class TypefaceHolder
// {
//     /** Initialises the fonts from the given {@link AssetManager}
//      * @param assets The {@link AssetManager} */
//     public static void loadFromAssets(AssetManager assets)
//     {
//         dejavuSans = Typeface.createFromAsset(assets, "DejaVuSans.ttf");
//     }
//     
//     /** The DejaVu sans font */
//     public static Typeface dejavuSans = null;
// }


import org.teaminfty.math_dragon.view.TypefaceHolder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
    public Function()
    {
        this(FunctionType.SIN);
    }
    
    /**
     * Constructor with specified type
     * 
     * @param t
     *        The kind of function that we're constructing
     */
    public Function(FunctionType t)
    {
        this(t, null);
    }

    /**
     * Constructor with specified type and value.
     * 
     * @param t
     *        The kind of function that we're constructing
     * @param value
     *        The mathematical expression
     */
    public Function(FunctionType t, Expression value)
    {
        type = t;
        children.add(value != null ? value : new Empty());
        operatorPaint.setAntiAlias(true);
        operatorPaint.setStrokeWidth(Expression.lineWidth);
// Path: mathdragon/src/main/java/org/teaminfty/math_dragon/view/TypefaceHolder.java
// public final class TypefaceHolder
// {
//     /** Initialises the fonts from the given {@link AssetManager}
//      * @param assets The {@link AssetManager} */
//     public static void loadFromAssets(AssetManager assets)
//     {
//         dejavuSans = Typeface.createFromAsset(assets, "DejaVuSans.ttf");
//     }
//     
//     /** The DejaVu sans font */
//     public static Typeface dejavuSans = null;
// }


// Path: mathdragon/src/main/java/org/teaminfty/math_dragon/view/math/Function.java
import org.teaminfty.math_dragon.view.TypefaceHolder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;

    public Function()
    {
        this(FunctionType.SIN);
    }
    
    /**
     * Constructor with specified type
     * 
     * @param t
     *        The kind of function that we're constructing
     */
    public Function(FunctionType t)
    {
        this(t, null);
    }

    /**
     * Constructor with specified type and value.
     * 
     * @param t
     *        The kind of function that we're constructing
     * @param value
     *        The mathematical expression
     */
    public Function(FunctionType t, Expression value)
    {
        type = t;
        children.add(value != null ? value : new Empty());
        operatorPaint.setAntiAlias(true);
        operatorPaint.setStrokeWidth(Expression.lineWidth);
        operatorPaint.setTypeface(TypefaceHolder.dejavuSans);