src/MadeYourDay/SVG/Document.php
protected function getPathFromRect(SimpleXMLElement $rect){

		if(empty($rect['width']) || $rect['width'] < 0 || empty($rect['height']) || $rect['height'] < 0){
			return '';
		}
		if(empty($rect['x'])){
			$rect['x'] = 0;
		}
		if(empty($rect['y'])){
			$rect['y'] = 0;
		}
		return 'M'.$rect['x'].' '.$rect['y'].'l'.$rect['width'].' 0l0 '.$rect['height'].'l'.(-$rect['width']).' 0Z';

	}
protected function getPathFromRect(SimpleXMLElement $rect){

		if(empty($rect['width']) || $rect['width'] < 0 || empty($rect['height']) || $rect['height'] < 0){
			return '';
		}
		if(empty($rect['x'])){
			$rect['x'] = 0;
		}
		if(empty($rect['y'])){
			$rect['y'] = 0;
		}
		return 'M'.$rect['x'].' '.$rect['y'].'l'.$rect['width'].' 0l0 '.$rect['height'].'l'.(-$rect['width']).' 0Z';

	}
converts a rect object to a SVG path definition

@param  SimpleXMLElement $rect rect element
@return string                 SVG path definition