Lines Matching defs:chr
459 * @param $chr (int) Character (byte) to check.
464 protected function isCharMode($chr, $mode) {
468 $status = (($chr >= 0) AND ($chr <= 127));
472 $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 65) AND ($chr <= 90)));
476 $status = (($chr == 32) OR (($chr >= 48) AND ($chr <= 57)) OR (($chr >= 97) AND ($chr <= 122)));
480 $status = (($chr == 13) OR ($chr == 42) OR ($chr == 62));
484 $status = (($chr >= 32) AND ($chr <= 94));
488 $status = (($chr == 232) OR ($chr == 233) OR ($chr == 234) OR ($chr == 241));
492 $status = (($chr >= 128) AND ($chr <= 255));
496 $status = (($chr >= 48) AND ($chr <= 57));
545 $chr = ord($data[$pos + $charscount]);
548 if ($this->isCharMode($chr, self::ENC_ASCII_NUM)) {
550 } elseif ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
558 if ($this->isCharMode($chr, self::ENC_C40)) {
560 } elseif ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
566 if ($this->isCharMode($chr, self::ENC_TXT)) {
568 } elseif ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
574 if ($this->isCharMode($chr, self::ENC_X12) OR $this->isCharMode($chr, self::ENC_C40)) {
576 } elseif ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
582 if ($this->isCharMode($chr, self::ENC_EDF)) {
584 } elseif ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
590 if ($this->isCharMode($chr, self::ENC_BASE256)) {
722 $chr = ord($data[$pos]);
724 if ($this->isCharMode($chr, self::ENC_ASCII_EXT)) {
727 $cw[] = ($chr - 127);
731 $cw[] = ($chr + 1);
750 $chr = ord($data[$epos]);
753 if ($chr & 0x80) {
757 $chr = ($chr & 0x7f);
762 if (isset($charset[$chr])) {
763 $temp_cw[] = $charset[$chr];
766 if (isset($this->chset['SH1'][$chr])) {
769 } elseif (isset($chr, $this->chset['SH2'][$chr])) {
772 } elseif (($enc == self::ENC_C40) AND isset($this->chset['S3C'][$chr])) {
775 } elseif (($enc == self::ENC_TXT) AND isset($this->chset['S3T'][$chr])) {
781 $temp_cw[] = $shiftset[$chr];
820 $cw[] = ($chr + 1);
830 $cw[] = ($chr + 1);
868 $chr = ord($data[$epos]);
869 if ($this->isCharMode($chr, self::ENC_EDF)) {
871 $temp_cw[] = $chr;
874 if (($field_length == 4) OR ($epos == $data_length) OR !$this->isCharMode($chr, self::ENC_EDF)) {
930 $chr = ord($data[$pos]);
932 $temp_cw[] = $chr;
959 * Places "chr+bit" with appropriate wrapping within array[].
966 * @param $chr (int) Char byte.
971 protected function placeModule($marr, $nrow, $ncol, $row, $col, $chr, $bit) {
980 $marr[(($row * $ncol) + $col)] = ((10 * $chr) + $bit);
992 * @param $chr (int) Char byte.
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);
1014 * @param $chr (int) Char byte.
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);
1036 * @param $chr (int) Char byte.
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);
1058 * @param $chr (int) Char byte.
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);
1080 * @param $chr (int) Char byte.
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);
1108 $chr = 1;
1114 $marr = $this->placeCornerA($marr, $nrow, $ncol, $chr);
1115 ++$chr;
1118 $marr = $this->placeCornerB($marr, $nrow, $ncol, $chr);
1119 ++$chr;
1122 $marr = $this->placeCornerC($marr, $nrow, $ncol, $chr);
1123 ++$chr;
1126 $marr = $this->placeCornerD($marr, $nrow, $ncol, $chr);
1127 ++$chr;
1132 $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr);
1133 ++$chr;
1143 $marr = $this->placeUtah($marr, $nrow, $ncol, $row, $col, $chr);
1144 ++$chr;