
    h                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \(       a  SSKJr  SSKJr  SS	KJr  SS
K	Jr   " S S\
5      r " S S5      rg)zhObjects related to shapes.

A shape is a visual object that appears on the drawing layer of a document.
    )annotations)TYPE_CHECKING)WD_INLINE_SHAPE)nsmap)Parented)CT_Body)	CT_Inline)	StoryPart)Lengthc                  V   ^  \ rS rSrSrS	U 4S jjrS
S jrS rS r\	S 5       r
SrU =r$ )InlineShapes   zUSequence of |InlineShape| instances, supporting len(), iteration, and indexed access.c                8   > [         [        U ]  U5        Xl        g N)superr   __init___body)selfbody_elmparent	__class__s      </var/www/html/env/lib/python3.13/site-packages/docx/shape.pyr   InlineShapes.__init__   s    lD*62
    c                t     U R                   U   n[        U5      $ ! [         a    SU-  n[        U5      ef = f)z2Provide indexed access, e.g. 'inline_shapes[idx]'.z$inline shape index [%d] out of range)_inline_lst
IndexErrorInlineShape)r   idxinlinemsgs       r   __getitem__InlineShapes.__getitem__   sI    	"%%c*F
 6""	  	"83>CS/!	"s    7c                (    S U R                    5       $ )Nc              3  8   #    U  H  n[        U5      v   M     g 7fr   )r   ).0r    s     r   	<genexpr>(InlineShapes.__iter__.<locals>.<genexpr>'   s     C2BF##2Bs   )r   r   s    r   __iter__InlineShapes.__iter__&   s    C$2B2BCCr   c                ,    [        U R                  5      $ r   )lenr   r)   s    r   __len__InlineShapes.__len__)   s    4##$$r   c                @    U R                   nSnUR                  U5      $ )Nz//w:p/w:r/w:drawing/wp:inline)r   xpath)r   bodyr1   s      r   r   InlineShapes._inline_lst,   s    zz/zz%  r   )r   )r   r   r   r
   )r   int)__name__
__module____qualname____firstlineno____doc__r   r"   r*   r.   propertyr   __static_attributes____classcell__r   s   @r   r   r      s/    _#D% ! !r   r   c                     ^  \ rS rSrSrS
U 4S jjr\SS j5       r\R                  SS j5       r\S 5       r	\S 5       r
\
R                  SS j5       r
S	rU =r$ )r   3   z`Proxy for an ``<wp:inline>`` element, representing the container for an inline
graphical object.c                6   > [         [        U ]  5         Xl        g r   )r   r   r   _inline)r   r    r   s     r   r   InlineShape.__init__7   s    k4)+r   c                B    U R                   R                  R                  $ )zKRead/write.

The display height of this inline shape as an |Emu| instance.
)rA   extentcyr)   s    r   heightInlineShape.height;        ||""%%%r   c                    XR                   R                  l        XR                   R                  R                  R
                  R                  l        g r   )rA   rD   rE   graphicgraphicDatapicspPr)r   rE   s     r   rF   rG   C   4    !#79((,,114r   c                   U R                   R                  R                  nUR                  nU[        S   :X  aM  UR
                  R                  R                  nUR                  b  [        R                  $ [        R                  $ U[        S   :X  a  [        R                  $ U[        S   :X  a  [        R                  $ [        R                  $ )zwThe type of this inline shape as a member of
``docx.enum.shape.WD_INLINE_SHAPE``, e.g. ``LINKED_PICTURE``.

Read-only.
rL   cdgm)rA   rJ   rK   urir   rL   blipFillbliplinkr   LINKED_PICTUREPICTURECHART	SMART_ARTNOT_IMPLEMENTED)r   rK   rR   rT   s       r   typeInlineShape.typeH   s     ll**66oo%,??++00Dyy$&555"***%*"(((%,",,,...r   c                B    U R                   R                  R                  $ )zJRead/write.

The display width of this inline shape as an |Emu| instance.
)rA   rD   cxr)   s    r   widthInlineShape.width\   rH   r   c                    XR                   R                  l        XR                   R                  R                  R
                  R                  l        g r   )rA   rD   r^   rJ   rK   rL   rM   )r   r^   s     r   r_   r`   d   rN   r   )rA   )r    r	   )returnr   )rE   r   )r^   r   )r5   r6   r7   r8   r9   r   r:   rF   setterr[   r_   r;   r<   r=   s   @r   r   r   3   sy     & & ]]: : / /& & & \\: :r   r   N)r9   
__future__r   typingr   docx.enum.shaper   docx.oxml.nsr   docx.sharedr   docx.oxml.documentr   docx.oxml.shaper	   docx.parts.storyr
   r   r   r    r   r   <module>rm      s@   
 #   +   *)*"!8 !<4: 4:r   