
    Mi                        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      m/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/pptx/shapes/picture.pyr   _BasePicture.__init__   s    lD*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        yy"""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        yy"""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    
 yy&&((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                  $ )zThe `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     yy||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)Movieb   zA 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     DIIt,,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     ))TYY%7%7C;##C((r   c                "    [         R                  $ )zReturn 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*    $ 99>>**}}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"yy~~==!!#))+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;     ))TYY%7%7C;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      zProvides 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   