Skip to contents

Test whether points fall inside an ROI

Usage

at_roi_contains(roi, x, y, call = rlang::caller_env())

Arguments

roi

An annot_roi.

x, y

Numeric coordinate vectors of equal length.

call

The calling environment, for error reporting.

Value

A logical vector of length length(x).

Examples

at_roi_contains(at_roi_rect(0, 0, 10, 10, label = "a"), c(5, 20), c(5, 20))
#> [1]  TRUE FALSE