OwlCyberSecurity - MANAGER
Edit File: patheffects.cpython-38.pyc
U ��]�5 � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd� de �ZG dd � d e�ZG d d� de�Z G dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )z� Defines classes for path effects. The path effects are supported in :class:`~matplotlib.text.Text`, :class:`~matplotlib.lines.Line2D` and :class:`~matplotlib.patches.Patch`. � )�RendererBase)�colors)�patches)� transformsc @ s4 e Zd ZdZddd�Zdd� Zdd� Zd d d�Zd S )�AbstractPathEffectz� A base class for path effects. Subclasses should override the ``draw_path`` method to add effect functionality. �� r c C s || _ t�� | _dS )z� Parameters ---------- offset : pair of floats The offset to apply to the path, measured in points. N)�_offset�mtransformsZAffine2D� _offset_trans)�self�offset� r �8/usr/lib/python3/dist-packages/matplotlib/patheffects.py�__init__ s zAbstractPathEffect.__init__c C s6 |� | jd �}|� | jd �}|| j�� �||� S )z(Apply the offset to the given transform.r � )�points_to_pixelsr r �clear� translate)r �renderer� transformZoffset_xZoffset_yr r r �_offset_transform s �z$AbstractPathEffect._offset_transformc C sh |� � }|�dd�}|r$|jf |� |�� D ]6\}}t|d| d�}t|�sZtd�|���||� q,|S )z� Update the given GraphicsCollection with the given dictionary of properties. The keys in the dictionary are used to identify the appropriate set_ method on the gc. �dashesNZset_zUnknown property {0})�copy�popZ set_dashes�items�getattr�callable�AttributeError�format)r �gcZnew_gc_dictr �k�vZ set_methodr r r � _update_gc&