cvs: pear /Image_Transform Transform.php
| From: | David Coallier | Date: | Sat, 21 Apr 2007 20:37:36 +0000 |
| Subject: | cvs: pear /Image_Transform Transform.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-46074@lists.php.net to get a copy of this message | ||
davidc Sat Apr 21 20:37:36 2007 UTC
Modified files:
/pear/Image_Transform Transform.php
Log:
- Bugfix #8573 This way we can retrieve the new_y and new_x with getNewImageWidth and
getNewImageHeight
http://cvs.php.net/viewvc.cgi/pear/Image_Transform/Transform.php?r1=1.43&r2=1.44&diff_format=u
Index: pear/Image_Transform/Transform.php
diff -u pear/Image_Transform/Transform.php:1.43 pear/Image_Transform/Transform.php:1.44
--- pear/Image_Transform/Transform.php:1.43 Sat Apr 21 19:08:10 2007
+++ pear/Image_Transform/Transform.php Sat Apr 21 20:37:36 2007
@@ -22,7 +22,7 @@
* @author Philippe Jausions <Philippe.Jausions@11abacus.com>
* @copyright 2002-2007 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Transform.php,v 1.43 2007/04/21 19:08:10 dufuz Exp $
+ * @version CVS: $Id: Transform.php,v 1.44 2007/04/21 20:37:36 davidc Exp $
* @link http://pear.php.net/package/Image_Transform
*/
@@ -746,6 +746,43 @@
}
/**
+ * Returns the new image width
+ *
+ * This function returns the width
+ * of the new image.
+ *
+ * @access public
+ * @return int The width of the new image.
+ */
+ function getNewImageWidth()
+ {
+ if (isset($this->new_x)) {
+ return (int)$this->new_x;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return new image Y
+ *
+ * This function will retrieve the
+ * new image 'Y' and return it's value
+ * if it's set.
+ *
+ * @access public
+ * @return int The new height of the image.
+ */
+ function getNewImageHeight()
+ {
+ if (isset($this->new_y)) {
+ return (int)$this->new_y;
+ }
+
+ return false;
+ }
+
+ /**
* Returns the image width
*
* @return int the width of the image
@@ -1171,4 +1208,4 @@
&& $top < $this->new_y
&& $bottom >= 0);
}
-}
\ No newline at end of file
+}