
    ,h$                     ^    d Z ddlmZmZmZmZ ddlmZ ddlm	Z	 ddl
mZmZ  G d d	e      Zy
)z-DrawingML objects related to line formatting.    )absolute_importdivisionprint_functionunicode_literals   )MSO_FILL   )
FillFormat)Emulazypropertyc                        e Zd ZdZ fdZed        Zed        Zej                  d        Zed        Z
ed        Zej                  d        Zd	 Zed
        Z xZS )
LineFormatzProvides access to line properties such as color, style, and width.

    A LineFormat object is typically accessed via the ``.line`` property of
    a shape such as |Shape| or |Picture|.
    c                 8    t         t        |           || _        y N)superr   __init___parent)selfparent	__class__s     O/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pptx/dml/line.pyr   zLineFormat.__init__   s    j$(*    c                     | j                   j                  t        j                  k7  r| j                   j	                          | j                   j
                  S )a  
        The |ColorFormat| instance that provides access to the color settings
        for this line. Essentially a shortcut for ``line.fill.fore_color``.
        As a side-effect, accessing this property causes the line fill type
        to be set to ``MSO_FILL.SOLID``. If this sounds risky for your use
        case, use ``line.fill.type`` to non-destructively discover the
        existing fill type.
        )filltyper   SOLIDsolid
fore_colorr   s    r   colorzLineFormat.color   s6     99>>X^^+IIOOyy###r   c                 8    | j                   }|y|j                  S )ac  Return value indicating line style.

        Returns a member of :ref:`MsoLineDashStyle` indicating line style, or
        |None| if no explicit value has been set. When no explicit value has
        been set, the line dash style is inherited from the style hierarchy.

        Assigning |None| removes any existing explicitly-defined dash style.
        N)_lnprstDash_valr   lns     r   
dash_stylezLineFormat.dash_style%   s     XX:r   c                     |0| j                   }|y |j                          |j                          y | j                         }||_        y r   )r"   _remove_prstDash_remove_custDash_get_or_add_lnr#   )r   r&   r%   s      r   r&   zLineFormat.dash_style4   sI    Bz!!  "$r   c                 L    | j                         }t        j                  |      S )z|
        |FillFormat| instance for this line, providing access to fill
        properties such as foreground color.
        )r*   r
   from_fill_parentr$   s     r   r   zLineFormat.fill@   s#       "**2..r   c                 L    | j                   }|t        d      S |j                  S )a'  
        The width of the line expressed as an integer number of :ref:`English
        Metric Units <EMU>`. The returned value is an instance of |Length|,
        a value class having properties such as `.inches`, `.cm`, and `.pt`
        for converting the value into convenient units.
        r   )r"   r   wr$   s     r   widthzLineFormat.widthI   s$     XX:q6Mttr   c                 :    |d}| j                         }||_        y )Nr   )r*   r.   )r   emur%   s      r   r/   zLineFormat.widthV   s!    ;C  "r   c                 6    | j                   j                         S )zi
        Return the ``<a:ln>`` element containing the line format properties
        in the XML.
        )r   get_or_add_lnr   s    r   r*   zLineFormat._get_or_add_ln]   s    
 ||))++r   c                 .    | j                   j                  S r   )r   r%   r   s    r   r"   zLineFormat._lnd   s    ||r   )__name__
__module____qualname____doc__r   r   r    propertyr&   setterr   r/   r*   r"   __classcell__)r   s   @r   r   r      s     $ $   	% 	% / / 
 
 \\ ,  r   r   N)r8   
__future__r   r   r   r   enum.dmlr   r   r
   utilr   r   objectr    r   r   <module>rA      s'    4 R R   $Z Zr   