Skip to main content

extend

Function extend 

Source
fn extend(coord: i32, size: u16, edge_mode: EdgeMode) -> u16
Expand description

Extend a coordinate beyond image boundaries according to the edge mode.

Transforms out-of-bounds coordinates for sampling: clamped, wrapped, or mirrored depending on the mode. For EdgeMode::None, the coordinate is guaranteed to be in-bounds (already checked by caller, which returns transparent black for out-of-bounds).