private static void embedPositionDetectionPatternsAndSeparators(ByteMatrix matrix)
{
// Embed three big squares at corners.
int pdpWidth = POSITION_DETECTION_PATTERN[0].Length;
// Left top corner.
embedPositionDetectionPattern(0, 0, matrix);
// Right top corner.
embedPositionDetectionPattern(matrix.Width - pdpWidth, 0, matrix);
// Left bottom corner.
embedPositionDetectionPattern(0, matrix.Width - pdpWidth, matrix);
// Embed horizontal separation patterns around the squares.
const int hspWidth = 8;
// Left top corner.
embedHorizontalSeparationPattern(0, hspWidth - 1, matrix);
// Right top corner.
embedHorizontalSeparationPattern(matrix.Width - hspWidth, hspWidth - 1, matrix);
// Left bottom corner.
embedHorizontalSeparationPattern(0, matrix.Width - hspWidth, matrix);
// Embed vertical separation patterns around the squares.
const int vspSize = 7;
// Left top corner.
embedVerticalSeparationPattern(vspSize, 0, matrix);
// Right top corner.
embedVerticalSeparationPattern(matrix.Height - vspSize - 1, 0, matrix);
// Left bottom corner.
embedVerticalSeparationPattern(vspSize, matrix.Height - vspSize, matrix);
}