Lines Matching +defs:text +defs:height
421 * @param $text
425 public function displaySymbol($text, $high)
430 $text = trim(stripslashes($text));
431 switch ($text) {
458 $font = $dirFonts . "/" . $fontsMath[$text] . ".ttf";
460 $text = $symbols[$text];
461 $tmpDim = imagettfbbox($t, 0, $font, $text);
468 imagettftext($tmpImg, $t, 0, 0, $tmpHeight, $tmpBlack, $font, $text);
504 $font = $dirFonts . "/" . $fontsMath[$text] . ".ttf";
506 $text = $symbols[$text];
507 $tmpDim = imagettfbbox($t, 0, $font, $text);
514 imagettftext($tmpImg, $t, 0, 0, $tmpHeight, $tmpBlack, $font, $text);
552 if (isset($fontsMath[$text])) {
553 $font = $dirFonts . "/" . $fontsMath[$text] . ".ttf";
554 } elseif ($this->isNumber($text)) {
560 if (isset($symbols[$text])) {
561 $text = $symbols[$text];
564 $tmpDim = imagettfbbox($t, 0, $font, $text);
573 imagettftext($tmpImg, $t, 0, 5, $tmpHeight / 2, $tmpBlack, $font, $text);
625 if (isset($fontsMath[$text])) {
626 $font = $dirFonts . "/" . $fontsMath[$text] . ".ttf";
627 } elseif ($this->isNumber($text)) {
633 if (isset($symbols[$text])) {
634 $text = $symbols[$text];
637 $tmpDim = imagettfbbox($t, 0, $font, $text);
646 imagettftext($tmpImg, $t, 0, 0, $tmpHeight / 4, $tmpBlack, $font, $text);
647 // imagettftext($tmpImg, $t, 0,5,5,$tmpBlack, $font,$text);
706 * @param $text
710 public function displayText($text, $size)
714 $text = stripslashes($text);
716 $textHeight = 'dg' . $text;
718 $widthDim = imagettfbbox($size, 0, $font, $text);
726 imagettftext($img, $size, $angle, 0, -min($heightDim[5], $heightDim[7]), $black, $font, $text);
732 * @param $text
736 public function displayMath($text, $size)
742 $text = stripslashes($text);
743 if (isset($fontsMath[$text])) {
744 $font = $dirFonts . "/" . $fontsMath[$text] . ".ttf";
745 } elseif (preg_match("#[a-zA-Z]#", $text)) {
750 if (isset($symbols[$text])) {
751 $text = $symbols[$text];
753 $textHeight = 'dg' . $text;
755 $widthDim = imagettfbbox($size, 0, $font, $text);
763 imagettftext($img, $size, 0, 0, -min($heightDim[5], $heightDim[7]), $black, $font, $text);
769 * @param $height
773 public function parenthesis($height, $style)
775 $image = $this->displaySymbol($style, $height);
796 $height = $top + $bottom;
797 $result = imagecreate(max($width, 1), max($height, 1));
799 imagefilledrectangle($result, 0, 0, $width - 1, $height - 1, $white);
803 //ImageRectangle($result,0,0,$width-1,$height-1,$black);
827 $height = $top + $bottom;
828 $result = imagecreate(max($width, 1), max($height, 1));
831 imagefilledrectangle($result, 0, 0, $width - 1, $height - 1, $white);
836 //ImageRectangle($result,0,0,$width-1,$height-1,$black);