U
    ª6#^¹  ã                   @   s¼  d dl Z d dlZe j ej e¡¡ d dlmZm	Z	m
Z
 d dlmZ d`dd„Zdadd„Zdd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Z d,d-„ Z!d.d/„ Z"d0d1„ Z#d2d3„ Z$d4d5„ Z%d6d7„ Z&d8d9„ Z'd:d;„ Z(d<d=„ Z)d>d?„ Z*d@dA„ Z+dBdC„ Z,dDdE„ Z-dFdG„ Z.dHdI„ Z/dJdK„ Z0dLdM„ Z1dNdO„ Z2dPdQ„ Z3dRdS„ Z4dTdU„ Z5dVdW„ Z6dXdY„ Z7dZd[„ Z8d\d]„ Z9d^d_„ Z:dS )bé    N)ÚDRAWNSÚSTYLENSÚPRESENTATIONNS)ÚElementc                 K   sª   i }| d k	rL|   td¡}|dkr.| |tdf< n|dkrD| |tdf< ntdƒ‚|d k	r˜|d   td¡}|dkrz||tdf< n|dkr||tdf< ntdƒ‚tf d|i|—ŽS )	NÚfamilyZgraphicz
style-nameZpresentationz9Style's family must be either 'graphic' or 'presentation'r   zclass-namesZqattributes)Z	getAttrNSr   r   r   Ú
ValueErrorr   )Z	stylenameZ
classnamesÚargsZqattrsÚf© r
   úH/var/www/html/UseVoiceDocker/env/lib/python3.8/site-packages/odf/draw.pyÚStyleRefElement   s     r   c                 K   s,   t f d| i|—Ž}d|kr(| td| ¡ |S )NÚnameZdisplaynamezdisplay-name)r   Z	setAttrNSr   )r   r   Úer
   r
   r   ÚDrawElement.   s    r   c                  K   s"   |   dd¡ tf dtdfi| —ŽS )NÚtypeÚsimpleÚqnameÚa©Ú
setdefaultr   r   ©r   r
   r
   r   ÚA5   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   Zapplet©r   r   r   r
   r
   r   ÚApplet9   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   zarea-circler   r   r
   r
   r   Ú
AreaCircle<   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   zarea-polygonr   r   r
   r
   r   ÚAreaPolygon?   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   zarea-rectangler   r   r
   r
   r   ÚAreaRectangleB   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   Zcaption©r   r   r   r
   r
   r   ÚCaptionE   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   Zcircler   r   r
   r
   r   ÚCircleH   s    r   c                  K   s   t f dtdfi| —ŽS )Nr   Z	connectorr   r   r
   r
   r   Ú	ConnectorK   s    r    c                  K   s   t f dtdfi| —ŽS )Nr   zcontour-pathr   r   r
   r
   r   ÚContourPathN   s    r!   c                  K   s   t f dtdfi| —ŽS )Nr   zcontour-polygonr   r   r
   r
   r   ÚContourPolygonQ   s    r"   c                  K   s   t f dtdfi| —ŽS )Nr   Zcontrolr   r   r
   r
   r   ÚControlT   s    r#   c                  K   s   t f dtdfi| —ŽS )Nr   zcustom-shaper   r   r
   r
   r   ÚCustomShapeW   s    r$   c                  K   s   t f dtdfi| —ŽS )Nr   Zellipser   r   r
   r
   r   ÚEllipseZ   s    r%   c                  K   s   t f dtdfi| —ŽS )Nr   zenhanced-geometryr   r   r
   r
   r   ÚEnhancedGeometry]   s    r&   c                  K   s   t f dtdfi| —ŽS )Nr   Zequationr   r   r
   r
   r   ÚEquation`   s    r'   c                  K   s"   |   dd¡ tf dtdfi| —ŽS )Nr   r   r   z
fill-image)r   r   r   r   r
   r
   r   Ú	FillImagec   s    r(   c                  K   s"   |   dd¡ tf dtdfi| —ŽS )Nr   r   r   zfloating-framer   r   r
   r
   r   ÚFloatingFrameg   s    r)   c                  K   s   t f dtdfi| —ŽS )Nr   Úframer   r   r
   r
   r   ÚFramek   s    r+   c                  K   s   t f dtdfi| —ŽS )Nr   Úgr   r   r
   r
   r   ÚGn   s    r-   c                  K   s   t f dtdfi| —ŽS )Nr   z
