From: Michael J. Rubinsky Date: Thu, 28 May 2009 00:25:48 +0000 (-0400) Subject: Move these methods to the parent class for all to enjoy X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3b673079f965657af2a493728759f82078b2c312;p=horde.git Move these methods to the parent class for all to enjoy --- diff --git a/framework/Image/lib/Horde/Image.php b/framework/Image/lib/Horde/Image.php index b1a48a374..6caf45ad4 100644 --- a/framework/Image/lib/Horde/Image.php +++ b/framework/Image/lib/Horde/Image.php @@ -647,6 +647,18 @@ class Horde_Image return $this->_tmpdir; } + /** + * Utility function to zero out cached geometry information. Shouldn't + * really be called from client code, but is needed since Effects may need + * to clear these. + * + */ + public function clearGeometry() + { + $this->_height = 0; + $this->_width = 0; + } + protected function _logDebug($message) { if (!empty($this->_logger)) { @@ -661,4 +673,26 @@ class Horde_Image } } + /** + * Return point size for font + */ + public static function getFontSize($fontsize) + { + switch ($fontsize) { + case 'medium': + $point = 18; + break; + case 'large': + $point = 24; + break; + case 'giant': + $point = 30; + break; + default: + $point = 12; + } + + return $point; + } + } \ No newline at end of file diff --git a/framework/Image/lib/Horde/Image/Im.php b/framework/Image/lib/Horde/Image/Im.php index c6c943b63..7055a6afd 100644 --- a/framework/Image/lib/Horde/Image/Im.php +++ b/framework/Image/lib/Horde/Image/Im.php @@ -693,30 +693,6 @@ class Horde_Image_Im extends Horde_Image @unlink($tmpout); } - - /** - * Return point size for font - */ - public static function getFontSize($fontsize) - { - switch ($fontsize) { - case 'medium': - $point = 18; - break; - case 'large': - $point = 24; - break; - case 'giant': - $point = 30; - break; - default: - $point = 12; - } - - return $point; - } - - /** * Get the version of the convert command available. This needs to be * publicly visable since it's used by various Effects.