private static void EmbedHorizontalSeparationPattern(int xStart, int yStart,
ByteMatrix matrix) {
// We know the width and height.
if (HORIZONTAL_SEPARATION_PATTERN[0].Length != 8 || HORIZONTAL_SEPARATION_PATTERN.GetLength(0) != 1) {
throw new WriterException("Bad horizontal separation pattern");
}
for (int x = 0; x < 8; ++x) {
if (!IsEmpty(matrix.Get(xStart + x, yStart))) {
throw new WriterException();
}
matrix.Set(xStart + x, yStart, HORIZONTAL_SEPARATION_PATTERN[0][x]);
}
}