/**
 * A generic toolbox class that contains numerous geometrical static functions.
 * The functions often require a context, which is got from a canvas element.
 */
export declare class Shape {
    /**
     * Draws lines that join each point of the list parameter
     * @param list A list of points: [[x1, y1], [x2, y2],..., [xn, yn]]
     */
    static drawLine(context: any, list: any): void;
    /**
     * Draws a crux
     * @param cx center x coordinate of the crux
     * @param cy center y coordinate of the crux
     * @param length half the length of the crux
     */
    static crux(context: any, cx: number, cy: number, length: number): void;
    /**
     *
     * @param x x coordinate of the top-left corner
     * @param y y coordinate od the top_left corner
     * @param w width
     * @param h height
     * @param radius radius of the corners
     * @param context canvas' context element
     * @param opacity between 0 and 1
     * @param dashline a pattern list [a_0,..., a_n] where a_i represents the number of filled pixels is i%2 == 0
     and the number of empty pixels if i%2 != 0. [] for no dashline.
     */
    static roundRect(x: any, y: any, w: any, h: any, radius: any, context: any, color_fill?: string, color_stroke?: string, line_width?: number, opacity?: number, dashline?: any[]): void;
    /**
     * @returns true if (x, y) is in the rectangle, false otherwise
     * @param x the point's x coordinate
     * @param y the point's y coordinate
     * @param rect_x the rectangle's top_left x coordinate
     * @param rect_y the rectangle's top-left y coordinate
     * @param rect_w the rectangle's width
     * @param rect_h the rectangle's height
     */
    static isInRect(x: any, y: any, rect_x: any, rect_y: any, rect_w: any, rect_h: any): boolean;
    static createButton(x: any, y: any, w: any, h: any, context: any, text: any, police: any): void;
    static createGraphButton(x: any, y: any, w: any, h: any, context: any, text: any, police: any, color_fill: any, strikeout: any): void;
    /**
     * Draws a rectangle on canvas.
     * @param x the rectangle's top-left x coordinate
     * @param y the rectangle's top-left y coordinate
     * @param w the rectangle's width
     * @param h the rectangle's height
     * @param context canvas' context
     * @param color_fill the rectangle's fill color. Can be set to 'No' if the rectangle
     doesn't have to be filled.
     * @param color_stroke its stroke color. It can be set to 'No' if a contour isn't needed.
     * @param line_width its contour's line width.
     * @param opacity The opacity inside (from 0 to 1).
     * @param dashline contour's dashline ([] for no dashline). A pattern list [a_0,..., a_n] where a_i represents the number of filled pixels is i%2 == 0
     and the number of empty pixels if i%2 != 0.
     */
    static rect(x: any, y: any, w: any, h: any, context: any, color_fill?: string, color_stroke?: string, line_width?: number, opacity?: number, dashline?: any[]): void;
    /**
     *
     * @param x The point's x coordinate
     * @param y The point's y coordinate
     * @param cx The circle's center x-coordinate
     * @param cy Thre circle's center y-coordinate
     * @param r The circle's radius
     */
    static isInCircle(x: any, y: any, cx: any, cy: any, r: any): boolean;
}
export declare class MyObject {
    /**
     * Returns the input dictionary without keys that are in input.
     */
    static removeEntries(keys: string[], dict_: any): {
        [k: string]: unknown;
    };
    /**
     * A shallow copy.
     */
    static copy(obj: any): any;
    /**
     * A function that clones without references. It handles circular references.
     */
    static deepClone(obj: any, hash?: WeakMap<object, any>): any;
    static add_properties(obj: Object, ...entries: [string, any][]): Object;
}
/**
 * A toolbox with useful functions that manipulate arrays.
 */
export declare class List {
    /**
     *
     * @returns a sub-array from i to j-1 included. Ex : subarray([0,1,2,3], 1, 3) = [1,2]
     */
    static subarray(list: any, i: any, j: any): any;
    /**
     * @returns the input list without its duplicates.
     */
    static remove_duplicates(list: any[]): any[];
    /**
     * @returns true if the list contains a undefined element, false otherwise.
     */
    static contains_undefined(list: any[]): boolean;
    static copy(list: any[]): any[];
    /**
     * @returns a the input list without the first element equal to val.
     */
    static remove_first_selection(val: any, list: any[]): any[];
    /**
     * Compares two lists by comparing their elements using ===
     */
    static equals(list1: any, list2: any): boolean;
    /**
     * @returns The input list without all instances of val.
     */
    static remove_element(val: any, list: any[]): any[];
    /**
     * @returns true or false whether val is inside list or not. It uses a generic equals function
     */
    static is_include(val: any, list: any[]): boolean;
    /**
     * @returns true or false whether a list is inside an array of list. It uses a generic equals function.
     */
    static is_list_include(list: any[], listArray: any[][]): boolean;
    /**
     * Provided that obj_list is a list of objects (ie. dictionary is TS), it returns true if a element
     of obj_list has an attribute 'name' equal to the input name, and false otherwise.
     */
    static is_name_include(name: string, obj_list: any[]): boolean;
    /**
     * @returns [min, max] of the input list
     * @param list a list of real numbers
     */
    static getExtremum(list: number[]): [number, number];
    /**
     * @returns a list where value is inserted at index inside list
     */
    static insert(value: any, index: number, list: any[]): void;
    /**
     * @returns the index of val in list
     */
    static get_index_of_element(val: any, list: any[]): number;
    /**
     * @returns The input list after removing its element at index i
     */
    static remove_at_index(i: number, list: any[]): any[];
    static remove_at_indices(start_index: number, end_index: number, list: any[]): any[];
    /**
     * @returns the input list after removing its element at index old_index and
     * inserting it at new_index
     */
    static move_elements(old_index: number, new_index: number, list: any[]): any[];
    /**
     * Exchanges list's elements at index1 and index2.
     */
    static switchElements(list: any[], index1: number, index2: number): void;
    static reverse(list: any[]): any[];
    /**
     * Checks whether list is a list of empty list, ie [[], [],..., []]
     */
    static isListOfEmptyList(list: any[]): boolean;
    /**
     * @returns A list that contains all elements that are inside both list1 and list2
     */
    static listIntersection(list1: any[], list2: any[]): any[];
    /**
     * @returns A list that contains all elements that are inside both list1 and list2. If one list is empty, then it returns the other list.
     */
    static listIntersectionExceptEmpty(list1: any[], list2: any[]): any[];
    /**
     * @returns a list that contains list's elements at index <list_index[i].
     ex: getListEltFromIndex([1,2], ['a', 'b', 'c', 'd']) = ['b', 'c']
     */
    static getListEltFromIndex(list_index: number[], list: any[]): any[];
    /**
     * @returns the union of list1 and list2, ie a list that contains elements that are
     inside list1 or list2
     */
    static union(list1: any[], list2: any[]): any[];
    /**
     * @param to_remove a list that contains elements to be removed from list
     */
    static remove_selection(to_remove: any[], list: any[]): any[];
}
/**
 * A toolbox class that contains useful functions that don't exist in typescript API.
 */
export declare class MyMath {
    /**
     * ex: round(1.12345, 2) = 1.12
     */
    static round(x: number, n: number): number;
}
