403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/__pycache__/patheffects.cpython-312.pyc
�

G8�cI��6�dZddlmZddlmZddlmZddlmZ	ddl
mZddlZ
Gd�d	�ZGd
�de�ZGd�d
e�Zd�ZGd�de�Zee��ZGd�de�Zee��ZGd�de�ZGd�de�ZGd�de�Zee��Zy)z�
Defines classes for path effects. The path effects are supported in `.Text`,
`.Line2D` and `.Patch`.

.. seealso::
   :doc:`/tutorials/advanced/patheffects_guide`
�)�RendererBase)�colors)�patches)�
transforms)�PathNc�,�eZdZdZdd�Zd�Zd�Zdd�Zy)	�AbstractPathEffectz�
    A base class for path effects.

    Subclasses should override the ``draw_path`` method to add effect
    functionality.
    c��||_y)z�
        Parameters
        ----------
        offset : (float, float), default: (0, 0)
            The (x, y) offset to apply to the path, measured in points.
        N)�_offset)�self�offsets  �8/usr/lib/python3/dist-packages/matplotlib/patheffects.py�__init__zAbstractPathEffect.__init__s�����c��tj�jt|j|j
��S)z(Apply the offset to the given transform.)�mtransforms�Affine2D�	translate�map�points_to_pixelsr)r�renderers  r�_offset_transformz$AbstractPathEffect._offset_transform"s4��/�{�#�#�%�/�/�
��*�*�D�L�L�
9�;�	;rc��|j�}|jdd�}|r|jdi|��|j�D]B\}}t	|d|zd�}t|�st
dj|���||��D|S)z�
        Update the given GraphicsContext with the given dict of properties.

        The keys in the dictionary are used to identify the appropriate
        ``set_`` method on the *gc*.
        �dashesN�set_zUnknown property {0}�)�copy�pop�
set_dashes�items�getattr�callable�AttributeError�format)r�gc�new_gc_dictr�k�v�
set_methods       r�
_update_gczAbstractPathEffect._update_gc's���"�&�&�(������4�0����B�M�M�#�F�#��%�%�'�	�D�A�q� ��V�a�Z��6�J��J�'�$�%;�%B�%B�1�%E�F�F��q�M�		�
�	rNc�b�t|t�r|j}|j||||�S)z�
        Derived should override this method. The arguments are the same
        as :meth:`matplotlib.backend_bases.RendererBase.draw_path`
        except the first argument is a renderer.
        )�
isinstance�PathEffectRenderer�	_renderer�	draw_path)rrr%�tpath�affine�rgbFaces      rr/zAbstractPathEffect.draw_path;s1���h� 2�3��)�)�H��!�!�"�e�V�W�=�=r))�r3�N)�__name__�
__module__�__qualname__�__doc__rrr*r/rrrr	r	s����;�
�(	>rr	c�L��eZdZdZd�Zd�Zd	d�Z�fd�Z�fd�Zd�Z	d�Z
�xZS)
r-aw
    Implements a Renderer which contains another renderer.

    This proxy then intercepts draw calls, calling the appropriate
    :class:`AbstractPathEffect` draw method.

    .. note::
        Not all methods have been overridden on this RendererBase subclass.
        It may be necessary to add further methods to extend the PathEffects
        capabilities further.
    c� �||_||_y)z�
        Parameters
        ----------
        path_effects : iterable of :class:`AbstractPathEffect`
            The path effects which this renderer represents.
        renderer : `matplotlib.backend_bases.RendererBase` subclass

        N)�
