tidy
This commit is contained in:
@@ -9,24 +9,24 @@ namespace Gma.QrCodeNet.Encoding;
|
||||
|
||||
internal static class QRCodeEncode
|
||||
{
|
||||
internal static BitMatrix Encode(string content, ErrorCorrectionLevel errorLevel)
|
||||
{
|
||||
EncodationStruct encodeStruct = DataEncode.Encode(content, errorLevel);
|
||||
internal static BitMatrix Encode(string content, ErrorCorrectionLevel errorLevel)
|
||||
{
|
||||
EncodationStruct encodeStruct = DataEncode.Encode(content, errorLevel);
|
||||
|
||||
return ProcessEncodationResult(encodeStruct, errorLevel);
|
||||
}
|
||||
return ProcessEncodationResult(encodeStruct, errorLevel);
|
||||
}
|
||||
|
||||
private static BitMatrix ProcessEncodationResult(EncodationStruct encodeStruct, ErrorCorrectionLevel errorLevel)
|
||||
{
|
||||
BitList codewords = ECGenerator.FillECCodewords(encodeStruct.DataCodewords, encodeStruct.VersionDetail);
|
||||
private static BitMatrix ProcessEncodationResult(EncodationStruct encodeStruct, ErrorCorrectionLevel errorLevel)
|
||||
{
|
||||
BitList codewords = ECGenerator.FillECCodewords(encodeStruct.DataCodewords, encodeStruct.VersionDetail);
|
||||
|
||||
TriStateMatrix triMatrix = new(encodeStruct.VersionDetail.MatrixWidth);
|
||||
PositioningPatternBuilder.EmbedBasicPatterns(encodeStruct.VersionDetail.Version, triMatrix);
|
||||
TriStateMatrix triMatrix = new(encodeStruct.VersionDetail.MatrixWidth);
|
||||
PositioningPatternBuilder.EmbedBasicPatterns(encodeStruct.VersionDetail.Version, triMatrix);
|
||||
|
||||
triMatrix.EmbedVersionInformation(encodeStruct.VersionDetail.Version);
|
||||
triMatrix.EmbedFormatInformation(errorLevel, new Pattern0());
|
||||
triMatrix.TryEmbedCodewords(codewords);
|
||||
triMatrix.EmbedVersionInformation(encodeStruct.VersionDetail.Version);
|
||||
triMatrix.EmbedFormatInformation(errorLevel, new Pattern0());
|
||||
triMatrix.TryEmbedCodewords(codewords);
|
||||
|
||||
return triMatrix.GetLowestPenaltyMatrix(errorLevel);
|
||||
}
|
||||
}
|
||||
return triMatrix.GetLowestPenaltyMatrix(errorLevel);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user