@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.
26 lines (25 loc) • 899 B
TypeScript
import { Angle } from "../types/Angle.js";
import { Point } from "../types/Point.js";
import { ShapeDefinition } from "./ShapeDefinition.js";
/**
* Class representing a Rectangle definition.
*/
export declare class RectangleDefinition extends ShapeDefinition {
/** The position of the rectangle. */
position: Point;
/** The width of the rectangle. */
width: number;
/** The height of the rectangle. */
height: number;
/** The angle of the rectangle. */
angle: Angle;
/**
* Creates a new instance of RectangleDefinition.
*
* @param position - The position of the rectangle (top-left or center).
* @param width - The width of the rectangle.
* @param height - The height of the rectangle.
* @param angle - The angle of the rectangle in degrees.
*/
constructor(position: Point, width: number, height: number, angle: Angle);
}