
    hi                    Z    d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	  G d de
          ZdS )	z-DrawingML objects related to line formatting.    )annotations)
FillFormat)MSO_FILL)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                d    t          t          |                                            || _        d S N)superr	   __init___parent)selfparent	__class__s     e/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/pptx/dml/line.pyr   zLineFormat.__init__   s*    j$((***    c                    | j         j        t          j        k    r| 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   s2     9>X^++IOOy##r   c                &    | j         }|dS |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     X:4r   c                    |5| j         }|d S |                                 |                                 d S |                                 }||_        d S r   )r   _remove_prstDash_remove_custDash_get_or_add_lnr   )r   r!   r    s      r   r!   zLineFormat.dash_style2   s^    Bz!!!!!!F  ""$r   c                R    |                                  }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                @    | 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.
        Nr   )r   r   wr   s     r   widthzLineFormat.widthG   s"     X:q66Mtr   c                D    |d}|                                  }||_        d S )Nr   )r%   r)   )r   emur    s      r   r*   zLineFormat.widthT   s(    ;C  ""r   c                4    | 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._lnb   s    |r   )__name__
__module____qualname____doc__r   r   r   propertyr!   setterr   r*   r%   r   __classcell__)r   s   @r   r	   r	   
   s             $ $ \$   X 	% 	% 	% / / \/ 
 
 X
 \  \, , ,   X    r   r	   N)r3   
__future__r   pptx.dml.fillr   pptx.enum.dmlr   	pptx.utilr   r   objectr	    r   r   <module>r=      s    3 3 " " " " " " $ $ $ $ $ $ " " " " " " ' ' ' ' ' ' ' 'Z Z Z Z Z Z Z Z Z Zr   