o
    7 h                     @  s$  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
mZmZmZ ddlmZmZmZmZmZmZmZ G dd	 d	eZG d
d deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZ dS )z?lxml custom element classes for DrawingML-related XML elements.    )annotations)MSO_PATTERN_TYPE)	parse_xml)nsdecls)ST_PercentageST_PositiveFixedAngleST_PositiveFixedPercentageST_RelationshipId)BaseOxmlElementChoice	OneOrMoreOptionalAttributeRequiredAttribute	ZeroOrOneZeroOrOneChoicec                   @     e Zd ZdZedeZdS )CT_Blipz
    <a:blip> element
    zr:embedN)__name__
__module____qualname____doc__r   r	   ZrEmbed r   r   Z/var/www/html/figdemos/bartoux_crm/venv/lib/python3.10/site-packages/pptx/oxml/dml/fill.pyr      s    r   c                   @  sF   e Zd ZdZdZededd dZededd dZ[d	d
 ZdS )CT_BlipFillPropertiesz8
    Custom element class for <a:blipFill> element.
    )a:blip	a:srcRectza:tilez	a:stretchr      N
successorsr      c                 C  s    |   }|\|_|_|_|_dS )zO
        Set `a:srcRect` child to crop according to *cropping* values.
        N)Z_add_srcRectltrb)selfZcroppingsrcRectr   r   r   crop+   s   zCT_BlipFillProperties.crop)	r   r   r   r   _tag_seqr   Zblipr%   r&   r   r   r   r   r   !   s    r   c                   @  sf   e Zd ZdZdZededd dZededd dZed	ed
d dZ[e	dd Z
dd ZdS )CT_GradientFillPropertiesz"`a:gradFill` custom element class.)a:gsLsta:lina:pathz
a:tileRectr)   r   Nr   r*   r   r+      c                 C     t dtd S )z6Return newly-created "loose" default gradient subtree.a  <a:gradFill %s rotWithShape="1">
  <a:gsLst>
    <a:gs pos="0">
      <a:schemeClr val="accent1">
        <a:tint val="100000"/>
        <a:shade val="100000"/>
        <a:satMod val="130000"/>
      </a:schemeClr>
    </a:gs>
    <a:gs pos="100000">
      <a:schemeClr val="accent1">
        <a:tint val="50000"/>
        <a:shade val="100000"/>
        <a:satMod val="350000"/>
      </a:schemeClr>
    </a:gs>
  </a:gsLst>
  <a:lin scaled="0"/>
</a:gradFill>
ar   r   clsr   r   r   new_gradFill<   s
   z&CT_GradientFillProperties.new_gradFillc                 C  s   t  S )(Override default to add minimum subtree.)CT_GradientStopList	new_gsLst)r$   r   r   r   
_new_gsLstU   s   z$CT_GradientFillProperties._new_gsLst)r   r   r   r   r'   r   ZgsLstZlinpathclassmethodr2   r6   r   r   r   r   r(   3   s    
r(   c                   @  sJ   e Zd ZdZeededededededfdd	Zed
eZ	dS )CT_GradientStopz`a:gs` custom element class.
a:scrgbClr	a:srgbClra:hslClra:sysClra:schemeClr	a:prstClrr   r   posN)
r   r   r   r   r   r   eg_colorChoicer   r   r@   r   r   r   r   r9   Z   s    r9   c                   @  s$   e Zd ZdZedZedd ZdS )r4   z`a:gsLst` custom element class.za:gsc                 C  r-   )zReturn newly-created "loose" default stop-list subtree.

        An `a:gsLst` element must have at least two `a:gs` children. These
        are the default from the PowerPoint built-in "White" template.
        al  <a:gsLst %s>
  <a:gs pos="0">
    <a:schemeClr val="accent1">
      <a:tint val="100000"/>
      <a:shade val="100000"/>
      <a:satMod val="130000"/>
    </a:schemeClr>
  </a:gs>
  <a:gs pos="100000">
    <a:schemeClr val="accent1">
      <a:tint val="50000"/>
      <a:shade val="100000"/>
      <a:satMod val="350000"/>
    </a:schemeClr>
  </a:gs>
</a:gsLst>
r.   r/   r0   r   r   r   r5   p   s
   zCT_GradientStopList.new_gsLstN)r   r   r   r   r   gsr8   r5   r   r   r   r   r4   k   s
    r4   c                   @     e Zd ZdZdS )CT_GroupFillPropertiesz `a:grpFill` custom element classNr   r   r   r   r   r   r   r   rD          rD   c                   @  r   )CT_LinearShadePropertiesz`a:lin` custom element classangN)r   r   r   r   r   r   rH   r   r   r   r   rG      s    rG   c                   @  rC   )CT_NoFillPropertiesz`a:noFill` custom element classNrE   r   r   r   r   rI      rF   rI   c                   @  sX   e Zd ZdZdZededd dZededd dZ[ed	e	Z
d
d Zdd ZdS )CT_PatternFillPropertiesz!`a:pattFill` custom element class)a:fgClra:bgClrrK   r   Nr   rL   r   prstc                 C     dt d }t|}|S )r3   z3<a:bgClr %s>
 <a:srgbClr val="FFFFFF"/>
</a:bgClr>
r.   r   r   )r$   xmlbgClrr   r   r   
_new_bgClr      z#CT_PatternFillProperties._new_bgClrc                 C  rN   )r3   z3<a:fgClr %s>
 <a:srgbClr val="000000"/>
</a:fgClr>
r.   rO   )r$   rP   fgClrr   r   r   
_new_fgClr   rS   z#CT_PatternFillProperties._new_fgClr)r   r   r   r   r'   r   rT   rQ   r   r   rM   rR   rU   r   r   r   r   rJ      s    
rJ   c                   @  sH   e Zd ZdZededdZededdZededdZededdZ	dS )	CT_RelativeRectz'`a:srcRect` element and perhaps others.r    g        )defaultr!   r"   r#   N)
r   r   r   r   r   r   r    r!   r"   r#   r   r   r   r   rV      s    rV   c                   @  s@   e Zd ZdZeededededededfdd	Zd
S )CT_SolidColorFillPropertiesz#`a:solidFill` custom element class.r:   r;   r<   r=   r>   r?   r   r   N)r   r   r   r   r   r   rA   r   r   r   r   rX      s    
rX   N)!r   
__future__r   Zpptx.enum.dmlr   	pptx.oxmlr   pptx.oxml.nsr   pptx.oxml.simpletypesr   r   r   r	   pptx.oxml.xmlchemyr
   r   r   r   r   r   r   r   r   r(   r9   r4   rD   rG   rI   rJ   rV   rX   r   r   r   r   <module>   s$    $' 	