Rather than declaring arguments (and struct fields) as Vector{IntPoint}, it would be more generic to allow AbstractVector{IntPoint}. This can still be passed to C libraries as long as it supports a pointer conversion, and you could check that the stride(array,1) == 1 so that it is contiguous — these will throw a MethodError for array types that don't support these operations.
(It also might be convenient to use const IntPoint = SVector{2,Int64}.)
See also this discourse discussion
Rather than declaring arguments (and
structfields) asVector{IntPoint}, it would be more generic to allowAbstractVector{IntPoint}. This can still be passed to C libraries as long as it supports apointerconversion, and you could check that thestride(array,1) == 1so that it is contiguous — these will throw aMethodErrorfor array types that don't support these operations.(It also might be convenient to use
const IntPoint = SVector{2,Int64}.)See also this discourse discussion