X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fimages%2Fclass_BaseImage.php;h=52ed8b0a825d0eb1908b8f585d417381ff08ee8f;hb=565aa3534dea60144d0254e342110916b4ef3928;hp=7f667cde4a48e487d69789dffbdf59532435c32c;hpb=c6d73b0e3246efc824cb98338d4be7ee5bc9f308;p=core.git diff --git a/inc/classes/main/images/class_BaseImage.php b/inc/classes/main/images/class_BaseImage.php index 7f667cde..52ed8b0a 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, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 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 @@ -25,60 +25,60 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { /** * Image type */ - private $imageType = ""; + private $imageType = ''; /** * Width of the image */ - private $width = ""; + private $width = ''; /** * Height of the image */ - private $height = ""; + private $height = ''; /** * Background color in RGB */ private $backgroundColor = array( - 'red' => "", - 'green' => "", - 'blue' => "" + 'red' => '', + 'green' => '', + 'blue' => '' ); /** * Foreground color in RGB */ private $foregroundColor = array( - 'red' => "", - 'green' => "", - 'blue' => "" + 'red' => '', + 'green' => '', + 'blue' => '' ); /** * Current choosen color array */ - private $colorMode = ""; + private $colorMode = ''; /** * Image resource */ - private $imageResource = null; + private $imageResource = NULL; /** * Image name */ - private $imageName = ""; + private $imageName = ''; /** * String name */ - private $stringName = ""; + private $stringName = ''; /** * Groupable image strings? */ - private $groupable = "single"; + private $groupable = 'single'; /** * Protected constructor @@ -89,16 +89,12 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { protected function __construct ($className) { // Call parent constructor parent::__construct($className); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** * 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 */ @@ -209,7 +205,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { * @return void */ public function initBackgroundColor () { - $this->colorMode = "backgroundColor"; + $this->colorMode = 'backgroundColor'; } /** @@ -228,7 +224,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable { * @return void */ public function initForegroundColor () { - $this->colorMode = "foregroundColor"; + $this->colorMode = 'foregroundColor'; } /** @@ -244,11 +240,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; } @@ -489,7 +485,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()); @@ -505,11 +501,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()); @@ -520,7 +516,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;