offset_alpha: Offset Alpha Matrix

View source: R/render_alpha_outline.R

offset_alphaR Documentation

Offset Alpha Matrix

Description

Internal shift helper used by fill_alpha_gaps(). It returns a same-size alpha matrix shifted by integer row and column offsets, filling newly exposed pixels with zero instead of wrapping. This lets the gap-filling scan compare pixels a fixed distance away on opposite sides of a candidate gap.

Usage

offset_alpha(alpha, row_offset, col_offset)

Arguments

alpha

Numeric alpha matrix.

row_offset

Integer row offset. Positive values sample from rows below each output pixel.

col_offset

Integer column offset. Positive values sample from columns to the right of each output pixel.

Value

Numeric alpha matrix with the same dimensions as alpha.


rayimage documentation built on June 12, 2026, 5:06 p.m.