Changeset 366

Show
Ignore:
Timestamp:
09/10/07 16:15:30 (1 year ago)
Author:
bjourne
Message:

Make the second argument to ImageView.set_transp() default to
0x00000000 and add a test for it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pygtkimageview/src/gtkimageview.defs

    r365 r366  
    353353  (parameters 
    354354    '("GtkImageTransp" "transp") 
    355     '("int" "transp_color"
     355    '("int" "transp_color" (default 0x00000000)
    356356  ) 
    357357) 
  • pygtkimageview/tests/test_module.py

    r365 r366  
    194194    assert rect.x == 100 and rect.y == 100 
    195195     
     196def test_set_transp(): 
     197    ''' 
     198    Ensure that setting the views transparency settings works as 
     199    expected. 
     200    ''' 
     201    view = gtkimageview.ImageView() 
     202    view.set_transp(gtkimageview.TRANSP_COLOR, transp_color = 0xff0000) 
     203    col1, col2 = view.get_check_colors() 
     204    assert col1 == col2 == 0xff0000 
     205     
     206    view.set_transp(gtkimageview.TRANSP_GRID) 
     207     
     208