% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render_alpha_outline.R
\name{fill_alpha_gaps}
\alias{fill_alpha_gaps}
\title{Fill Border Alpha Gaps}
\usage{
fill_alpha_gaps(alpha, max_gap = 1, alpha_threshold = 0.25)
}
\arguments{
\item{alpha}{Numeric alpha matrix.}

\item{max_gap}{Default \code{1}. Maximum low-alpha run width, in pixels, to bridge.}

\item{alpha_threshold}{Default \code{0.25}. Alpha threshold used to decide which
pixels are low-alpha border gaps.}
}
\value{
Numeric alpha matrix with eligible border gaps filled.
}
\description{
Internal post-process for small distance-transform
quantization artifacts on outline edges. The algorithm first calls
\code{find_border_alpha_gaps()} to mark only low-alpha pixels connected to the
image exterior. It then scans horizontal, vertical, and diagonal directions.
For each gap width up to \code{max_gap}, \code{offset_alpha()} samples the alpha values
on opposite sides of each candidate gap. A candidate pixel is raised to the
weaker of the two neighboring alpha values, and only if that pixel was marked
as border-connected. This bridges edge notches while leaving enclosed
interior holes unchanged.
}
\keyword{internal}
