import { Point } from './point'; /** * Represents a 2D bounding box with minimum and maximum coordinates */ export interface Box2d { minX: number; minY: number; maxX: number; maxY: number; } /** * Represents a shape defined by a collection of polylines and an optional last point. * Used to describe the geometry of a character in the SHX font. */ export declare class ShxShape { /** The last point in the shape's geometry, if any */ readonly lastPoint?: Point; /** Array of polylines, where each polyline is an array of points */ readonly polylines: Point[][]; /** Cached bounding box to avoid recalculation */ private _bbox?; constructor(lastPoint?: Point, polylines?: Point[][]); /** * Get the bounding box of the shape * @returns Bounding box of the shape */ get bbox(): Box2d; /** * Offset the shape by a point * @param p The point to offset the shape by * @param isNewInstance Whether to return a new instance of the shape or modify the current instance * @returns The offset shape */ offset(p: Point, isNewInstance?: boolean): ShxShape; /** * Normalizes a shape so that its bounding box’s bottom-left corner moves to the origin (0,0). * It doesn’t change the size or orientation, only repositions the shape. * @param isNewInstance Whether to return a new instance of the shape or modify the current instance * @returns The offset shape */ normalizeToOrigin(isNewInstance?: boolean): ShxShape; /** * Converts the shape to an SVG string * @param options SVG rendering options * @returns SVG string */ toSVG(options?: { strokeWidth?: string; strokeColor?: string; isAutoFit?: boolean; }): string; }