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.

28 lines (27 loc) 901 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CanvasCursorStyle = void 0; const Cursor_js_1 = require("../types/Cursor.js"); /** * Represents the cursor style configuration for a canvas, defining how the cursor appears in * different states such as default and pan (dragging) mode. */ class CanvasCursorStyle { /** * Creates a new instance of CanvasCursorStyle. * * @param style - The partial style provided by the user. */ constructor(style = {}) { const styleWithDefaults = Object.assign(Object.assign({}, CanvasCursorStyle.DefaultStyle), style); Object.assign(this, styleWithDefaults); } } exports.CanvasCursorStyle = CanvasCursorStyle; /** * Default style for the canvas cursors. */ CanvasCursorStyle.DefaultStyle = { default: Cursor_js_1.Cursor.Default, panActive: Cursor_js_1.Cursor.Grabbing };