/** * CrosshairTool - Crosshair positioning and cursor point conversion * * Extracted from DrawToolCore.ts: * - enableCrosshair * - convertCursorPoint * - setUpSphereOrigins */ import { BaseTool } from "./BaseTool"; import type { IConvertObjType } from "../core/types"; export declare class CrosshairTool extends BaseTool { enableCrosshair(): void; /** * Convert cursor point between axis views. * * MRI slices are generated from threejs based on mm, but displayed based on pixel distance. * The index number on each axis is the slice's depth in mm distance. * Width/height on screen is in pixel distance. * * When switching views, we convert depth to pixel distance and vice versa. * * @param from Current view axis * @param to Target view axis * @param cursorNumX Cursor X on current axis (pixel distance) * @param cursorNumY Cursor Y on current axis (pixel distance) * @param currentSliceIndex Current slice depth (mm distance) */ convertCursorPoint(from: "x" | "y" | "z", to: "x" | "y" | "z", cursorNumX: number, cursorNumY: number, currentSliceIndex: number): IConvertObjType | undefined; /** * Render crosshair lines on the drawing context. * Called from the start() render loop when crosshair mode is active. * * @param ctx - The drawing canvas 2D context * @param width - Canvas width (changedWidth) * @param height - Canvas height (changedHeight) */ renderCrosshair(ctx: CanvasRenderingContext2D, width: number, height: number): void; private drawLine; setUpSphereOrigins(mouseX: number, mouseY: number, sliceIndex: number): void; }