ó
    ˆ*£hÅ  ã                  óî   • S r SSKJr  SSKJr  SSKJr  SSKJrJ	r	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\5      r " S S\5      r " S S\5      r " S S\5      rg)zAShapes based on the `p:pic` element, including Picture and Movie.é    )Úannotations)ÚTYPE_CHECKING©Ú
LineFormat)Ú	MSO_SHAPEÚMSO_SHAPE_TYPEÚPP_MEDIA_TYPE)Ú	BaseShape)ÚParentedElementProxy)Úlazyproperty)Ú
CT_Picture)ÚCT_LineProperties)ÚProvidesPartc                  óN  ^ • \ 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S j5       r	\	R                  SS j5       r	\SS j5       r
\
R                  SS	 j5       r
\SS
 j5       r\R                  SS j5       rS r\SS j5       r\SS j5       rSrU =r$ )Ú_BasePictureé   z1Base class for shapes based on a `p:pic` element.c                ó8   >• [         [        U ]  X5        Xl        g ©N)Úsuperr   Ú__init__Ú_pic)ÚselfÚpicÚparentÚ	__class__s      €ÚP/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pptx/shapes/picture.pyr   Ú_BasePicture.__init__   s   ø€ ÜŒl˜DÑ*¨3Ô7Ø�	ó    c                ó.   • U R                   R                  $ )zÆ|float| representing relative portion cropped from shape bottom.

Read/write. 1.0 represents 100%. For example, 25% is represented by 0.25. Negative values
are valid as are values greater than 1.0.
©r   Ú	srcRect_b©r   s    r   Úcrop_bottomÚ_BasePicture.crop_bottom   ó   € ð �y‰y×"Ñ"Ð"r   c                ó$   • XR                   l        g r   r    ©r   Úvalues     r   r#   r$   #   ó   € à#�	‰	Õr   c                ó.   • U R                   R                  $ )z¡|float| representing relative portion cropped from left of shape.

Read/write. 1.0 represents 100%. A negative value extends the side beyond the image
boundary.
©r   Ú	srcRect_lr"   s    r   Ú	crop_leftÚ_BasePicture.crop_left'   r%   r   c                ó$   • XR                   l        g r   r+   r'   s     r   r-   r.   0   r)   r   c                ó.   • U R                   R                  $ )ze|float| representing relative portion cropped from right of shape.

Read/write. 1.0 represents 100%.
©r   Ú	srcRect_rr"   s    r   Ú
crop_rightÚ_BasePicture.crop_right4   ó   € ð �y‰y×"Ñ"Ð"r   c                ó$   • XR                   l        g r   r1   r'   s     r   r3   r4   <   r)   r   c                ó.   • U R                   R                  $ )z`|float| representing relative portion cropped from shape top.

Read/write. 1.0 represents 100%.
©r   Ú	srcRect_tr"   s    r   Úcrop_topÚ_BasePicture.crop_top@   r5   r   c                ó$   • XR                   l        g r   r8   r'   s     r   r:   r;   H   r)   r   c                ó6   • U R                   R                  5       $ )zuReturn the `a:ln` element for this `p:pic`-based image.

The `a:ln` element contains the line format properties XML.
)r   Úget_or_add_lnr"   s    r   r>   Ú_BasePicture.get_or_add_lnL   s   € ð
 �y‰y×&Ñ&Ó(Ð(r   c                ó   • [        U 5      $ )zRProvides access to properties of the picture outline, such as its color and width.r   r"   s    r   ÚlineÚ_BasePicture.lineS   s   € ô ˜$ÓÐr   c                ó.   • U R                   R                  $ )z�The `a:ln` element for this `p:pic`.

Contains the line format properties such as line color and width. |None| if no `a:ln`
element is present.
)r   Úlnr"   s    r   rD   Ú_BasePicture.lnX   s   € ð �y‰y�|‰|Ðr   )r   )r   r   r   r   )ÚreturnÚfloat)r(   rG   )rF   r   )rF   zCT_LineProperties | None)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úpropertyr#   Úsetterr-   r3   r:   r>   r   rA   rD   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      sî   ø† Ù;÷ð ó#ó ð#ð ×Ñó$ó ð$ð ó#ó ð#ð ×Ñó$ó ð$ð ó#ó ð#ð ×Ñó$ó ð$ð ó#ó ð#ð ‡_�_ó$ó ð$ò)ð ó ó ð ð óó ör   r   c                  ód   • \ rS rSrSr\S	S j5       r\S
S j5       r\S 5       r	\SS j5       r
Srg)ÚMovieéb   zíA movie shape, one that places a video on a slide.

Like |Picture|, a movie shape is based on the `p:pic` element. A movie is composed of a video
and a *poster frame*, the placeholder image that represents the video before it is played.
c                ó.   • [        U R                  U 5      $ )z}The |_MediaFormat| object for this movie.

The |_MediaFormat| object provides access to formatting properties for the movie.
)Ú_MediaFormatr   r"   s    r   Úmedia_formatÚMovie.media_formati   s   € ô ˜DŸI™I tÓ,Ð,r   c                ó"   • [         R                  $ )z}Member of :ref:`PpMediaType` describing this shape.

