import { Rectangle } from './infrastructure/Rectangle'; import { LGraphBadge, LGraphBadgeOptions } from './LGraphBadge'; export interface LGraphButtonOptions extends LGraphBadgeOptions { name?: string; } export declare class LGraphButton extends LGraphBadge { name?: string; _last_area: Rectangle; constructor(options: LGraphButtonOptions); getWidth(ctx: CanvasRenderingContext2D): number; /** * @internal * * Draws the button and updates its last rendered area for hit detection. * @param ctx The canvas rendering context. * @param x The x-coordinate to draw the button at. * @param y The y-coordinate to draw the button at. */ draw(ctx: CanvasRenderingContext2D, x: number, y: number): void; /** * Checks if a point is inside the button's last rendered area. * @param x The x-coordinate of the point. * @param y The y-coordinate of the point. * @returns `true` if the point is inside the button, otherwise `false`. */ isPointInside(x: number, y: number): boolean; }