Snap ROI vertices to a grid
Usage
at_snap(roi, grid = 1, call = rlang::caller_env())Arguments
- roi
An annot_roi.
- grid
Positive numeric grid spacing in pixels. Default
1.- call
The calling environment, for error reporting.
Value
An annot_roi with vertices rounded to the nearest grid multiple.
Examples
at_snap(at_roi_point(3.4, 5.6, label = "a"), grid = 1)
#> <annot_roi> a (POINT)
#> id: "roi_000000075" | level: 0 | source: manual
#> bbox: [3, 6] - [3, 6]