* @author Peter Vasilevsky a.k.a. Tux-oid * @license GPLv2 */ class TextExpression extends Expression { /** * Constructor * * @param string $exp * @param Helper $helper */ public function __construct($exp, Helper $helper) { $this->helper = $helper; $this->text = $exp; } /** * @param $size */ public function draw($size) { $this->image = $this->helper->displayMath($this->text, $size); $this->verticalBased = imagesy($this->image) / 2; } }