@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.
24 lines (23 loc) • 832 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RectangleOptions = void 0;
const ShapeOptions_js_1 = require("./ShapeOptions.js");
/**
* Options for configuring the behavior of a rectangle shape.
*/
class RectangleOptions {
/**
* Creates a new instance of RectangleOptions.
*
* @param options - The partial options provided by the user.
*/
constructor(options = {}) {
const optionsWithDefaults = Object.assign(Object.assign({}, RectangleOptions.DefaultOptions), options);
Object.assign(this, optionsWithDefaults);
}
}
exports.RectangleOptions = RectangleOptions;
/**
* Default options for the rectangle.
*/
RectangleOptions.DefaultOptions = Object.assign(Object.assign({}, ShapeOptions_js_1.ShapeOptions.DefaultOptions), { centered: false });