UNPKG

pencil.js

Version:

Nice modular interactive 2D drawing library.

41 lines (40 loc) 1.07 kB
/** * Square class * <br><img src="./media/examples/square.png" alt="square demo"/> * @class * @extends Rectangle */ export default class Square extends Rectangle { /** * @inheritDoc * @param {Object} definition - Square definition * @return {Square} */ static from(definition: any): Square; /** * Square constructor * @param {PositionDefinition} positionDefinition - Top-left corner * @param {Number} size - Side's length * @param {ComponentOptions} [options] - Drawing options */ constructor(positionDefinition: any, size: number, options?: any); /** * Set this square's size * @param {Number} size - New size */ set size(arg: number); /** * Get this square's size * @return {Number} */ get size(): number; [widthKey]: number; [heightKey]: number; } import Rectangle from "@pencil.js/rectangle"; /** * @module Square */ declare const widthKey: unique symbol; declare const heightKey: unique symbol; export {};