Lines Matching refs:this

38         $this->helper = $helper;
39 $this->text = "&$";
40 $this->nodes = $exp;
41 $this->nodes = $this->parse();
49 if (count($this->nodes) <= 3) {
50 return $this->nodes;
54 for ($i = 0; $i < count($this->nodes); $i++) {
55 if ($this->nodes[$i]->text == '(' || $this->nodes[$i]->text == '{') {
57 } elseif ($this->nodes[$i]->text == ')' || $this->nodes[$i]->text == '}') {
60 $sub = array_slice($this->nodes, $pos + 1, $i - $pos - 1);
61 if ($this->nodes[$i]->text == ')') {
63 new TextExpression("(", $this->helper),
64 new MathExpression($sub, $this->helper),
65 new TextExpression(")", $this->helper)
66 ), $this->helper);
68 $ret[] = new MathExpression($sub, $this->helper);
72 $ret[] = $this->nodes[$i];
75 $ret = $this->handleFunction($ret, 'sqrt', 1);
76 $ret = $this->handleFunction($ret, 'vec', 1);
77 $ret = $this->handleFunction($ret, 'overline', 1);
78 $ret = $this->handleFunction($ret, 'underline', 1);
79 $ret = $this->handleFunction($ret, 'hat', 1);
80 $ret = $this->handleFunction($ret, 'int', 3);
81 $ret = $this->handleFunction($ret, 'doubleint', 3);
82 $ret = $this->handleFunction($ret, 'tripleint', 3);
83 $ret = $this->handleFunction($ret, 'oint', 3);
84 $ret = $this->handleFunction($ret, 'prod', 3);
85 $ret = $this->handleFunction($ret, 'sum', 3);
86 $ret = $this->handleFunction($ret, 'bigcup', 3);
87 $ret = $this->handleFunction($ret, 'bigcap', 3);
88 $ret = $this->handleFunction($ret, 'delim', 3);
89 $ret = $this->handleFunction($ret, 'lim', 2);
90 $ret = $this->handleFunction($ret, 'root', 2);
91 $ret = $this->handleFunction($ret, 'matrix', 3);
92 $ret = $this->handleFunction($ret, 'tabular', 3);
94 $ret = $this->handleOperation($ret, '^');
95 $ret = $this->handleOperation($ret, 'over');
96 $ret = $this->handleOperation($ret, '_');
97 $ret = $this->handleOperation($ret, 'under');
98 $ret = $this->handleOperation($ret, '*');
99 $ret = $this->handleOperation($ret, '/');
100 $ret = $this->handleOperation($ret, '+');
101 $ret = $this->handleOperation($ret, '-');
121 $ret[] = new MathExpression(array($nodes[$i], $nodes[$i + 1], $nodes[$i + 2]), $this->helper);
152 $ret[] = new MathExpression($a, $this->helper);
168 switch (count($this->nodes)) {
170 $this->nodes[0]->draw($size);
171 $this->image = $this->nodes[0]->image;
172 $this->verticalBased = $this->nodes[0]->verticalBased;
175 switch ($this->nodes[0]->text) {
177 $this->drawSqrt($size);
180 $this->drawVector($size);
183 $this->drawOverLine($size);
186 $this->drawUnderline($size);
189 $this->drawHat($size);
192 $this->drawExpression($size);
197 if ($this->nodes[0]->text == "lim") {
198 $this->drawLimit($size);
199 } elseif ($this->nodes[0]->text == "root") {
200 $this->drawRoot($size);
202 switch ($this->nodes[1]->text) {
204 $this->drawFraction($size);
207 $this->drawExponent($size);
210 $this->drawTop($size);
213 $this->drawIndex($size);
216 $this->draw_bottom($size);
219 $this->drawExpression($size);
225 switch ($this->nodes[0]->text) {
227 $this->drawLargestOperator($size, '_integrale');
230 $this->drawLargestOperator($size, '_dintegrale');
233 $this->drawLargestOperator($size, '_tintegrale');
236 $this->drawLargestOperator($size, '_ointegrale');
239 $this->drawLargestOperator($size, '_somme');
242 $this->drawLargestOperator($size, '_produit');
245 $this->drawLargestOperator($size, '_intersection');
248 $this->drawLargestOperator($size, '_reunion');
251 $this->drawDelimiter($size);
254 $this->drawMatrix($size);
257 $this->drawTable($size);
260 $this->drawExpression($size);
265 $this->drawExpression($size);
281 for ($i = 0; $i < count($this->nodes); $i++) {
282 if ($this->nodes[$i]->text != '(' && $this->nodes[$i]->text != ')') {
283 $this->nodes[$i]->draw($size);
284 $img[$i] = $this->nodes[$i]->image;
285 $base[$i] = $this->nodes[$i]->verticalBased;
291 $paro = $this->helper->parenthesis(max($top, $bottom) * 2, "(");
292 $parf = $this->helper->parenthesis(max($top, $bottom) * 2, ")");
293 for ($i = 0; $i < count($this->nodes); $i++) {
295 if ($this->nodes[$i]->text == "(") {
307 $this->verticalBased = $top;
309 $white = $this->helper->getBackColor($result);
318 $this->image = $result;
326 $this->nodes[0]->draw($size * 0.9);
327 $img1 = $this->nodes[0]->image;
328 $this->nodes[2]->draw($size * 0.9);
329 $img2 = $this->nodes[2]->image;
337 $black = $this->helper->getFontColor($result);
338 $white = $this->helper->getBackColor($result);
339 $this->verticalBased = $height1 + 2;
342 imageline($result, 0, $this->verticalBased, $width, $this->verticalBased, $black);
344 $this->image = $result;
352 $this->nodes[0]->draw($size);
353 $img1 = $this->nodes[0]->image;
354 $base1 = $this->nodes[0]->verticalBased;
355 $this->nodes[2]->draw($size * 0.8);
356 $img2 = $this->nodes[2]->image;
364 $this->verticalBased = $height2 / 2 + $base1;
366 $white = $this->helper->getBackColor($result);
372 $this->verticalBased = $height2 - $base1 + $height1 / 2;
374 $white = $this->helper->getBackColor($result);
379 $this->image = $result;
387 $this->nodes[0]->draw($size);
388 $img1 = $this->nodes[0]->image;
389 $base1 = $this->nodes[0]->verticalBased;
390 $this->nodes[2]->draw($size * 0.8);
391 $img2 = $this->nodes[2]->image;
399 $this->verticalBased = $base1;
401 $white = $this->helper->getBackColor($result);
407 $this->verticalBased = $base1;
409 $white = $this->helper->getBackColor($result);
414 $this->image = $result;
422 $this->nodes[1]->draw($size);
423 $imgExp = $this->nodes[1]->image;
424 $baseExp = $this->nodes[1]->verticalBased;
428 $imgrac = $this->helper->displaySymbol("_racine", $heightExp + 2);
435 $black = $this->helper->getFontColor($result);
436 $white = $this->helper->getBackColor($result);
442 $this->verticalBased = $height - $heightExp + $baseExp;
443 $this->image = $result;
451 $this->nodes[1]->draw($size * 0.6);
452 $imgRoot = $this->nodes[1]->image;
456 $this->nodes[2]->draw($size);
457 $imgExp = $this->nodes[2]->image;
458 $baseExp = $this->nodes[2]->verticalBased;
462 $imgRac = $this->helper->displaySymbol("_racine", $heightExp + 2);
469 $black = $this->helper->getFontColor($result);
470 $white = $this->helper->getBackColor($result);
477 $this->verticalBased = $height - $heightExp + $baseExp;
478 $this->image = $result;
487 $this->nodes[1]->draw($size * 0.8);
488 $img1 = $this->nodes[1]->image;
489 $this->nodes[2]->draw($size * 0.8);
490 $img2 = $this->nodes[2]->image;
491 $this->nodes[3]->draw($size);
492 $imgExp = $this->nodes[3]->image;
493 $baseExp = $this->nodes[3]->verticalBased;
501 $imgSymbol = $this->helper->displaySymbol($character, $baseExp * 1.8); //max($baseExp,$heightExp-$baseExp)*2);
509 $white = $this->helper->getBackColor($imgLeft);
514 $imgFin = $this->helper->alignment2($imgLeft, $baseSymbol + $height2, $imgExp, $baseExp);
515 $this->image = $imgFin;
516 $this->verticalBased = max($baseSymbol + $height2, $baseExp + $height2);
524 $this->nodes[2]->draw($size * 0.8);
525 $imgSup = $this->nodes[2]->image;
526 $this->nodes[0]->draw($size);
527 $imgExp = $this->nodes[0]->image;
528 $baseExp = $this->nodes[0]->verticalBased;
539 $white = $this->helper->getBackColor($imgFin);
543 $this->image = $imgFin;
544 $this->verticalBased = $baseExp + $heightSup;
552 $this->nodes[2]->draw($size * 0.8);
553 $imgInf = $this->nodes[2]->image;
554 $this->nodes[0]->draw($size);
555 $imgExp = $this->nodes[0]->image;
556 $baseExp = $this->nodes[0]->verticalBased;
567 $white = $this->helper->getBackColor($imgFin);
571 $this->image = $imgFin;
572 $this->verticalBased = $baseExp;
581 $nbLine = $this->nodes[1]->nodes[0]->text;
582 $nbColumn = $this->nodes[2]->nodes[0]->text;
602 if ($i < count($this->nodes[3]->nodes)) {
603 $this->nodes[3]->nodes[$i]->draw($size * 0.9);
604 $img[$i] = $this->nodes[3]->nodes[$i]->image;
605 $base[$i] = $this->nodes[3]->nodes[$i]->verticalBased;
627 $white = $this->helper->getBackColor($imgFin);
634 if ($i < count($this->nodes[3]->nodes)) {
653 $this->image = $imgFin;
654 $this->verticalBased = imagesy($imgFin) / 2;
663 $typeLine = $this->nodes[1]->nodes[0]->text;
664 $typeColumn = $this->nodes[2]->nodes[0]->text;
686 if ($i < count($this->nodes[3]->nodes)) {
687 $this->nodes[3]->nodes[$i]->draw($size * 0.9);
688 $img[$i] = $this->nodes[3]->nodes[$i]->image;
689 $base[$i] = $this->nodes[3]->nodes[$i]->verticalBased;
709 $black = $this->helper->getFontColor($imgFin);
710 $white = $this->helper->getBackColor($imgFin);
723 if ($i < count($this->nodes[3]->nodes)) {
760 $this->image = $imgFin;
761 $this->verticalBased = imagesy($imgFin) / 2;
770 $this->nodes[1]->draw($size);
771 $imgExp = $this->nodes[1]->image;
772 $baseExp = $this->nodes[1]->verticalBased;
776 $imgSup = $this->helper->displaySymbol("right", 16);
783 $black = $this->helper->getFontColor($imgFin);
784 $white = $this->helper->getBackColor($imgFin);
790 $this->image = $imgFin;
791 $this->verticalBased = $baseExp + $heightSup;
800 $this->nodes[1]->draw($size);
801 $imgExp = $this->nodes[1]->image;
802 $baseExp = $this->nodes[1]->verticalBased;
809 $black = $this->helper->getFontColor($imgFin);
810 $white = $this->helper->getBackColor($imgFin);
815 $this->image = $imgFin;
816 $this->verticalBased = $baseExp + 2;
825 $this->nodes[1]->draw($size);
826 $imgExp = $this->nodes[1]->image;
827 $baseExp = $this->nodes[1]->verticalBased;
834 $black = $this->helper->getFontColor($imgFin);
835 $white = $this->helper->getBackColor($imgFin);
840 $this->image = $imgFin;
841 $this->verticalBased = $baseExp;
849 $imgSup = $this->helper->displaySymbol("_hat", $size);
851 $this->nodes[1]->draw($size);
852 $imgExp = $this->nodes[1]->image;
853 $baseExp = $this->nodes[1]->verticalBased;
864 $white = $this->helper->getBackColor($imgFin);
868 $this->image = $imgFin;
869 $this->verticalBased = $baseExp + $heightSup;
877 $imgLim = $this->helper->displayMath("_lim", $size);
882 $this->nodes[1]->draw($size * 0.8);
883 $imgInf = $this->nodes[1]->image;
887 $this->nodes[2]->draw($size);
888 $imgExp = $this->nodes[2]->image;
889 $baseExp = $this->nodes[2]->verticalBased;
894 $white = $this->helper->getBackColor($imgFin);
899 $this->image = $this->helper->alignment2($imgFin, $baseLim, $imgExp, $baseExp);
900 $this->verticalBased = max($baseLim, $baseExp);
908 $this->nodes[2]->draw($size);
909 $imgExp = $this->nodes[2]->image;
910 $baseExp = $this->nodes[2]->verticalBased;
912 if ($this->nodes[1]->text == "&$") {
913 $leftImg = $this->helper->parenthesis($heightExp, $this->nodes[1]->nodes[0]->text);
915 $leftImg = $this->helper->parenthesis($heightExp, $this->nodes[1]->text);
918 if ($this->nodes[3]->text == "&$") {
919 if(isset($this->nodes[3]->nodes[0])) {
920 $rightImg = $this->helper->parenthesis($heightExp, $this->nodes[3]->nodes[0]->text);
922 $rightImg = $this->helper->parenthesis($heightExp, '');
925 $rightImg = $this->helper->parenthesis($heightExp, $this->nodes[3]->text);
928 $this->image = $this->helper->alignment3($leftImg, $leftBase, $imgExp, $baseExp, $rightImg, $rightBase);
929 $this->verticalBased = max($leftBase, $baseExp, $rightBase);