/**
  * Creates a canvas object that writes to the image passed as a parameter
  *
  * Shouldn't be used directly, use WideImage_Image::getCanvas() instead.
  *
  * @param WideImage_Image $img Image object
  */
 function __construct($img)
 {
     $this->handle = $img->getHandle();
     $this->image = $img;
 }
 /**
  * Copies this image onto another image
  * 
  * @param WideImage_Image $dest
  * @param int $left
  * @param int $top
  **/
 function copyTo($dest, $left = 0, $top = 0)
 {
     if (!imagecopy($dest->getHandle(), $this->handle, $left, $top, 0, 0, $this->getWidth(), $this->getHeight())) {
         throw new WideImage_GDFunctionResultException("imagecopy() returned false");
     }
 }