Lines Matching refs:this

78     $this->line = $line;
79 $this->col = $col;
80 $this->value = $value;
81 $this->type = $type;
114 $this->yy_reader = $stream;
117 $this->yyfilename = '<<input>>';
119 $this->yyfilename = $meta['uri'];
122 $this->yy_buffer = "";
123 $this->yy_buffer_read = 0;
124 $this->yy_buffer_index = 0;
125 $this->yy_buffer_start = 0;
126 $this->yy_buffer_end = 0;
127 $this->yychar = 0;
128 $this->yyline = 1;
129 $this->yy_at_bol = true;
133 $this->yy_lexical_state = $state;
137 if ($this->yy_buffer_index < $this->yy_buffer_read) {
138 if (!isset($this->yy_buffer[$this->yy_buffer_index])) {
139 return $this->YY_EOF;
141 return ord($this->yy_buffer[$this->yy_buffer_index++]);
143 if ($this->yy_buffer_start != 0) {
145 $j = $this->yy_buffer_read - $this->yy_buffer_start;
146 $this->yy_buffer = substr($this->yy_buffer, $this->yy_buffer_start, $j);
147 $this->yy_buffer_end -= $this->yy_buffer_start;
148 $this->yy_buffer_start = 0;
149 $this->yy_buffer_read = $j;
150 $this->yy_buffer_index = $j;
152 $data = fread($this->yy_reader, 8192);
153 if ($data === false || !strlen($data)) return $this->YY_EOF;
154 $this->yy_buffer .= $data;
155 $this->yy_buffer_read .= strlen($data);
158 while ($this->yy_buffer_index >= $this->yy_buffer_read) {
159 $data = fread($this->yy_reader, 8192);
160 if ($data === false || !strlen($data)) return $this->YY_EOF;
161 $this->yy_buffer .= $data;
162 $this->yy_buffer_read .= strlen($data);
164 return ord($this->yy_buffer[$this->yy_buffer_index++]);
168 if ($this->yy_buffer_end > $this->yy_buffer_start &&
169 $this->yy_buffer[$this->yy_buffer_end-1] == "\n")
170 $this->yy_buffer_end--;
171 if ($this->yy_buffer_end > $this->yy_buffer_start &&
172 $this->yy_buffer[$this->yy_buffer_end-1] == "\r")
173 $this->yy_buffer_end--;
177 if ($this->yy_count_lines || $this->yy_count_chars) {
178 if ($this->yy_count_lines) {
179 for ($i = $this->yy_buffer_start; $i < $this->yy_buffer_index; ++$i) {
180 if ("\n" == $this->yy_buffer[$i] && !$this->yy_last_was_cr) {
181 ++$this->yyline;
182 $this->yycol = 0;
184 if ("\r" == $this->yy_buffer[$i]) {
186 $this->yycol = 0;
187 $this->yy_last_was_cr = true;
189 $this->yy_last_was_cr = false;
193 if ($this->yy_count_chars) {
194 $this->yychar += $this->yy_buffer_index - $this->yy_buffer_start;
195 $this->yycol += $this->yy_buffer_index - $this->yy_buffer_start;
198 $this->yy_buffer_start = $this->yy_buffer_index;
202 $this->yy_buffer_end = $this->yy_buffer_index;
207 $this->yy_buffer_index = $this->yy_buffer_end;
208 $this->yy_at_bol = ($this->yy_buffer_end > $this->yy_buffer_start) &&
209 ("\r" == $this->yy_buffer[$this->yy_buffer_end-1] ||
210 "\n" == $this->yy_buffer[$this->yy_buffer_end-1] ||
211 2028 /* unicode LS */ == $this->yy_buffer[$this->yy_buffer_end-1] ||
212 2029 /* unicode PS */ == $this->yy_buffer[$this->yy_buffer_end-1]);
216 return substr($this->yy_buffer, $this->yy_buffer_start,
217 $this->yy_buffer_end - $this->yy_buffer_start);
221 return $this->yy_buffer_end - $this->yy_buffer_start;
237 if ($type === null) $type = $this->yytext();
239 $this->annotateToken($tok);
245 $tok->value = $this->yytext();
246 $tok->col = $this->yycol;
247 $tok->line = $this->yyline;
248 $tok->filename = $this->yyfilename;
502 $this->yyTraceFILE = $TraceFILE;
503 $this->yyTracePrompt = $zTracePrompt;
504 if( $this->yyTraceFILE===null ) $this->yyTracePrompt = null;
505 else if( $this->yyTracePrompt===null ) $this->yyTraceFILE = null;
622 if ($this->yyidx < 0) return 0;
623 $yytos = $this->yystack[$this->yyidx];
624 if( $this->yyTraceFILE ) {
625 fprintf($this->yyTraceFILE,"%sPopping %s\n",
626 $this->yyTracePrompt,
629 $this->yy_destructor( $yytos->major, $yytos->minor);
630 unset($this->yystack[$this->yyidx]);
631 $this->yyidx--;
649 while($this->yyidx >= 0)
650 $this->yy_pop_parser_stack();
665 $stateno = $this->yystack[$this->yyidx]->stateno;
672 return $this->YY_NO_ACTION;
679 if( $this->yyTraceFILE ){
680 fprintf($this->yyTraceFILE, "%sFALLBACK %s => %s\n",
681 $this->yyTracePrompt, self::$yyTokenName[$iLookAhead],
684 return $this->yy_find_shift_action($iFallback);
689 if( $this->yyTraceFILE ){
690 fprintf($this->yyTraceFILE, "%sWILDCARD %s => %s\n",
691 $this->yyTracePrompt, self::$yyTokenName[$iLookAhead],
723 return $this->YY_NO_ACTION;
741 $this->yyidx++;
742 if (isset($this->yystack[$this->yyidx])) {
743 $yytos = $this->yystack[$this->yyidx];
746 $this->yystack[$this->yyidx] = $yytos;
751 if( $this->yyTraceFILE) {
752 fprintf($this->yyTraceFILE,"%sShift %d\n",$this->yyTracePrompt,$yyNewState);
753 fprintf($this->yyTraceFILE,"%sStack:",$this->yyTracePrompt);
754 for ($i = 1; $i <= $this->yyidx; $i++) {
755 $ent = $this->yystack[$i];
756 fprintf($this->yyTraceFILE," %s",self::$yyTokenName[$ent->major]);
758 fprintf($this->yyTraceFILE,"\n");
845 $yymsp = $this->yystack[$this->yyidx];
846 if( $this->yyTraceFILE && isset(self::$yyRuleName[$yyruleno])) {
847 fprintf($this->yyTraceFILE, "%sReduce [%s].\n", $this->yyTracePrompt,
863 if (count($this->yystack[$this->yyidx + 0]->minor) == 2) {
864 …$this->commands[] = array_merge(array($this->yystack[$this->yyidx + -1]->minor), $this->yystack[$t…
866 if ($this->yystack[$this->yyidx + -1]->minor->value == 'm') {
871 $c = array_splice($this->yystack[$this->yyidx + 0]->minor, 2);
872 …$this->commands[] = array_merge(array($this->yystack[$this->yyidx + -1]->minor), $this->yystack[$t…
873 $this->commands[] = array_merge(array($arr), $c);
888 { $yygotominor = array_merge($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx …
903 { $yygotominor = $this->yystack[$this->yyidx + 0]->minor; }
908 { $this->commands[] = array($this->yystack[$this->yyidx + 0]->minor); }
920 { $this->commands[] = array_merge(array($this->yystack[$this->yyidx + -1]->minor), $this->yystack[$
926 { $yygotominor = array_merge($this->yystack[$this->yyidx + -1]->minor, array($this->yystack[$this->…
932 { $yygotominor = array($this->yystack[$this->yyidx + 0]->minor); }
937 …gotominor = array_merge($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + -1…
942this->yystack[$this->yyidx + -5]->minor, $this->yystack[$this->yyidx + -4]->minor, $this->yystack[…
947 { $yygotominor = array($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->…
954 $state_for_reduce = $this->yystack[$this->yyidx - $yysize]->stateno;
956 $this->yyidx -= $yysize;
957 $yyact = $this->yy_find_reduce_action($state_for_reduce,$yygoto);
959 $this->yy_shift($yyact, $yygoto, $yygotominor);
961 $this->yy_accept();
970 if( $this->yyTraceFILE ){
971 fprintf($this->yyTraceFILE,"%sFail!\n",$this->yyTracePrompt);
973 while( $this->yyidx>=0 ) $this->yy_pop_parser_stack();
992 if( $this->yyTraceFILE ){
993 fprintf($this->yyTraceFILE,"%sAccept!\n",$this->yyTracePrompt);
995 while( $this->yyidx>=0 ) $this->yy_pop_parser_stack();
1028 if( $this->yyidx<0 ){
1029 $this->yyidx = 0;
1030 $this->yyerrcnt = -1;
1034 $this->yystack = array( 0 => $ent );
1036 $this->YY_NO_ACTION = self::YYNSTATE + self::YYNRULE + 2;
1037 $this->YY_ACCEPT_ACTION = self::YYNSTATE + self::YYNRULE + 1;
1038 $this->YY_ERROR_ACTION = self::YYNSTATE + self::YYNRULE;
1042 if( $this->yyTraceFILE ){
1043 fprintf($this->yyTraceFILE,"%sInput %s\n",$this->yyTracePrompt,
1048 $yyact = $this->yy_find_shift_action($yymajor);
1050 $this->yy_shift($yyact,$yymajor,$yyminor);
1051 $this->yyerrcnt--;
1052 if( $yyendofinput && $this->yyidx>=0 ){
1058 $this->yy_reduce($yyact-self::YYNSTATE);
1059 }else if( $yyact == $this->YY_ERROR_ACTION ){
1060 if( $this->yyTraceFILE ){
1061 fprintf($this->yyTraceFILE,"%sSyntax Error!\n",$this->yyTracePrompt);
1083 if( $this->yyerrcnt<0 ){
1084 $this->yy_syntax_error($yymajor, $yyminor);
1086 $yymx = $this->yystack[$this->yyidx]->major;
1088 if( $this->yyTraceFILE ){
1089 fprintf($this->yyTraceFILE,"%sDiscard input token %s\n",
1090 $this->yyTracePrompt,self::$yyTokenName[$yymajor]);
1092 $this->yy_destructor($yymajor,$yyminor);
1096 $this->yyidx >= 0 &&
1098 ($yyact = $this->yy_find_reduce_action(
1099 $this->yystack[$this->yyidx]->stateno,
1102 $this->yy_pop_parser_stack();
1104 if( $this->yyidx < 0 || $yymajor==0 ){
1105 $this->yy_destructor($yymajor,$yyminor);
1106 $this->yy_parse_failed();
1109 $this->yy_shift($yyact,self::YYERRORSYMBOL,0);
1112 $this->yyerrcnt = 3;
1124 if( $this->yyerrcnt<=0 ){
1125 $this->yy_syntax_error($yymajor, $yyminor);
1127 $this->yyerrcnt = 3;
1128 $this->yy_destructor($yymajor,$yyminor);
1130 $this->yy_parse_failed();
1135 $this->yy_accept();
1138 }while( $yymajor!=self::YYNOCODE && $this->yyidx>=0 );
1159 $this->yy_lexical_state = self::YYINITIAL;
1306 $yy_state = self::$yy_state_dtrans[$this->yy_lexical_state];
1311 $this->yy_mark_start();
1315 $this->yy_mark_end();
1318 if ($yy_initial && $this->yy_at_bol) $yy_lookahead = self::YY_BOL;
1319 else $yy_lookahead = $this->yy_advance();
1321 if ($this->YY_EOF == $yy_lookahead && true == $yy_initial) {
1330 $this->yy_mark_end();
1340 $this->yy_move_end();
1342 $this->yy_to_mark();
1349 { return $this->createToken(A2S_SVGPathParser::TK_FLAG); }
1357 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1361 { return $this->createToken(A2S_SVGPathParser::TK_MCMD); }
1365 { return $this->createToken(A2S_SVGPathParser::TK_ZCMD); }
1369 { return $this->createToken(A2S_SVGPathParser::TK_LCMD); }
1373 { return $this->createToken(A2S_SVGPathParser::TK_HCMD); }
1377 { return $this->createToken(A2S_SVGPathParser::TK_VCMD); }
1381 { return $this->createToken(A2S_SVGPathParser::TK_QCMD); }
1385 { return $this->createToken(A2S_SVGPathParser::TK_CCMD); }
1389 { return $this->createToken(A2S_SVGPathParser::TK_SCMD); }
1393 { return $this->createToken(A2S_SVGPathParser::TK_TCMD); }
1397 { return $this->createToken(A2S_SVGPathParser::TK_ACMD); }
1405 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1409 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1413 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1417 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1421 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1425 { return $this->createToken(A2S_SVGPathParser::TK_FLAG); }
1433 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1437 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1441 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1445 { return $this->createToken(A2S_SVGPathParser::TK_POSNUM); }
1457 $this->yy_error('INTERNAL',false);
1461 $yy_state = self::$yy_state_dtrans[$this->yy_lexical_state];
1464 $this->yy_mark_start();
1468 $this->yy_mark_end();
1853 $this->flags = 0;
1856 $this->x = ($x * $s->xScale) + ($s->xScale / 2);
1857 $this->y = ($y * $s->yScale) + ($s->yScale / 2);
1859 $this->gridX = $x;
1860 $this->gridY = $y;
1875 $this->groups = array();
1876 $this->groupStack = array();
1877 $this->options = array();
1881 return $this->groups[$groupName];
1885 if (!isset($this->groups[$groupName])) {
1886 $this->groups[$groupName] = array();
1887 $this->options[$groupName] = array();
1890 $this->groupStack[] = $groupName;
1891 $this->curGroup = $groupName;
1900 array_pop($this->groupStack);
1901 $this->curGroup = array_pop($this->groupStack);
1905 $this->groups[$this->curGroup][] = $o;
1909 $this->options[$this->curGroup][$opt] = $val;
1915 foreach($this->groups as $groupName => $objects) {
1917 foreach ($this->options[$groupName] as $opt => $val) {
1952 $this->options = array();
1953 $this->points = array();
1954 $this->text = array();
1955 $this->ticks = array();
1956 $this->flags = 0;
1957 $this->name = self::$id++;
1975 $pPoints = count($this->points);
1977 $minY = $this->points[0]->y;
1978 $minX = $this->points[0]->x;
1981 if ($this->points[$i]->y <= $minY) {
1982 $minY = $this->points[$i]->y;
1984 if ($this->points[$i]->x < $minX) {
1985 $minX = $this->points[$i]->x;
1997 $startPoints = array_splice($this->points, $minIdx);
1998 $this->points = array_merge($startPoints, $this->points);
2006 array_pop($this->points);
2016 if (count($this->points) > 0) {
2017 if ($this->points[0]->x == $p->x && $this->points[0]->y == $p->y) {
2018 $this->flags |= self::CLOSED;
2027 foreach ($this->points as $point) {
2035 $this->points[] = $p;
2044 return $this->points;
2055 $this->points[] = $p;
2061 $this->ticks[] = $p;
2068 return ($this->flags & self::CLOSED);
2072 $this->text[] = $t;
2076 return $this->text;
2080 return $this->name;
2088 $this->options = array_merge($this->options, $opt);
2092 $this->options[$opt] = $val;
2096 if (isset($this->options[$opt])) {
2097 return $this->options[$opt];
2110 if ($this->isClosed() == false) {
2116 $bound = count($this->points);
2117 for ($i = 0, $j = count($this->points) - 1; $i < $bound; $i++) {
2118 if (($this->points[$i]->gridY < $y && $this->points[$j]->gridY >= $y ||
2119 $this->points[$j]->gridY < $y && $this->points[$i]->gridY >= $y) &&
2120 ($this->points[$i]->gridX <= $x || $this->points[$j]->gridX <= $x)) {
2121 if ($this->points[$i]->gridX + ($y - $this->points[$i]->gridY) /
2122 ($this->points[$j]->gridY - $this->points[$i]->gridY) *
2123 ($this->points[$j]->gridX - $this->points[$i]->gridX) < $x) {
2173 return $this->matrixTransform($matrix, $x, $y);
2184 return $this->matrixTransform($matrix, $x, $y);
2195 list ($x, $y) = $this->translateTransform($cX, $cY, $x, $y);
2201 $ret = $this->matrixTransform($matrix, $x, $y);
2204 list ($x, $y) = $this->translateTransform(-$cX, -$cY, $ret[0], $ret[1]);
2219 return $this->matrixTransform($matrix, $x, $y);
2229 return $this->matrixTransform($matrix, $x, $y);
2238 return $this->translateTransform($args[0], $args[1], $p->x, $p->y);
2241 return $this->scaleTransform($args[0], $args[1], $p->x, $p->y);
2245 return $this->rotateTransform($args[0], $p->x, $p->y, $args[1], $args[2]);
2247 return $this->rotateTransform($args[0], $p->x, $p->y);
2251 return $this->skewXTransform($args[0], $p->x, $p->y);
2254 return $this->skewYTransform($args[0], $p->x, $p->y);
2285 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2295 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2310 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2326 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2339 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2352 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2363 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2374 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2385 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2396 list ($x, $y) = $this->applyTransformToPoint($txf, $tP, $args);
2401 list ($x, $y) = $this->applyTransformToPoint($txf, $tP, $args);
2407 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2418 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2424 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2430 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2459 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2466 list ($x, $y) = $this->applyTransformToPoint($txf, $curPoint, $args);
2478 $startPoint = array_shift($this->points);
2479 $endPoint = $this->points[count($this->points) - 1];
2481 $out = "<g id=\"group{$this->name}\">\n";
2489 if (isset($this->options['a2s:type']) &&
2490 isset(CustomObjects::$objects[$this->options['a2s:type']])) {
2491 $object = CustomObjects::$objects[$this->options['a2s:type']];
2494 if (!isset($this->options['fill'])) {
2495 $this->options['fill'] = '#fff';
2505 foreach ($this->points as $p) {
2521 if (isset($this->options['a2s:link'])) {
2522 $out .="<a xlink:href=\"".$this->options['a2s:link']."\">";
2528 $out .= "\t<path id=\"path{$this->name}\" d=\"";
2533 $this->applyTransformToPath('scale', $o, array($objW/$oW, $objH/$oH));
2534 $this->applyTransformToPath('translate', $o, array($minX, $minY));
2543 foreach ($this->options as $opt => $val) {
2554 if (count($this->text) > 0) {
2555 foreach ($this->text as $text) {
2560 if (isset($this->options['a2s:link'])) {
2593 $bound = count($this->points);
2595 $p = $this->points[$i];
2608 if ($i == count($this->points) - 1) {
2611 $nP = $this->points[$i + 1];
2661 if ($this->isClosed()) {
2669 $this->options["marker-start"] = "url(#Pointer)";
2671 $this->options["marker-start"] = "url(#iPointer)";
2675 $this->options["marker-end"] = "url(#Pointer)";
2677 $this->options["marker-end"] = "url(#iPointer)";
2685 if ($this->isClosed() && !isset($this->options['fill'])) {
2686 $this->options['fill'] = '#fff';
2689 $out_p = "\t<path id=\"path{$this->name}\" ";
2690 foreach ($this->options as $opt => $val) {
2704 if (count($this->text) > 0) {
2705 foreach ($this->text as $text) {
2715 $bound = count($this->ticks);
2717 $t = $this->ticks[$i];
2763 $this->point = new Point($x, $y);
2764 $this->name = self::$id++;
2765 $this->options = array();
2769 $this->options[$opt] = $val;
2773 return $this->name;
2777 return $this->point;
2781 $this->string = $string;
2785 $out = "<text x=\"{$this->point->x}\" y=\"{$this->point->y}\" id=\"text{$this->name}\" ";
2786 foreach ($this->options as $opt => $val) {
2793 $out .= SVGText::svgEntities($this->string);
2823 $this->rawData = $data;
2827 $this->clearCorners = array();
2836 $this->commands = array();
2840 $this->commands[$matches[1][$i]] = json_decode($matches[2][$i], true);
2850 $this->grid = explode("\n", $data);
2852 foreach ($this->grid as $k => $line) {
2853 $this->grid[$k] = preg_split('//u', $line, null, PREG_SPLIT_NO_EMPTY);
2856 $this->svgObjects = new SVGGroup();
2869 var_export($this);
2878 foreach($this->grid as $line) {
2885 $canvasHeight = count($this->grid) * $o->yScale;
2934 $out .= $this->svgObjects->render();
2955 $this->parseBoxes();
2956 $this->parseLines();
2958 foreach ($this->clearCorners as $corner) {
2959 $this->grid[$corner[0]][$corner[1]] = ' ';
2962 $this->parseText();
2964 $this->injectCommands();
2975 $this->svgObjects->pushGroup('boxes');
2976 $this->svgObjects->setOption('stroke', 'black');
2977 $this->svgObjects->setOption('stroke-width', '2');
2978 $this->svgObjects->setOption('fill', 'none');
2981 foreach ($this->grid as $row => $line) {
2983 if ($this->isCorner($char)) {
2996 $this->wallFollow($path, $row, $col+1, self::DIR_RIGHT);
3013 foreach($this->svgObjects->getGroup('boxes') as $box) {
3046 if ($this->blurDropShadow) {
3052 $name = $this->findCommands($path);
3054 $this->svgObjects->addObject($path);
3066 foreach ($this->svgObjects->getGroup('boxes') as $box) {
3067 $this->clearObject($box);
3071 $this->svgObjects->popGroup();
3087 $this->svgObjects->pushGroup('lines');
3088 $this->svgObjects->setOption('stroke', 'black');
3089 $this->svgObjects->setOption('stroke-width', '2');
3090 $this->svgObjects->setOption('fill', 'none');
3094 $bound = count($this->grid);
3096 $maxCols = max($maxCols, count($this->grid[$r]));
3110 if (!isset($this->grid[$r][$c])) {
3114 $char = $this->getChar($r, $c);
3121 $e = $this->getChar($r, $c + 1);
3122 if ($this->isEdge($e, self::DIR_RIGHT) || $this->isCorner($e)) {
3126 $se = $this->getChar($r + 1, $c + 1);
3127 $ne = $this->getChar($r - 1, $c + 1);
3138 $s = $this->getChar($r + 1, $c);
3139 if ($this->isEdge($s, self::DIR_DOWN) || $this->isCorner($s)) {
3142 } elseif ($this->getChar($r + 1, $c + 1) == "\\") {
3149 $w = $this->getChar($r, $c - 1);
3150 if ($this->isEdge($w, self::DIR_LEFT) || $this->isCorner($w)) {
3157 $n = $this->getChar($r - 1, $c);
3158 if ($this->isEdge($n, self::DIR_UP) || $this->isCorner($n)) {
3161 } elseif ($this->getChar($r - 1, $c + 1) == '/') {
3187 $n = $this->getChar($r-1, $c);
3188 $s = $this->getChar($r+1, $c);
3189 if (($s == '|' || $s == ':' || $this->isCorner($s)) &&
3190 $n != '|' && $n != ':' && !$this->isCorner($n) &&
3193 } elseif (($n == '|' || $n == ':' || $this->isCorner($n)) &&
3194 $s != '|' && $s != ':' && !$this->isCorner($s) &&
3210 $w = $this->getChar($r, $c-1);
3211 $e = $this->getChar($r, $c+1);
3212 if (($w == '-' || $w == '=' || $this->isCorner($w)) &&
3213 $e != '=' && $e != '-' && !$this->isCorner($e) &&
3216 } elseif (($e == '-' || $e == '=' || $this->isCorner($e)) &&
3217 $w != '=' && $w != '-' && !$this->isCorner($w) &&
3230 $ne = $this->getChar($r-1, $c+1);
3237 $se = $this->getChar($r+1, $c+1);
3253 $ne = $this->getChar($r-1, $c+1);
3254 $se = $this->getChar($r+1, $c+1);
3264 $n = $this->getChar($r-1, $c);
3265 $w = $this->getChar($r, $c-1);
3266 $s = $this->getChar($r+1, $c);
3267 $e = $this->getChar($r, $c+1);
3293 if (!$this->isMarker($char)) {
3320 $this->walk($line, $r+$rInc, $c+$cInc, $dir);
3326 $this->clearObject($line);
3327 $this->svgObjects->addObject($line);
3330 if ($this->isCorner($char)) {
3337 $this->svgObjects->popGroup();
3358 $this->svgObjects->pushGroup('text');
3359 $this->svgObjects->setOption('fill', 'black');
3360 $this->svgObjects->setOption('style',
3361 "font-family:{$this->fontFamily};font-size:{$fSize}px");
3370 $boxes = $this->svgObjects->getGroup('boxes');
3373 foreach ($this->grid as $row => $line) {
3376 if ($this->getChar($row, $i) != ' ') {
3473 $str = $this->getChar($row, $i++);
3474 while ($i < count($line) && $this->getChar($row, $i) != ' ') {
3475 $str .= $this->getChar($row, $i++);
3477 if ($this->getChar($row, $i) == ' ') {
3496 "font-family:{$this->fontFamily};font-size:{$fSize}px");
3499 $this->svgObjects->addObject($t);
3511 $boxes = $this->svgObjects->getGroup('boxes');
3512 $lines = $this->svgObjects->getGroup('lines');
3513 $text = $this->svgObjects->getGroup('text');
3519 if (isset($this->commands[$pointCmd])) {
3520 $obj->setOptions($this->commands[$pointCmd]);
3527 if (isset($this->commands[$pointCmd])) {
3528 $text->setOptions($this->commands[$pointCmd]);
3537 if (isset($this->commands[$pointCmd])) {
3538 $obj->setOptions($this->commands[$pointCmd]);
3546 if (isset($this->commands[$pointCmd])) {
3547 $obj->setOptions($this->commands[$pointCmd]);
3575 $cur = $this->getChar($r, $c);
3576 while ($this->isEdge($cur, $dir)) {
3581 if ($this->isTick($cur)) {
3588 $cur = $this->getChar($r, $c);
3591 if ($this->isCorner($cur)) {
3608 $n = $this->getChar($r - 1, $c);
3609 $s = $this->getChar($r + 1, $c);
3610 $e = $this->getChar($r, $c + 1);
3611 $w = $this->getChar($r, $c - 1);
3612 $next = $this->getChar($r + $rInc, $c + $cInc);
3614 $se = $this->getChar($r + 1, $c + 1);
3615 $ne = $this->getChar($r - 1, $c + 1);
3617 if ($this->isCorner($next) || $this->isEdge($next, $dir)) {
3618 return $this->walk($path, $r + $rInc, $c + $cInc, $dir, $d);
3620 ($this->isCorner($n) || $this->isEdge($n, self::DIR_UP))) {
3624 return $this->walk($path, $r - 1, $c, self::DIR_UP, $d);
3627 ($this->isCorner($s) || $this->isEdge($s, self::DIR_DOWN))) {
3631 return $this->walk($path, $r + 1, $c, self::DIR_DOWN, $d);
3634 ($this->isCorner($e) || $this->isEdge($e, self::DIR_RIGHT))) {
3635 return $this->walk($path, $r, $c + 1, self::DIR_RIGHT, $d);
3637 ($this->isCorner($w) || $this->isEdge($w, self::DIR_LEFT))) {
3638 return $this->walk($path, $r, $c - 1, self::DIR_LEFT, $d);
3640 ($this->isCorner($ne) || $this->isEdge($ne, self::DIR_NE))) {
3641 return $this->walk($path, $r - 1, $c + 1, self::DIR_NE, $d);
3643 ($this->isCorner($se) || $this->isEdge($se, self::DIR_SE))) {
3644 return $this->walk($path, $r + 1, $c + 1, self::DIR_SE, $d);
3646 } elseif ($this->isMarker($cur)) {
3687 $cur = $this->getChar($r, $c);
3688 while ($this->isBoxEdge($cur, $dir)) {
3691 $cur = $this->getChar($r, $c);
3704 if ($this->isBoxCorner($cur)) {
3729 if ($d == 1 && $cur == '.' && $this->getChar($r + 1, $c) == '.') {
3730 return $this->wallFollow($path, $r, $c + 1, $dir, $bucket, 0);
3739 $n = $this->getChar($r - 1, $c);
3740 $s = $this->getChar($r + 1, $c);
3741 $e = $this->getChar($r, $c + 1);
3742 $w = $this->getChar($r, $c - 1);
3746 ($this->isBoxEdge($s, self::DIR_DOWN) || $this->isBoxCorner($s))) {
3760 ($this->isBoxEdge($w, self::DIR_LEFT) || $this->isBoxCorner($w))) {
3765 ($this->isBoxEdge($n, self::DIR_UP) || $this->isBoxCorner($n))) {
3774 ($this->isBoxEdge($e, self::DIR_RIGHT) || $this->isBoxCorner($e))) {
3789 $this->wallFollow($path, $r+$rMod, $c+$cMod, $newDir, $bucket, $d);
3806 ($this->isBoxEdge($w, self::DIR_LEFT) || $this->isBoxCorner($w))) {
3808 $this->wallFollow($path, $r, $c - 1, self::DIR_LEFT, $bucket, $d);
3814 ($this->isBoxEdge($e, self::DIR_RIGHT) || $this->isBoxCorner($e))) {
3816 $this->wallFollow($path, $r, $c + 1, self::DIR_RIGHT, $bucket, $d);
3822 ($this->isBoxEdge($n, self::DIR_UP) || $this->isBoxCorner($n))) {
3827 $this->wallFollow($path, $r - 1, $c, self::DIR_UP, $bucket, $d);
3834 ($this->isBoxEdge($s, self::DIR_DOWN) || $this->isBoxCorner($s))) {
3839 $this->wallFollow($path, $r + 1, $c, self::DIR_DOWN, $bucket, $d);
3853 } elseif ($this->isMarker($this->getChar($r, $c))) {
3891 $char = $this->getChar($j, $p->gridX);
3893 if (!$this->isTick($char) && $this->isEdge($char) || $this->isMarker($char)) {
3894 $this->grid[$j][$p->gridX] = ' ';
3895 } elseif ($this->isCorner($char)) {
3896 $this->clearCorners[] = array($j, $p->gridX);
3897 } elseif ($this->isTick($char)) {
3898 $this->grid[$j][$p->gridX] = '+';
3905 $char = $this->getChar($p->gridY, $j);
3907 if (!$this->isTick($char) && $this->isEdge($char) || $this->isMarker($char)) {
3908 $this->grid[$p->gridY][$j] = ' ';
3909 } elseif ($this->isCorner($char)) {
3910 $this->clearCorners[] = array($p->gridY, $j);
3911 } elseif ($this->isTick($char)) {
3912 $this->grid[$p->gridY][$j] = '+';
3934 $char = $this->getChar($r, $c);
3935 if ($char == '/' || $char == "\\" || $this->isMarker($char)) {
3936 $this->grid[$r][$c++] = ' ';
3937 } elseif ($this->isCorner($char)) {
3938 $this->clearCorners[] = array($r, $c++);
3939 } elseif ($this->isTick($char)) {
3940 $this->grid[$r][$c] = '+';
3945 $this->grid[$p->gridY][$p->gridX] = ' ';
3964 if ($this->getChar($sY, $sX++) == '[') {
3965 $char = $this->getChar($sY, $sX++);
3968 $char = $this->getChar($sY, $sX++);
3975 if (!isset($this->commands[$ref]['a2s:delref']) &&
3976 !isset($this->commands[$ref]['a2s:label'])) {
3977 $this->grid[$sY][$sX] = ' ';
3978 $this->grid[$sY][$sX + strlen($ref) + 1] = ' ';
3980 if (isset($this->commands[$ref]['a2s:label'])) {
3981 $label = $this->commands[$ref]['a2s:label'];
3989 $this->grid[$sY][$sX + $i] = substr($label, $i, 1);
3991 $this->grid[$sY][$sX + $i] = ' ';
3996 if (isset($this->commands[$ref])) {
3997 $box->setOptions($this->commands[$ref]);
4010 foreach($this->grid as $lines) {
4016 if (isset($this->grid[$row][$col])) {
4017 return $this->grid[$row][$col];