internal void CopyTo(TriStateMatrix target, MatrixRectangle sourceArea, MatrixPoint targetPoint, MatrixStatus mstatus) { for (int j = 0; j < sourceArea.Size.Height; j++) { for (int i = 0; i < sourceArea.Size.Width; i++) { bool value = this[sourceArea.Location.X + i, sourceArea.Location.Y + j]; target[targetPoint.X + i, targetPoint.Y + j, mstatus] = value; } } }
public static bool CreateTriStateMatrix(bool[,] internalArray, out TriStateMatrix triStateMatrix) { triStateMatrix = null; if (CanCreate(internalArray)) { triStateMatrix = new TriStateMatrix(internalArray); return(true); } return(false); }
private static BitMatrix ProcessEncodationResult(EncodationStruct encodeStruct, ErrorCorrectionLevel errorLevel) { BitList codewords = ECGenerator.FillECCodewords(encodeStruct.DataCodewords, encodeStruct.VersionDetail); TriStateMatrix triMatrix = new TriStateMatrix(encodeStruct.VersionDetail.MatrixWidth); PositioninngPatternBuilder.EmbedBasicPatterns(encodeStruct.VersionDetail.Version, triMatrix); triMatrix.EmbedVersionInformation(encodeStruct.VersionDetail.Version); triMatrix.EmbedFormatInformation(errorLevel, new Pattern0()); triMatrix.TryEmbedCodewords(codewords); return triMatrix.GetLowestPenaltyMatrix(errorLevel); }
private static BitMatrix ProcessEncodationResult(EncodationStruct encodeStruct, ErrorCorrectionLevel errorLevel) { BitList codewords = ECGenerator.FillECCodewords(encodeStruct.DataCodewords, encodeStruct.VersionDetail); TriStateMatrix triMatrix = new TriStateMatrix(encodeStruct.VersionDetail.MatrixWidth); PositioningPatternBuilder.EmbedBasicPatterns(encodeStruct.VersionDetail.Version, triMatrix); triMatrix.EmbedVersionInformation(encodeStruct.VersionDetail.Version); triMatrix.EmbedFormatInformation(errorLevel, new Pattern0()); triMatrix.TryEmbedCodewords(codewords); return(triMatrix.GetLowestPenaltyMatrix(errorLevel)); }
public static bool CreateTriStateMatrix(bool[,] internalArray, out TriStateMatrix triStateMatrix) { triStateMatrix = null; if (internalArray == null) { return(false); } if (internalArray.GetLength(0) == internalArray.GetLength(1)) { triStateMatrix = new TriStateMatrix(internalArray); return(true); } else { return(false); } }
internal void CopyTo(TriStateMatrix target, MatrixPoint targetPoint, MatrixStatus mstatus) { CopyTo(target, new MatrixRectangle(new MatrixPoint(0, 0), new MatrixSize(Width, Height)), targetPoint, mstatus); }
internal void CopyTo(TriStateMatrix target, MatrixPoint targetPoint, MatrixStatus mstatus) { CopyTo(target, new MatrixRectangle(new MatrixPoint(0,0), new MatrixSize(Width, Height)), targetPoint, mstatus); }
public static bool CreateTriStateMatrix(bool[,] internalArray, out TriStateMatrix triStateMatrix) { triStateMatrix = null; if (internalArray == null) return false; if (internalArray.GetLength(0) == internalArray.GetLength(1)) { triStateMatrix = new TriStateMatrix(internalArray); return true; } else { return false; } }