Overview
ThePoint type represents a two-dimensional coordinate in the canvas space. It is used throughout the application for tracking mouse positions, annotation coordinates, and canvas transformations.
Type Definition
types.ts
Properties
The horizontal coordinate (distance from the left edge)
The vertical coordinate (distance from the top edge)
Usage
ThePoint type is used in various contexts throughout the application:
Canvas Interaction
Pan and Zoom
Annotation Transformations
ThePoint type is also used within the AnnotationTransform type to track the starting pointer position during move and resize operations.
Coordinate System
- Origin (0, 0) is at the top-left corner
- X increases to the right
- Y increases downward
- Coordinates are in image space (pixels relative to the natural image dimensions)
Related Types
- AnnotationBox - Uses x, y coordinates for positioning
- AnnotationTransform - Uses Point for tracking pointer positions