
    cc                     6    d dl Z d dlZddlmZ  G d de      Zy)    N   )AbstractBrushc                       e Zd Zd Zd Zd Zy)BrushAirbrushc                 f    t        d      dz   }|r|t        d      z  }|gS |t        d      z  }|gS )NAirbrushz - z&Density depends on the stylus pressurez"Density depends on the mouse speed)_)selfuse_pressurebrush_directionlabels       8/usr/lib/python3/dist-packages/drawing/brush_airbrush.py	_get_tipszBrushAirbrush._get_tips	   sE    
J-%
%A6775 . 	A2335
.    c                 &   |j                  |d           |j                  |d     |j                  d       t        j                  d       t        |d   dz        }d}|d   D ]  }|d   t        d
|d   z        }t        |      D ]  }|j                          |d   t        j                  d|z  |      z   }|d   t        j                  d|z  |      z   }|j                  ||       |j                  dd       |j                            y	)zeAirbrush whose radius is the line width. The density of droplets is
		related to the stylus pressure.operatorrgbar   
line_width      pathpN(   xy)set_operatorset_source_rgbaset_line_widthrandomseedintrangenew_pathrandintmove_torel_line_tostroke)	r
   cairo_context	operation
half_widthdropletsptir   r   s	            r   do_brush_operationz BrushAirbrush.do_brush_operation   s    Yz23-6!23 q!++a.9\*Q./*(f 	bg23< H(O q
3&..j*==A
3&..j*==A!Qa#	r   N)__name__
__module____qualname____gtype_name__r   r/    r   r   r   r      s    !r   r   )cairor    abstract_brushr   r   r4   r   r   <module>r7      s     )%M %r   