The return value is unconditionally `PP_MEDIA_TYPE.MOVIE` in this case.
)r	   ÚMOVIEr"   s    r   Ú
media_typeÚMovie.media_typeq   s   € ô ×"Ñ"Ð"r   c                ón   • U R                   U R                  R                  p!Uc  gUR                  U5      $ )z|Return |Image| object containing poster frame for this movie.

Returns |None| if this movie has no poster frame (uncommon).
N)Úpartr   Úblip_rIdÚ	get_image©r   Ú
slide_partÚrIds      r   Úposter_frameÚMovie.poster_framey   s2   € ð Ÿ)™) T§Y¡Y×%7Ñ%7�CØ‰;ØØ×#Ñ# CÓ(Ð(r   c                ó"   • [         R                  $ )z†Return member of :ref:`MsoShapeType` describing this shape.

The return value is unconditionally `MSO_SHAPE_TYPE.MEDIA` in this
case.
)r   ÚMEDIAr"   s    r   Ú
shape_typeÚMovie.shape_type„   s   € ô ×#Ñ#Ð#r   © N)rF   rU   )rF   r	   ©rF   r   )rH   rI   rJ   rK   rL   r   rV   rM   rZ   rc   rg   rO   ri   r   r   rR   rR   b   sW   † ñð ó-ó ð-ð ó#ó ð#ð ñ)ó ð)ð ó$ó ó$r   rR   c                  óx   • \ rS rSrSr\S	S j5       r\R                  S
S j5       r\S 5       r\SS j5       r	Sr
g)ÚPictureéŽ   zUA picture shape, one that places an image on a slide.

Based on the `p:pic` element.
c                ób   • U R                   R                  R                  nUc  gUR                  $ )aµ  Member of MSO_SHAPE indicating masking shape.

A picture can be masked by any of the so-called "auto-shapes" available in PowerPoint,
such as an ellipse or triangle. When a picture is masked by a shape, the shape assumes the
same dimensions as the picture and the portion of the picture outside the shape boundaries
does not appear. Note the default value for a newly-inserted picture is
`MSO_AUTO_SHAPE_TYPE.RECTANGLE`, which performs no cropping because the extents of the
rectangle exactly correspond to the extents of the picture.

The available shapes correspond to the members of :ref:`MsoAutoShapeType`.

The return value can also be |None|, indicating the picture either has no geometry (not
expected) or has custom geometry, like a freeform shape. A picture with no geometry will
have no visible representation on the slide, although it can be selected. This is because
without geometry, there is no "inside-the-shape" for it to appear in.
N)r   ÚspPrÚprstGeomÚprst)r   rp   s     r   Úauto_shape_typeÚPicture.auto_shape_type”   s*   € ð$ —9‘9—>‘>×*Ñ*ˆØÑØØ�}‰}Ðr   c                óÆ   • [         R                  " U5        U R                  R                  nUR                  nUc   UR                  5         UR                  5       nXl        g r   )r   Úvalidater   ro   rp   Ú_remove_custGeomÚ_add_prstGeomrq   )r   Úmemberro   rp   s       r   rr   rs   «   sK   € ä×Ò˜6Ô"Ø�y‰y�~‰~ˆØ—=‘=ˆØÑØ×!Ñ!Ô#Ø×)Ñ)Ó+ˆHØ�r   c                ó‚   • U R                   U R                  R                  p!Uc  [        S5      eUR	                  U5      $ )zvThe |Image| object for this picture.

Provides access to the properties and bytes of the image in this picture shape.
zno embedded image)r]   r   r^   Ú
ValueErrorr_   r`   s      r   ÚimageÚPicture.imageµ   s;   € ð Ÿ)™) T§Y¡Y×%7Ñ%7�CØ‰;ÜÐ0Ó1Ð1Ø×#Ñ# CÓ(Ð(r   c                ó"   • [         R                  $ )z6Unconditionally `MSO_SHAPE_TYPE.PICTURE` in this case.)r   ÚPICTUREr"   s    r   rg   ÚPicture.shape_typeÀ   s   € ô ×%Ñ%Ð%r   ri   N)rF   zMSO_SHAPE | None)rx   r   rj   )rH   rI   rJ   rK   rL   rM   rr   rN   r{   rg   rO   ri   r   r   rl   rl   Ž   s]   † ñð
 óó ðð, ×Ñóó ðð ñ)ó ð)ð ó&ó ó&r   rl   c                  ó   • \ rS rSrSrSrg)rU   éÆ   z‘Provides access to formatting properties for a Media object.

Media format properties are things like start point, volume, and
compression type.
ri   N)rH   rI   rJ   rK   rL   rO   ri   r   r   rU   rU   Æ   s   † ôr   rU   N)rL   Ú
__future__r   Útypingr   Úpptx.dml.liner   Úpptx.enum.shapesr   r   r	   Úpptx.shapes.baser
   Úpptx.sharedr   Ú	pptx.utilr   Úpptx.oxml.shapes.picturer   Úpptx.oxml.shapes.sharedr   Ú
pptx.typesr   r   rR   rl   rU   ri   r   r   Ú<module>rŒ      sb   ðÙ Gå "å  å $ß EÑ EÝ &Ý ,Ý "æÝ3Ý9Ý'ôL�9ô Lô^)$ˆLô )$ôX5&ˆlô 5&ôpÐ'õ r   