
    iG                        d Z ddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZmZ d Zej                  j                  ej                  j!                  e            d   Zej                  j'                  ed      Zd Zedk(  r e        yy)a   pygame.examples.blend_fill

BLEND_ing colors in different ways with Surface.fill().

Keyboard Controls:

* Press R, G, B to increase the color channel values,
* 1-9 to set the step range for the increment,
* A - ADD, S- SUB, M- MULT, - MIN, + MAX to change the blend modes

    N)	K_1K_2K_3K_4K_5K_6K_7K_8K_9c                  \    t        d       t        d       t        d       t        d       y )Nz3Press R, G, B to increase the color channel values,z,1-9 to set the step range for the increment,z&A - ADD, S- SUB, M- MULT, - MIN, + MAXz  to change the blend modes)print     d/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/pygame/examples/blend_fill.pyusager      s&    	
?@	
89	
23	
'(r   datac                  <	   g d} d}d}d}t        j                          t         j                  j                  ddd      }|j	                  d       t         j
                  j                  t        j                  j                  t        d            j                         }t         j
                  j                  t        j                  j                  t        d            j                         }|j                  |d	       |j                  |d
       t         j                  j                          t         j                  j                  dd       t!                d}|r)t         j"                  j%                         D ]  }|j&                  t         j(                  k(  rd}|j&                  t         j*                  k(  rt!                |j                  t         j,                  k(  rd}|j                  t         j.                  k(  r| dxx   |z  cc<   | d   dkD  rd| d<   d}n|j                  t         j0                  k(  r| dxx   |z  cc<   | d   dkD  rd| d<   d}n||j                  t         j2                  k(  r| dxx   |z  cc<   | d   dkD  rd| d<   d}nA|j                  t         j4                  k(  rt         j6                  }d}n|j                  t         j8                  k(  rt         j:                  }d}n|j                  t         j<                  k(  rt         j>                  }d}n|j                  t         j@                  k(  rt         jB                  }d}n|j                  t         jD                  k(  rt         jF                  }d}nP|j                  tH        tJ        tL        tN        tP        tR        tT        tV        tX        f	v rt[        |j\                        }|s`|j	                  d       |j                  |d	       |j                  |d       |j	                  | d |       |j                  |d
       t_        dta        |        d|jc                  d      g        d}t         j                  j                           |r)t        jd                          y )N)r   r   r   Fr      )i  i      )d   r   r   z
liquid.bmp)
   r   )   r   i     T         )r   r   zColor: z, Pixel (0,0): )3pginitdisplayset_modefillimageloadospathjoindata_dirconvertblitflipkey
set_repeatr   eventgettypeQUITKEYDOWNK_ESCAPEK_rK_gK_bK_a	BLEND_ADDK_s	BLEND_SUBK_m
BLEND_MULTK_PLUS	BLEND_MAXK_MINUS	BLEND_MINr   r   r   r   r   r   r	   r
   r   intunicoder   tupleget_atquit)	colorchanged	blendtypestepscreenr"   
blendimagegoingr-   s	            r   mainrL      s=   EGIDGGIZZ  Q3F
KK HHMM"'',,x>?GGIErww||HlCDLLNJ
KKx 
KK
I&JJOOFFc2	GE
XX\\^ :	"EzzRWW$zzRZZ'99+!E99&!H$HQx#~#$a"GYY"&&(!H$HQx#~#$a"GYY"&&(!H$HQx#~#$a"GYY"&&( "I"GYY"&&( "I"GYY"&&( "I"GYY"))+ "I"GYY"**, "I"GYY3S#sCc3"OOu}}-DO,E8,v.tY7J	2eEl^?J<M<Mf<U;V:WX  

!u:	" z GGIr   __main__)__doc__r$   pygamer   r   r   r   r   r   r   r	   r
   r   r   r%   splitabspath__file__main_dirr&   r'   rL   __name__r   r   r   <module>rU      su   
 
  > > >) 77==23A677<<&)Qh zF r   