func newCodeLayout(size *dmCodeSize) *codeLayout { result := new(codeLayout) result.matrix = utils.NewBitList(size.MatrixColumns() * size.MatrixRows()) result.occupy = utils.NewBitList(size.MatrixColumns() * size.MatrixRows()) result.size = size return result }
func newDataMatrixCode(size *dmCodeSize) *datamatrixCode { return &datamatrixCode{utils.NewBitList(size.Rows * size.Columns), size, ""} }
func newBarcode(dim int) *qrcode { res := new(qrcode) res.dimension = dim res.data = utils.NewBitList(dim * dim) return res }