import { AcApContext } from '../app'; import { AcEdCommand } from '../editor'; /** * AutoCAD-style ZOOM command with keyword-driven branches in a single command. * * Supported flows: * - Press Enter: zoom extents. * - Pick first corner: zoom window. * - Keywords: * - `All` / `Extents`: zoom extents. * - `Window`: prompt two corners and zoom to that box. * - `Center`: prompt center + height/scale factor. * - `Scale`: scale relative to current view (`n`, `nX`, `nXP`). * - `Previous`: restore previous zoom box. * * This command intentionally keeps all zoom branches in one implementation so * callers can use script-style command input such as: * * ```text * zoom * window * ``` */ export declare class AcApZoomCmd extends AcEdCommand { /** * Stores the last view box before a zoom operation so `Previous` can restore it. */ private static previousViewBox?; /** * Captures current visible world box from the viewport corners. * * @param context - Current command context. * @returns Current view box in world coordinates. */ private captureCurrentViewBox; /** * Saves current view box before executing a zoom branch. * * @param context - Current command context. */ private rememberViewBeforeZoom; /** * Executes extents-like zoom and records previous view for rollback. * * @param context - Current command context. */ private zoomToExtents; /** * Executes window zoom from two corner points. * * @param context - Current command context. * @param first - First corner in WCS. * @param second - Opposite corner in WCS. */ private zoomToWindow; /** * Prompts second corner from a known first corner, then performs window zoom. * * @param context - Current command context. * @param firstCorner - First window corner in WCS. */ private promptAndZoomWindowFromFirstCorner; /** * Prompts a window box using editor `getBox`, then zooms to that box. * * @param context - Current command context. */ private promptAndZoomWindowByBox; /** * Handles `Center` branch: * - pick center point * - input height or scale factor * * @param context - Current command context. */ private runCenter; /** * Parses scale factor text from AutoCAD-like inputs: * - `2` / `2x` / `2xp` * * @param raw - Raw user input. * @returns Positive scale factor, or `undefined` when invalid. */ private parseScaleFactor; /** * Applies relative zoom around the specified center (or current view center). * * @param context - Current command context. * @param factor - Relative zoom factor (> 0). * @param centerPoint - Optional explicit zoom center in WCS. */ private applyRelativeScale; /** * Restores previous view box if one exists and swaps buffers to allow toggling. * * @param context - Current command context. */ private runPrevious; /** * Runs zoom interaction with keyword-capable branching. * * @param context - Current command context. */ execute(context: AcApContext): Promise; } //# sourceMappingURL=AcApZoomCmd.d.ts.map