3
ybW                 @   s,   d Z ddlmZmZ ddlmZ dd ZdS )z
Root tag drawer.

   )preserve_rationode_format)sizec             C   s  t | |\}}}|r:|dd \}}|d |_|d |_n0d\}}t| |jdd|_t| |jdd|_|jdkrxdS |jd	d
dkrt| |\}}}	}
|| }}nd\}}}	}
|j|j }}| jj| jj	   | jj
|||| | jj  | jj|| | jj|	|
 dS )zDraw a svg ``node``.          widthxheightyNZpreserveAspectRatioZxMidYMidZnoner   )r   r   )r   r   r   r   )r   Zimage_widthZimage_heightr   getparentr   context	translateZget_current_pointZ	rectangleZclipZscale)Zsurfacenoder   r
   ZviewboxZrect_xZrect_yZscale_xZscale_yZtranslate_xZtranslate_yZ
rect_widthZrect_height r   T/var/www/html/enquirykeeper_venv/lib/python3.6/site-packages/cairosvg/surface/svg.pysvg   s(    


r   N)__doc__Zhelpersr   r   unitsr   r   r   r   r   r   <module>   s   