X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fimages%2Fclass_BaseImage.php;h=cb08935a0192d39382e5d17e483f4621d80e16ad;hb=b470fb8107e5029819c345f23a961fbd8085af7e;hp=ae8fb1b2957456297f2d40070818897dbe7a3ee5;hpb=498d84788ad9a967218036ece9353959843b0966;p=core.git diff --git a/framework/main/classes/images/class_BaseImage.php b/framework/main/classes/images/class_BaseImage.php index ae8fb1b2..cb08935a 100644 --- a/framework/main/classes/images/class_BaseImage.php +++ b/framework/main/classes/images/class_BaseImage.php @@ -462,12 +462,9 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable { * @return void */ public function finishImage () { - // Get template instance - $templateInstance = $this->getTemplateInstance(); - // Compile width and height - $width = $templateInstance->compileRawCode($this->getWidth()); - $height = $templateInstance->compileRawCode($this->getHeight()); + $width = $this->getTemplateInstance()->compileRawCode($this->getWidth()); + $height = $this->getTemplateInstance()->compileRawCode($this->getHeight()); // Set both again $this->setWidth($width); @@ -477,9 +474,9 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable { $this->imageResource = imagecreatetruecolor($width, $height); // Compile background colors - $red = $templateInstance->compileRawCode($this->backgroundColor['red']); - $green = $templateInstance->compileRawCode($this->backgroundColor['green']); - $blue = $templateInstance->compileRawCode($this->backgroundColor['blue']); + $red = $this->getTemplateInstance()->compileRawCode($this->backgroundColor['red']); + $green = $this->getTemplateInstance()->compileRawCode($this->backgroundColor['green']); + $blue = $this->getTemplateInstance()->compileRawCode($this->backgroundColor['blue']); // Set all back $this->initBackgroundColor(); @@ -494,9 +491,9 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable { imagefill($this->getImageResource(), 0, 0, $backColor); // Compile foreground colors - $red = $templateInstance->compileRawCode($this->foregroundColor['red']); - $green = $templateInstance->compileRawCode($this->foregroundColor['green']); - $blue = $templateInstance->compileRawCode($this->foregroundColor['blue']); + $red = $this->getTemplateInstance()->compileRawCode($this->foregroundColor['red']); + $green = $this->getTemplateInstance()->compileRawCode($this->foregroundColor['green']); + $blue = $this->getTemplateInstance()->compileRawCode($this->foregroundColor['blue']); // Set all fore $this->initForegroundColor(); @@ -510,15 +507,15 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable { switch ($this->groupable) { case 'single': // Single image string // Compile image string - $imageString = $templateInstance->compileRawCode($this->getString()); + $imageString = $this->getTemplateInstance()->compileRawCode($this->getString()); // Set it back $this->setString($imageString); // Compile X/Y coordinates and font size - $x = $templateInstance->compileRawCode($this->getX()); - $y = $templateInstance->compileRawCode($this->getY()); - $size = $templateInstance->compileRawCode($this->getFontSize()); + $x = $this->getTemplateInstance()->compileRawCode($this->getX()); + $y = $this->getTemplateInstance()->compileRawCode($this->getY()); + $size = $this->getTemplateInstance()->compileRawCode($this->getFontSize()); // Set the image string imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor); @@ -526,17 +523,17 @@ abstract class BaseImage extends BaseFrameworkSystem implements Registerable { case 'groupable': // More than one string allowed // Walk through all groups - foreach ($templateInstance->getVariableGroups() as $group => $set) { + foreach ($this->getTemplateInstance()->getVariableGroups() as $group => $set) { // Set the group - $templateInstance->setVariableGroup($group, false); + $this->getTemplateInstance()->setVariableGroup($group, false); // Compile image string - $imageString = $templateInstance->compileRawCode($this->getString()); + $imageString = $this->getTemplateInstance()->compileRawCode($this->getString()); // Compile X/Y coordinates and font size - $x = $templateInstance->compileRawCode($this->getX()); - $y = $templateInstance->compileRawCode($this->getY()); - $size = $templateInstance->compileRawCode($this->getFontSize()); + $x = $this->getTemplateInstance()->compileRawCode($this->getX()); + $y = $this->getTemplateInstance()->compileRawCode($this->getY()); + $size = $this->getTemplateInstance()->compileRawCode($this->getFontSize()); // Set the image string //* DEBUG: */ print __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}
\n";