(typeNumber, errorCorrectLevel)
| 76 | }; |
| 77 | |
| 78 | function QRCodeModel(typeNumber, errorCorrectLevel) { |
| 79 | this.typeNumber = typeNumber; |
| 80 | this.errorCorrectLevel = errorCorrectLevel; |
| 81 | this.modules = null; |
| 82 | this.moduleCount = 0; |
| 83 | this.dataCache = null; |
| 84 | this.dataList = []; |
| 85 | } |
| 86 | |
| 87 | QRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+","+col);} |
| 88 | return this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row<this.moduleCount;row++){this.modules[row]=new Array(this.moduleCount);for(var col=0;col<this.moduleCount;col++){this.modules[row][col]=null;}} |
nothing calls this directly
no outgoing calls
no test coverage detected