UNPKG

@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.

30 lines (29 loc) 912 B
import { IRectangleOptions } from "./interfaces/IRectangleOptions.js"; /** * Options for configuring the behavior of a rectangle shape. */ export declare class RectangleOptions implements IRectangleOptions { /** * Determines if the shape should be visible or not. */ visible: boolean; /** * Determines if the shape can be dragged by mouse. */ draggable: boolean; /** * If true, the rectangle will be centered at the provided position. * If false or undefined, the rectangle will be positioned from the top-left corner. */ centered: boolean; /** * Default options for the rectangle. */ static readonly DefaultOptions: IRectangleOptions; /** * Creates a new instance of RectangleOptions. * * @param options - The partial options provided by the user. */ constructor(options?: Partial<IRectangleOptions>); }