| 
<?php
/* PIMG module: layers images on top of each other (multicalls to pimg_merge) */
 class pimg_layer
 {
 /* Resources */
 private $pimg;
 
 // PIMG constructor
 function __construct($pimg)
 {
 $this -> pimg = $pimg;
 }
 
 
 
 /*
 Layers images on top of each other (multicalls to pimg_merge). You can pass as many arguments as you want, as long as they are valid pimg_image resources or arrays of pimg_image resource as first arg and x an y as second and third
 @result: a pointer to the caller pimg class for furthur usage
 */
 function init()
 {
 // Get args
 $args = func_get_args();
 
 // Go through all args
 if (is_array($args))
 foreach($args as $entry)
 if (is_array($entry))
 $this -> pimg -> merge($entry[0], $entry[1], $entry[2], $entry[3]);
 else
 $this -> pimg -> merge($entry);
 
 // Return the caller pimg instance
 return $this -> pimg;
 }
 }
 ?>
 |