*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* Image resource
*/
- private $imageResource = null;
+ private $imageResource = NULL;
/**
* Image name
/**
* Groupable image strings?
*/
- private $groupable = "single";
+ private $groupable = 'single';
/**
* Protected constructor
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
*/
* @return void
*/
public function initBackgroundColor () {
- $this->colorMode = "backgroundColor";
+ $this->colorMode = 'backgroundColor';
}
/**
* @return void
*/
public function initForegroundColor () {
- $this->colorMode = "foregroundColor";
+ $this->colorMode = 'foregroundColor';
}
/**
/**
* 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;
}
$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());
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
$size = $templateInstance->compileRawCode($this->getFontSize());
// Set the image string
- //* DEBUG: */ echo __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}<br />\n";
+ //* DEBUG: */ print __METHOD__.": size={$size}, x={$x}, y={$y}, string={$imageString}<br />\n";
imagestring($this->getImageResource(), $size, $x, $y, $imageString, $foreColor);
} // END - foreach
break;