MCPcopy Create free account
hub / github.com/RustCV/RustCV / pixel_idx

Function pixel_idx

rustcv-backend-avf/examples/camera_view.rs:284–291  ·  view source on GitHub ↗
(x: usize, y: usize, width: usize, buf_len: usize)

Source from the content-addressed store, hash-verified

282#[cfg(target_os = "macos")]
283#[inline]
284fn pixel_idx(x: usize, y: usize, width: usize, buf_len: usize) -> Option<usize> {
285 let idx = y * width + x;
286 if idx < buf_len && x < width {
287 Some(idx)
288 } else {
289 None
290 }
291}
292
293/// 返回 ASCII 字符的 5×7 点阵位图。
294///

Callers 1

draw_text_osdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected