@avolutions/canvas-painter
Version:
CanvasPainter.js is a simple yet powerful JavaScript library for drawing basic shapes (rectangles, circles, etc.) on HTML5 Canvas with ease. Perfect for creating 2D graphics in your web projects.
47 lines (46 loc) • 1.24 kB
TypeScript
import { ICanvasOptions } from "./interfaces/ICanvasOptions.js";
import { IPanOptions } from "./interfaces/IPanOptions.js";
import { ZoomOptions } from "./ZoomOptions.js";
/**
* Options for configuring the behavior of a canvas.
*/
export declare class CanvasOptions implements ICanvasOptions {
/**
* The width of the canvas in pixels.
*/
width: number;
/**
* The height of the canvas in pixels.
*/
height: number;
/**
* Determines whether interactivity is enabled for the canvas.
*/
interactive: boolean;
/**
* Whether zooming is enabled on the canvas.
*/
zoomable: boolean;
/**
* The options for configuring the zoom behavior of the canvas.
*/
zoom: ZoomOptions;
/**
* Whether panning is enabled on the canvas.
*/
pannable: boolean;
/**
* The options for configuring the pan behavior of the canvas.
*/
pan: IPanOptions;
/**
* Default canvas options.
*/
static readonly DefaultOptions: ICanvasOptions;
/**
* Creates a new instance of CanvasOptions.
*
* @param options - The partial options provided by the user.
*/
constructor(options?: Partial<ICanvasOptions>);
}