/**
  * Sets the origin of the marker image
  *
  * Available prototypes:
  *  - function setOrigin(Ivory\GoogleMap\Base\Point $origin = null)
  *  - function setOrigin(double x, double y)
  *
  * @throws \Ivory\GoogleMap\Exception\OverlayException If the origin is not valid.
  */
 public function setOrigin()
 {
     $args = func_get_args();
     if (isset($args[0]) && $args[0] instanceof Point) {
         $this->origin = $args[0];
     } elseif (isset($args[0]) && is_numeric($args[0]) && (isset($args[1]) && is_numeric($args[1]))) {
         if ($this->origin === null) {
             $this->origin = new Point();
         }
         $this->origin->setX($args[0]);
         $this->origin->setY($args[1]);
     } elseif (!isset($args[0])) {
         $this->origin = null;
     } else {
         throw OverlayException::invalidMarkerImageOrigin();
     }
 }
 /**
  * @expectedException \Ivory\GoogleMap\Exception\BaseException
  * @expectedExceptionMessage The x coordinate of a point must be a numeric value.
  */
 public function testXWithInvalidValue()
 {
     $this->point->setX(true);
 }