o
    j                     @  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	   rEmbed r   r   R/home/air/Certificate/back/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)_add_srcRectltrb)selfcroppingsrcRectr   r   r   crop+   s   zCT_BlipFillProperties.crop)	r   r   r   r   _tag_seqr   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   gsLstlinpathclassmethodr6   r:   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   rF   r   r   r   r   r?   Z   s    r?   c                   @  s$   e Zd ZdZedZedd ZdS )r8   z`a:gsLst` custom element class.za:gsc                 C  r1   )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>
r2   r3   r4   r   r   r   r9   p   s
   zCT_GradientStopList.new_gsLstN)r   r   r   r   r   gsr>   r9   r   r   r   r   r8   k   s
    r8   c                   @     e Zd ZdZdS )CT_GroupFillPropertiesz `a:grpFill` custom element classNr   r   r   r   r   r   r   r   rJ          rJ   c                   @  r   )CT_LinearShadePropertiesz`a:lin` custom element classangN)r   r   r   r   r   r   rN   r   r   r   r   rM      s    rM   c                   @  rI   )CT_NoFillPropertiesz`a:noFill` custom element classNrK   r   r   r   r   rO      rL   rO   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:bgClrrQ   r   Nr   rR   r    prstc                 C     dt d }t|}|S )r7   z3<a:bgClr %s>
 <a:srgbClr val="FFFFFF"/>
</a:bgClr>
r2   r   r   )r&   xmlbgClrr   r   r   
_new_bgClr      z#CT_PatternFillProperties._new_bgClrc                 C  rT   )r7   z3<a:fgClr %s>
 <a:srgbClr val="000000"/>
</a:fgClr>
r2   rU   )r&   rV   fgClrr   r   r   
_new_fgClr   rY   z#CT_PatternFillProperties._new_fgClr)r   r   r   r   r*   r   rZ   rW   r   r   rS   rX   r[   r   r   r   r   rP      s    
rP   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   r\      s    r\   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@   rA   rB   rC   rD   rE   r   r   N)r   r   r   r   r   r   rG   r   r   r   r   r^      s    
r^   N)!r   
__future__r   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,   r?   r8   rJ   rM   rO   rP   r\   r^   r   r   r   r   <module>   s$    $' 	