Returns the column (or row) of a mask that sample index of the base image falls on, by its centre.
public static int MaskIndex(int index, int size, int maskSize)
The base image's column (or row).
The base image's width (or height).
The mask's width (or height).
ISO 32000-2 §8.9.6.3 and §11.6.5.2: a mask and its image both map onto the unit square, whatever their resolutions, so a mask is sampled at its own resolution when drawn rather than resampled when decoded.