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.

31 lines (30 loc) 871 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CircleStyle = void 0; const Cursor_js_1 = require("../types/Cursor.js"); const ShapeStyle_js_1 = require("./ShapeStyle.js"); /** * Represents the style options for a circle. */ class CircleStyle extends ShapeStyle_js_1.ShapeStyle { /** * Creates a new instance of CircleStyle. * * @param style - The partial style provided by the user. */ constructor(style = {}) { super(); const styleWithDefaults = Object.assign(Object.assign({}, CircleStyle.DefaultStyle), style); Object.assign(this, styleWithDefaults); } } exports.CircleStyle = CircleStyle; /** * Default style for the circle. */ CircleStyle.DefaultStyle = { borderColor: '#000000', borderWidth: 0, color: '#000000', cursor: Cursor_js_1.Cursor.Default };