X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fimages%2Fclass_BaseImage.php;h=3c44ef604dc369122a8c94c2e0d179b230ca3835;hb=7980aa7bf59674ca147546749d9aa3c7ee5ebff0;hp=27d768cc5ac5b5cf86c8aa3f440d330102895194;hpb=0d566e56ff27dcbf25a90d513950bbf26fe71422;p=core.git diff --git a/inc/classes/main/images/class_BaseImage.php b/inc/classes/main/images/class_BaseImage.php index 27d768cc..3c44ef60 100644 --- a/inc/classes/main/images/class_BaseImage.php +++ b/inc/classes/main/images/class_BaseImage.php @@ -2,11 +2,11 @@ /** * A general image class * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,22 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { */ private $height = ''; + /** + * X/Y + */ + private $x = ''; + private $y = ''; + + /** + * Font size + */ + private $fontSize = ''; + + /** + * Image string + */ + private $imageString = ''; + /** * Background color in RGB */ @@ -63,7 +79,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { /** * Image resource */ - private $imageResource = null; + private $imageResource = NULL; /** * Image name @@ -78,7 +94,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { /** * Groupable image strings? */ - private $groupable = "single"; + private $groupable = 'single'; /** * Protected constructor @@ -94,7 +110,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { /** * Private setter for all colors * - * @param $colorMode Wether background or foreground color + * @param $colorMode Whether background or foreground color * @param $colorChannel Red, green or blue channel? * @param $colorValue Value to set */ @@ -205,7 +221,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { * @return void */ public function initBackgroundColor () { - $this->colorMode = "backgroundColor"; + $this->colorMode = 'backgroundColor'; } /** @@ -224,7 +240,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { * @return void */ public function initForegroundColor () { - $this->colorMode = "foregroundColor"; + $this->colorMode = 'foregroundColor'; } /** @@ -240,11 +256,11 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { /** * Prepares the class for string (unused at the moment) * - * @param $groupable Wether this image string is groupable or single + * @param $groupable Whether this image string is groupable or single * @return void * @todo Find something usefull for this method. */ - public function initImageString ($groupable = "single") { + public function initImageString ($groupable = 'single') { $this->groupable = $groupable; } @@ -485,7 +501,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { $foreColor = imagecolorallocate($this->getImageResource(), $red, $green, $blue); switch ($this->groupable) { - case "single": // Single image string + case 'single': // Single image string // Compile image string $imageString = $templateInstance->compileRawCode($this->getString()); @@ -501,11 +517,11 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor); break; - case "groupable": // More than one string allowed + case 'groupable': // More than one string allowed // Walk through all groups foreach ($templateInstance->getVariableGroups() as $group => $set) { // Set the group - $templateInstance->setVariableGroup($group, false); + $templateInstance->setVariableGroup($group, FALSE); // Compile image string $imageString = $templateInstance->compileRawCode($this->getString()); @@ -516,7 +532,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { $size = $templateInstance->compileRawCode($this->getFontSize()); // Set the image string - //* DEBUG: */ echo __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}
\n"; + //* DEBUG: */ print __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}
\n"; imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor); } // END - foreach break;