UNPKG

@inweb/markup

Version:
81 lines (80 loc) 1.89 kB
import { IMarkupObject } from "./IMarkupObject"; import { IMarkupColorable } from "./IMarkupColorable"; /** * 2D markup Ellipse object interface. */ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable { /** * Returns the coordinates of the center point (position) of the ellipse. */ getPosition(): { x: number; y: number; }; /** * Sets the coordinates of the top-left point (position) of the ellipse. */ setPosition(x: number, y: number): void; /** * Returns the X radius of the ellipse. */ getRadiusX(): number; /** * Sets the X radius of the ellipse. */ setRadiusX(r: number): void; /** * Returns the Y radius of the ellipse. */ getRadiusY(): number; /** * Sets the X radius of the ellipse. */ setRadiusY(r: number): void; /** * Returns the line width of the ellipse. */ getLineWidth(): number; /** * Sets the line width of the ellipse. */ setLineWidth(size: number): void; } /** * Defines the parameters for creating a {@link IMarkupEllipse | markup ellipse}. */ export interface IMarkupEllipseParams { /** * Coordinates of the center point (position) of the ellipse. */ position?: { x: number; y: number; }; /** * Radius of the ellipse along the X and Y axes. * * @default 25 */ radius?: { x: number; y: number; }; /** * Line width. * * @default 4 */ lineWidth?: number; /** * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color components * (red, green, blue) written as hexadecimal numbers. * * @default "#ff0000" */ color?: string; /** * Internal markup object identifier. */ id?: string; }