import { TgdColor } from "../color";
import { TgdVec3, TgdVec4 } from "../math";
import { ArrayNumber3, ArrayNumber4 } from "../types";
/**
 * Helper to get a canvas with the given size.
 */
export declare function tgdCanvasCreate(width: number, height: number): HTMLCanvasElement;
/**
 * Helper to get a canvas of the given size and a 2D context on it.
 * If this is not possible, the method will throw an exception.
 */
export declare function tgdCanvasCreateWithContext2D(width: number, height: number, settings?: CanvasRenderingContext2DSettings): {
    canvas: HTMLCanvasElement;
    ctx: CanvasRenderingContext2D;
};
export declare function tgdCanvasFromImage(img: HTMLImageElement): HTMLCanvasElement;
export declare function tgdCanvasToArrayBuffer(canvas: HTMLCanvasElement, type?: "image/png" | "image/jpeg" | "image/webp", quality?: number): Promise<ArrayBuffer>;
/**
 * A palette is an image with a different (or not) color for each pixel.
 * It can be used in a texture with NEAREST filter, for instance.
 * @param colors CSS colors of each pixel
 * @param colums If not defined, the canvas will have a size of (colors.length, 1).
 * But if `colums` is defined, it will be the width of the vanva and the height will
 * be computed to hold all the colors.
 * If there are more pixels in the canvas that colors, we just wrap around the colors
 * array.
 * @param rows If defined, it will be the height of the canvas.
 * @example
 * ```
 * // Create a 5x5 checkboard.
 * const canvas = tgdCanvasCreatePalette(["#000", "#fff"], 5, 5)
 * ```
 */
export declare function tgdCanvasCreatePalette(colors: (string | TgdColor | ArrayNumber4 | TgdVec4 | ArrayNumber3 | TgdVec3)[], colums?: number, rows?: number): HTMLCanvasElement;
export declare function tgdCanvasCreateFill(width: number, height: number, fillColor?: string | TgdColor | ArrayNumber4 | TgdVec4 | ArrayNumber3 | TgdVec3): HTMLCanvasElement;
export declare function tgdCanvasCreateGradientHorizontal(size: number, colors: Array<string | TgdColor | ArrayNumber4 | TgdVec4 | ArrayNumber3 | TgdVec3>): HTMLCanvasElement;
export declare function tgdCanvasCreateCreateGradientvertical(size: number, colors: Array<string | TgdColor | ArrayNumber4 | TgdVec4 | ArrayNumber3 | TgdVec3>): HTMLCanvasElement;
/**
 * Create a canvas with a linear gradient.
 * @param width Width of the resulting canvas.
 * @param height Height of the resulting canvas.
 * @param directionX X coord of the direction vector.
 * @param directionY Y coord of the direction vector.
 * @param colors CSS colors of each step
 */
export declare function tgdCanvasCreateGradient(width: number, height: number, directionX: number, directionY: number, colors: Array<string | TgdColor | ArrayNumber4 | TgdVec4 | ArrayNumber3 | TgdVec3>): HTMLCanvasElement;
//# sourceMappingURL=canvas.d.ts.map