cvs: pear /Image_GIS GIS.php
| From: | Sebastian Bergmann | Date: | Sun, 19 Jan 2003 12:23:12 +0000 |
| Subject: | cvs: pear /Image_GIS GIS.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8412@lists.php.net to get a copy of this message | ||
sebastian Sun Jan 19 07:23:12 2003 EDT
Modified files:
/pear/Image_GIS GIS.php
Log:
Allow setting the range through the constructor.
Index: pear/Image_GIS/GIS.php
diff -u pear/Image_GIS/GIS.php:1.11 pear/Image_GIS/GIS.php:1.12
--- pear/Image_GIS/GIS.php:1.11 Sun Jan 19 07:20:17 2003
+++ pear/Image_GIS/GIS.php Sun Jan 19 07:23:12 2003
@@ -13,7 +13,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
-// $Id: GIS.php,v 1.11 2003/01/19 12:20:17 sebastian Exp $
+// $Id: GIS.php,v 1.12 2003/01/19 12:23:12 sebastian Exp $
//
require_once 'Image/Color.php';
@@ -53,7 +53,7 @@
* $map->saveImage('kiel.png');
* ?>
*
-* @version $Revision: 1.11 $
+* @version $Revision: 1.12 $
* @since Image_GIS 1.0.0
*/
class Image_GIS {
@@ -98,6 +98,18 @@
isset($parameters['width']) ? $parameters['width'] : 640,
isset($parameters['height']) ? $parameters['height'] : 480
);
+
+ if (isset($parameters['range']['x1']) &&
+ isset($parameters['range']['x2']) &&
+ isset($parameters['range']['y1']) &&
+ isset($parameters['range']['y2'])) {
+ $this->setRange(
+ $parameters['range']['x1'],
+ $parameters['range']['x2'],
+ $parameters['range']['y1'],
+ $parameters['range']['y2']
+ );
+ }
}
/**