3
$ßL]©  ã               @   s’   d dl Zd dlmZ d dlZd dlZd dlZd dlZd dl	Z	d dl
jZd dlmZ d dlZd dlmZmZmZ e	jjdƒedgd�dd	„ ƒƒZdS )
é    N)ÚBytesIO)Úcheck_figures_equal)ÚcollectionsÚpatchesÚpathZcairoZpng)Ú
extensionsc          	   C   s
  t jjdƒ}t jjƒ }tj|j|jddd… gƒ}tj|j|jgƒ}t j||ƒ}t j|d |ƒ}|jƒ }|j	ddgƒ |j
ddgƒ tj|ddddd
�}	|j|	ƒ tj|ddddd
�}	|j|	ƒ | jƒ }|j	ddgƒ |j
ddgƒ tj||gddddd�}
|j|
ƒ dS )z†
    Test checks that the patch and collection are rendered with the specified
    alpha values in their facecolor and edgecolor.
    é   Né   é   é   Zdashdotr   ç      à?ç      è?)Ú	linewidthZ	linestyleÚ	facecolorÚ	edgecolor)r   Z
linestylesr   r   éÿÿÿÿr   r   )r	   r   r   r   )r   r   r	   r   )r	   r   r   r   )r   r   r	   r   r   r   )r	   r   r   r   )r   r   r	   r   )ÚmpathÚPathZunit_regular_starZunit_circleÚnpZconcatenateZverticesÚcodesZsubplotsZset_xlimZset_ylimÚmpatchesZ	PathPatchZ	add_patchÚmcollectionsZPathCollectionZadd_collection)Zfig_testZfig_refZstarZcircleZvertsr   Z	cut_star1Z	cut_star2ZaxÚpatchÚcol© r   úK/tmp/pip-install-edjban26/matplotlib/matplotlib/tests/test_backend_cairo.pyÚtest_patch_alpha_coloring   s6    



r   )Znumpyr   Úior   ÚosÚtempfileÚwarningsÚxml.parsers.expatÚxmlZpytestZmatplotlib.pyplotZpyplotZpltZmatplotlib.testing.decoratorsr   Z
matplotlibr   r   r   r   r   r   ÚmarkÚbackendr   r   r   r   r   Ú<module>   s   

