Lines Matching defs:ncol
963 * @param $ncol (int) Number of columns.
971 protected function placeModule($marr, $nrow, $ncol, $row, $col, $chr, $bit) {
977 $col += $ncol;
978 $row += (4 - (($ncol + 4) % 8));
980 $marr[(($row * $ncol) + $col)] = ((10 * $chr) + $bit);
989 * @param $ncol (int) Number of columns.
996 protected function placeUtah($marr, $nrow, $ncol, $row, $col, $chr) {
997 $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-2, $chr, 1);
998 $marr = $this->placeModule($marr, $nrow, $ncol, $row-2, $col-1, $chr, 2);
999 $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-2, $chr, 3);
1000 $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col-1, $chr, 4);
1001 $marr = $this->placeModule($marr, $nrow, $ncol, $row-1, $col, $chr, 5);
1002 $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-2, $chr, 6);
1003 $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col-1, $chr, 7);
1004 $marr = $this->placeModule($marr, $nrow, $ncol, $row, $col, $chr, 8);
1013 * @param $ncol (int) Number of columns.
1018 protected function placeCornerA($marr, $nrow, $ncol, $chr) {
1019 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1);
1020 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 1, $chr, 2);
1021 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 2, $chr, 3);
1022 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4);
1023 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5);
1024 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6);
1025 $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7);
1026 $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8);
1035 * @param $ncol (int) Number of columns.
1040 protected function placeCornerB($marr, $nrow, $ncol, $chr) {
1041 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1);
1042 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2);
1043 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3);
1044 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-4, $chr, 4);
1045 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 5);
1046 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 6);
1047 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 7);
1048 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8);
1057 * @param $ncol (int) Number of columns.
1062 protected function placeCornerC($marr, $nrow, $ncol, $chr) {
1063 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-3, 0, $chr, 1);
1064 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-2, 0, $chr, 2);
1065 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 3);
1066 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4);
1067 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5);
1068 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 6);
1069 $marr = $this->placeModule($marr, $nrow, $ncol, 2, $ncol-1, $chr, 7);
1070 $marr = $this->placeModule($marr, $nrow, $ncol, 3, $ncol-1, $chr, 8);
1079 * @param $ncol (int) Number of columns.
1084 protected function placeCornerD($marr, $nrow, $ncol, $chr) {
1085 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, 0, $chr, 1);
1086 $marr = $this->placeModule($marr, $nrow, $ncol, $nrow-1, $ncol-1, $chr, 2);
1087 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-3, $chr, 3);
1088 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-2, $chr, 4);
1089 $marr = $this->placeModule($marr, $nrow, $ncol, 0, $ncol-1, $chr, 5);
1090 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-3, $chr, 6);
1091 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-2, $chr, 7);
1092 $marr = $this->placeModule($marr, $nrow, $ncol, 1, $ncol-1, $chr, 8);
1100 * @param $ncol (int) Number of columns.
1104 protected function getPlacementMap($nrow, $ncol) {
1106 $marr = array_fill(0, ($nrow * $ncol), 0);
1114 $marr = $this->placeCornerA($marr, $nrow, $ncol, $chr);
1117 if (($row == ($nrow - 2)) AND ($col == 0) AND ($ncol % 4)) {
1118 $marr = $this->placeCornerB($marr, $nrow, $ncol, $chr);
1121 if (($row == ($nrow - 2)) AND ($col == 0) AND (($ncol % 8) == 4)) {
1122 $marr = $this->placeCornerC($marr, $nrow, $ncol, $chr);
1125 if (($row == ($nrow + 4)) AND ($col == 2) AND (!($ncol % 8))) {
1126 $marr = $this->placeCornerD($marr, $nrow, $ncol, $chr);
1131 if (($row < $nrow) AND ($col >= 0) AND (!$marr[(($row * $ncol) + $col)])) {
1132 $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr);
1137 } while (($row >= 0) AND ($col < $ncol));
1142 if (($row >= 0) AND ($col < $ncol) AND (!$marr[(($row * $ncol) + $col)])) {
1143 $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr);
1152 } while (($row < $nrow) OR ($col < $ncol));
1154 if (!$marr[(($nrow * $ncol) - 1)]) {
1155 $marr[(($nrow * $ncol) - 1)] = 1;
1156 $marr[(($nrow * $ncol) - $ncol - 2)] = 1;