private Version(int versionNumber, ECBlocks ecBlocks1, ECBlocks ecBlocks2, ECBlocks ecBlocks3, ECBlocks ecBlocks4) { this.versionNumber = versionNumber; this.ecBlocks = new ECBlocks[] { ecBlocks1, ecBlocks2, ecBlocks3, ecBlocks4 }; int total = 0; int ecCodewords = ecBlocks1.ECCodewordsPerBlock; ECB[] ecbArray = ecBlocks1.getECBlocks(); for (int i = 0; i < ecbArray.Length; i++) { ECB ecBlock = ecbArray[i]; //ECBlocks(7, new ECB(1, 19) 19+7=26 total += ecBlock.Count * (ecBlock.DataCodewords + ecCodewords); } this.totalCodewords = total; }
private Version(int versionNumber, int[] alignmentPatternCenters, ECBlocks ecBlocks1, ECBlocks ecBlocks2, ECBlocks ecBlocks3, ECBlocks ecBlocks4) { this.versionNumber = versionNumber; this.alignmentPatternCenters = alignmentPatternCenters; this.ecBlocks = new ECBlocks[]{ecBlocks1, ecBlocks2, ecBlocks3, ecBlocks4}; int total = 0; int ecCodewords = ecBlocks1.ECCodewordsPerBlock; ECB[] ecbArray = ecBlocks1.getECBlocks(); for (int i = 0; i < ecbArray.Length; i++) { ECB ecBlock = ecbArray[i]; total += ecBlock.Count * (ecBlock.DataCodewords + ecCodewords); } this.totalCodewords = total; }