_path_effectsr.)r�path_effectsrs   rrzPathEffectRenderer.__init__Ts��*���!��rc�:�|j||j�Sr4)�	__class__r.)rr<s  r�copy_with_path_effectz(PathEffectRenderer.copy_with_path_effect`s���~�~�l�D�N�N�;�;rc�d�|jD]!}|j|j||||��#yr4)r;r/r.)rr%r0r1r2�path_effects      rr/zPathEffectRenderer.draw_pathcs4���-�-�	+�K��!�!�$�.�.�"�e�V�")�
+�	+rc����t|j�dk(rt�	|�||||g|��i|��S|jD]-}|j	|g�}|j||||g|��i|���/y�N�)�lenr;�super�draw_markersr?)
rr%�marker_path�marker_trans�path�args�kwargsrArr>s
         �rrGzPathEffectRenderer.draw_markershs����
�t�!�!�"�a�'��7�'��K��t�9�)-�9�17�9�
9� �-�-�	3�K��1�1�;�-�@�H�
"�H�!�!�"�k�<��
3�#'�
3�+1�
3�		3rc����t|j�dk(rt�|�|||g|��i|��S|jD],}|j	|g�}|j|||g|��i|���.yrC)rEr;rF�draw_path_collectionr?)	rr%�master_transform�pathsrKrLrArr>s	        �rrNz'PathEffectRenderer.draw_path_collectionzs����
�t�!�!�"�a�'��7�/��4D�e�A�15�A�9?�A�
A� �-�-�	;�K��1�1�;�-�@�H�
*�H�)�)�"�.>��
;�+/�
;�39�
;�		;rc��|j||||||�\}}	|j�}
|jd�|j|||	|
��y)Nr3)r2)�_get_text_path_transform�get_rgb�
set_linewidthr/)rr%�x�y�s�prop�angle�ismathrJ�	transform�colors           r�_draw_text_as_pathz%PathEffectRenderer._draw_text_as_path�sQ���7�7��1�a��8=�v�G���i��
�
���
��������r�4��E��:rc�b�|dvrt|j|�Stj||�S)N)�flipy�get_canvas_width_height�new_gcr�
_text2path�height�width)r!r.�object�__getattribute__)r�names  rrfz#PathEffectRenderer.__getattribute__�s5���I�I��4�>�>�4�0�0��*�*�4��6�6rr4)r5r6r7r8rr?r/rGrNr]rf�
__classcell__�r>s@rr-r-Gs+���
�
"�<�+�
3�$;�$;�7rr-c��eZdZdZy)�Normalz�
    The "identity" PathEffect.

    The Normal PathEffect's sole purpose is to draw the original artist with
    no special path effect.
    N)r5r6r7r8rrrrkrk�s��rrkc��Gd�d|�}d|j��|_d|j��|_d|j�d|j�d|j�d�|_|jj|j_|S)zO
    Create a PathEffect class combining *effect_class* and a normal draw.
    c���eZdZ�fd�Z�xZS)�)_subclass_with_normal.<locals>.withEffectc�T��t�|�|||||�|j||||�yr4)rFr/)rrr%r0r1r2r>s      �rr/z3_subclass_with_normal.<locals>.withEffect.draw_path�s,����G��h��E�6�7�C����r�5�&�'�:r)r5r6r7r/rhris@r�
withEffectrn�s
���	;�	;rrp�withz*
    A shortcut PathEffect for applying `.z�` and then
    drawing the original Artist.

    With this class you can use ::

        artist.set_path_effects([path_effects.withzN()])

    as a shortcut for ::

        artist.set_path_effects([path_effects.zA(),
                                 path_effects.Normal()])
    )r5r7r8r/)�effect_classrps  r�_subclass_with_normalrs�s���
;�\�;�
!��!6�!6� 7�8�J�� $�\�%:�%:�$;�<�J��*�*6�*?�*?�)@�A3�
4@�3H�3H�2I�J/�0<�/D�/D�.E�F��J��$0�#9�#9�#A�#A�J��� ��rc�*��eZdZdZd�fd�	Zd�Z�xZS)�Strokez0A line based PathEffect which re-draws a stroke.c�2��t�|�|�||_y)z�
        The path will be stroked with its gc updated with the given
        keyword arguments, i.e., the keyword arguments should be valid
        gc parameter values.
        N)rFr�_gc�rr
rLr>s   �rrzStroke.__init__�s���	���� ���rc���|j�}|j|�|j||j�}|j	||||j|�z|�|j
�y)�Draw the path with updated gc.N)ra�copy_propertiesr*rwr/r�restore)rrr%r0r1r2�gc0s       rr/zStroke.draw_path�sa���o�o������B���o�o�c�4�8�8�,���������!7�!7��!A�A�7�	L����
r��rr�r5r6r7r8rr/rhris@rruru�s���:��rru)rrc�0��eZdZdZ			d�fd�	Zd�Z�xZS)�SimplePatchShadowz#A simple shadow via a filled patch.c���t�|�|�|�||_ntj|�|_|�d}||_||_||_y)aG
        Parameters
        ----------
        offset : (float, float), default: (2, -2)
            The (x, y) offset of the shadow in points.
        shadow_rgbFace : color
            The shadow color.
        alpha : float, default: 0.3
            The alpha transparency of the created shadow patch.
        rho : float, default: 0.3
            A scale factor to apply to the rgbFace color if *shadow_rgbFace*
            is not specified.
        **kwargs
            Extra keywords are stored and passed through to
            :meth:`AbstractPathEffect._update_gc`.

        N�333333�?)rFr�_shadow_rgbFace�mcolors�to_rgba�_alpha�_rhorw)rr
�shadow_rgbFace�alpha�rhorLr>s      �rrzSimplePatchShadow.__init__�sR���(	���� ��!�#1�D� �#*�?�?�>�#B�D� ��=��E������	���rc��|j�}|j|�|j�:|xsddd\}}}	||jz||jz|	|jzf}
n|j}
|j	d�|j|j�|jd�|j||j�}|j||||j|�z|
�|j�y)�
        Overrides the standard draw_path to add the shadow offset and
        necessary color changes for the shadow.
        N���?r�r���noner)
rar{r�r��set_foreground�	set_alphar�rTr*rwr/rr|�rrr%r0r1r2r}�r�g�br�s           rr/zSimplePatchShadow.draw_paths���
�o�o������B�����'��.�,���3�G�A�q�!��$�)�)�m�Q����]�A��	�	�M�J�N�!�1�1�N����6�"��
�
�d�k�k�"����!���o�o�c�4�8�8�,���������!7�!7��!A�A��	�	���
r)�����NNr�r�ris@rr�r��s���-�%�,0��"�Hrr�c�.��eZdZdZ		d�fd�	Zd�Z�xZS)�SimpleLineShadowzA simple shadow via a line.c���t�|�|�|�||_ntj|�|_||_||_||_y)a�
        Parameters
        ----------
        offset : (float, float), default: (2, -2)
            The (x, y) offset to apply to the path, in points.
        shadow_color : color, default: 'black'
            The shadow color.
            A value of ``None`` takes the original artist's color
            with a scale factor of *rho*.
        alpha : float, default: 0.3
            The alpha transparency of the created shadow patch.
        rho : float, default: 0.3
            A scale factor to apply to the rgbFace color if *shadow_color*
            is ``None``.
        **kwargs
            Extra keywords are stored and passed through to
            :meth:`AbstractPathEffect._update_gc`.
        N)rFr�
_shadow_colorr�r�r�r�rw)rr
�shadow_colorr�r�rLr>s      �rrzSimpleLineShadow.__init__#sF���(	���� ���!-�D��!(����!>�D�������	���rc��|j�}|j|�|j�H|j�xsddd\}}}	||jz||jz|	|jzf}
n|j}
|j|
�|j
|j�|j||j�}|j||||j|�z�|j�y)r�Nr�r�)
rar{r��get_foregroundr�r�r�r�r*rwr/rr|r�s           rr/zSimpleLineShadow.draw_pathAs���
�o�o������B�����%��)�)�+�;�|�R�a�@�G�A�q�!��$�)�)�m�Q����]�A��	�	�M�J�N�!�/�/�N����>�*��
�
�d�k�k�"��o�o�c�4�8�8�,���������!7�!7��!A�A�	C����
r)r�r'r�r�r�ris@rr�r� s���%�%�25��<rr�c�*��eZdZdZd�fd�	Zd�Z�xZS)�PathPatchEffectza
    Draws a `.PathPatch` instance whose Path comes from the original
    PathEffect artist.
    c�\��t�|�|��tjgfi|��|_y)a�
        Parameters
        ----------
        offset : (float, float), default: (0, 0)
            The (x, y) offset to apply to the path, in points.
        **kwargs
            All keyword arguments are passed through to the
            :class:`~matplotlib.patches.PathPatch` constructor. The
            properties which cannot be overridden are "path", "clip_box"
            "transform" and "clip_path".
        )r
N)rFr�mpatches�	PathPatch�patchrxs   �rrzPathPatchEffect.__init___s,���	�����'��'�'��5�f�5��
rc�^�||j_|jj||j|�z�|jj	|j��|j
�}|r|jj|�|jj|�yr4)	r��_path�
set_transformr�set_clip_box�get_clip_rectangle�
get_clip_path�
set_clip_path�draw)rrr%r0r1r2�	clip_paths       rr/zPathPatchEffect.draw_pathns��� ��
�
���
�
� � ��$�*@�*@��*J�!J�K��
�
���� 5� 5� 7�8��$�$�&�	��$�D�J�J�$�$�i�0��
�
����!rr~r�ris@rr�r�Ys����

6�"rr�c�R��eZdZdZdddej
d�f�fd�	Zd�Z�xZS)�TickedStrokea�
    A line-based PathEffect which draws a path with a ticked style.

    This line style is frequently used to represent constraints in
    optimization.  The ticks may be used to indicate that one side
    of the line is invalid or to represent a closed boundary of a
    domain (i.e. a wall or the edge of a pipe).

    The spacing, length, and angle of ticks can be controlled.

    This line style is sometimes referred to as a hatched line.

    See also the :doc:`contour demo example
    </gallery/lines_bars_and_markers/lines_with_ticks_demo>`.

    See also the :doc:`contours in optimization example
    </gallery/images_contours_and_fields/contours_in_optimization_demo>`.
    rg$@g�F@r�c�\��t�|�|�||_||_||_||_y)a�
        Parameters
        ----------
        offset : (float, float), default: (0, 0)
            The (x, y) offset to apply to the path, in points.
        spacing : float, default: 10.0
            The spacing between ticks in points.
        angle : float, default: 45.0
            The angle between the path and the tick in degrees.  The angle
            is measured as if you were an ant walking along the curve, with
            zero degrees pointing directly ahead, 90 to your left, -90
            to your right, and 180 behind you.
        length : float, default: 1.414
            The length of the tick relative to spacing.
            Recommended length = 1.414 (sqrt(2)) when angle=45, length=1.0
            when angle=90 and length=2.0 when angle=60.
        **kwargs
            Extra keywords are stored and passed through to
            :meth:`AbstractPathEffect._update_gc`.

        Examples
        --------
        See :doc:`/gallery/misc/tickedstroke_demo`.
        N)rFr�_spacing�_angle�_lengthrw)rr
�spacingrY�lengthrLr>s      �rrzTickedStroke.__init__�s.���6	���� ���
���������rc��|j�}|j|�|j||j�}||j	|�z}tj|j�}tjtj|�tj|�gtj|�tj|�gg�}	|j|j�}
|j|�}|jd��}|D�]�}
|
dd�df}|
dd�df}|jdkr�&tj |dd|ddz
|dd|ddz
�}tj"dgtj$|�f�}|d}t'tj(||
z��dz
}tj*|
dz||
dzz
|�}tj,|||�}tj,|||�}|jd	z}tj,||z||�|z
|z}tj,||z||�|z
|z}tj ||�}|dk(}d
||<tj||z||zg�j.}tjddg�j.||<tj0||	�|j2z|
z}||dd�dfz}||dd�dfz}tj4d|zdf|j6��} || ddd�df<|| ddd�df<|| ddd�df<|| ddd�df<tj8t:j<t:j>g|�}!t;| |!�}"|jA||"|jC�|z|����|jE�y)rzF)�closed_onlyNrrDr����r3g����MbP?r�)�dtype)#rar{r*rwr�np�radiansr��array�cos�sinrr��transform_path�to_polygons�size�hypot�concatenate�cumsum�int�ceil�linspace�interp�T�dotr��emptyr��tiler�MOVETO�LINETOr/�invertedr|)#rrr%r0r1r2r}�trans�theta�trans_matrix�
spacing_px�	transpath�polys�prUrV�dsrW�s_total�num�s_tick�x_tick�y_tick�delta_s�ur(�n�mask�uv�dxy�x_end�y_end�xyt�codes�hs#                                   rr/zTickedStroke.draw_path�s����o�o������B���o�o�c�4�8�8�,����/�/��9�9�����D�K�K�(�(���x�x�"�&�&��-�"�&�&��-��!@�"$�&�&��-������!?�!A�B���.�.�t�}�}�=�
��)�)�%�0�	��%�%�%�%�8���9	K�A��!�Q�$��A��!�Q�$��A��v�v��z�����!�A�B�%�!�C�R�&�.�!�A�B�%�!�C�R�&�.�9�B������r�y�y��}�5�6�A���e�G��b�g�g�g�
�2�3�4�q�8�C��[�[��A��w��A��/E�s�K�F��Y�Y�v�q�!�,�F��Y�Y�v�q�!�,�F��m�m�d�*�G����6�G�+�Q��2�V�;�w�F�A����6�G�+�Q��2�V�;�w�F�A�����A��A���6�D��A�d�G����1�q�5�!�a�%�.�)�+�+�B��x�x��A��'�)�)�B�t�H��&�&��\�*�T�\�\�9�J�F�C��S��A��Y�&�E��S��A��Y�&�E��(�(�A��G�Q�<�v�|�|�<�C�!�C���1��a��L� �C���1��a��L�!�C���1��a��L� �C���1��a��L��G�G�T�[�[�$�+�+�6��<�E��S�%� �A����s�A�v���'8�5�'@�'�J�s9	K�v	���
r)	r5r6r7r8r��sqrtrr/rhris@rr�r�xs*����&%��T�'�"�'�'�!�*� �DSrr�)r8�matplotlib.backend_basesr�
matplotlibrr�rr�rr�matplotlib.pathr�numpyr�r	r-rkrsru�
withStroker��withSimplePatchShadowr�r�r��withTickedStrokerrr�<module>r�s����2�(�*�0� ��3>�3>�lR7��R7�j�
���<�
��,#��
7�
�>�*�>�B.�;L�M��6�)�6�r"�(�"�>I�%�I�X)�l�C�r

Youez - 2016 - github.com/yon3zu
LinuXploit