glue-pointr   r   r
   r
   r   Ú	GluePointq   s    r.   c                  K   s   t f dtdfi| —ŽS )Nr   Zgradient©r   r   r   r
   r
   r   ÚGradientt   s    r0   c                  K   s   t f dtdfi| —ŽS )Nr   Úhandler   r   r
   r
   r   ÚHandlew   s    r2   c                  K   s   t f dtdfi| —ŽS )Nr   Zhatchr/   r   r
   r
   r   ÚHatchz   s    r3   c                  K   s   t f dtdfi| —ŽS )Nr   Úimager   r   r
   r
   r   ÚImage}   s    r5   c                  K   s   t f dtdfi| —ŽS )Nr   z	image-mapr   r   r
   r
   r   ÚImageMap€   s    r6   c                  K   s   t f dtdfi| —ŽS )Nr   Zlayerr   r   r
   r
   r   ÚLayerƒ   s    r7   c                  K   s   t f dtdfi| —ŽS )Nr   z	layer-setr   r   r
   r
   r   ÚLayerSet†   s    r8   c                  K   s   t f dtdfi| —ŽS )Nr   Úliner   r   r
   r
   r   ÚLine‰   s    r:   c                  K   s   t f dtdfi| —ŽS )Nr   Úmarkerr/   r   r
   r
   r   ÚMarkerŒ   s    r<   c                  K   s   t f dtdfi| —ŽS )Nr   Zmeasurer   r   r
   r
   r   ÚMeasure   s    r=   c                  K   s   t f dtdfi| —ŽS )Nr   Úobjectr   r   r
   r
   r   ÚObject’   s    r?   c                  K   s   t f dtdfi| —ŽS )Nr   z
object-oler   r   r
   r
   r   Ú	ObjectOle•   s    r@   c                  K   s   t f dtdfi| —ŽS )Nr   Zopacityr/   r   r
   r
   r   ÚOpacity˜   s    rA   c                  K   s   t f dtdfi| —ŽS )Nr   Zpager   r   r
   r
   r   ÚPage›   s    rB   c                  K   s   t f dtdfi| —ŽS )Nr   zpage-thumbnailr   r   r
   r
   r   ÚPageThumbnailž   s    rC   c                  K   s   t f dtdfi| —ŽS )Nr   Úparamr   r   r
   r
   r   ÚParam¡   s    rE   c                  K   s   t f dtdfi| —ŽS )Nr   Úpathr   r   r
   r
   r   ÚPath¤   s    rG   c                  K   s"   |   dd¡ tf dtdfi| —ŽS )Nr   r   r   Zpluginr   r   r
   r
   r   ÚPlugin§   s    rH   c                  K   s   t f dtdfi| —ŽS )Nr   Zpolygonr   r   r
   r
   r   ÚPolygon«   s    rI   c                  K   s   t f dtdfi| —ŽS )Nr   Zpolyliner   r   r
   r
   r   ÚPolyline®   s    rJ   c                  K   s   t f dtdfi| —ŽS )Nr   Zrectr   r   r
   r
   r   ÚRect±   s    rK   c                  K   s   t f dtdfi| —ŽS )Nr   zregular-polygonr   r   r
   r
   r   ÚRegularPolygon´   s    rL   c                  K   s   t f dtdfi| —ŽS )Nr   zstroke-dashr/   r   r
   r
   r   Ú
StrokeDash·   s    rM   c                  K   s   t f dtdfi| —ŽS )Nr   ztext-boxr   r   r
   r
   r   ÚTextBoxº   s    rN   )NN)N);ÚsysÚos.pathÚosrF   ÚappendÚdirnameÚ__file__Zodf.namespacesr   r   r   Zodf.elementr   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r+   r-   r.   r0   r2   r3   r5   r6   r7   r8   r:   r<   r=   r?   r@   rA   rB   rC   rE   rG   rH   rI   rJ   rK   rL   rM   rN   r
   r
   r
   r   Ú<module>   sb   

