Tk Source Code

View Ticket
Login
Ticket UUID: 480862
Title: UNIX Ignores Bitmap Changes
Type: Bug Version: obsolete: 8.4a4
Submitter: dkf Created on: 2001-11-12 11:09:46
Subsystem: 40. Bitmap Images Assigned To: dkf
Priority: 7 High Severity:
Status: Closed Last Modified: 2006-02-27 18:14:39
Resolution: Fixed Closed By: dkf
    Closed on: 2006-02-27 11:14:39
Description:
If I create a bitmap image with some image data,
display it, and then reconfigure it to have some
different data (see the example code below) then this
change in the data is not displayed *on UNIX/X only*.
This works correctly on Windows (though it is slow as
the size of the bitmap increases...)

set e {#define empty_width 4
#define empty_height 4
static char empty_bits[] = {
   0x00, 0x00, 0x00, 0x00};}
set f {#define full_width 4
#define full_height 4
static char full_bits[] = {
   0x0f, 0x0f, 0x0f, 0x0f};}
image create bitmap b -data $e
pack [label .l -image b]
after 3000 {b configure -data $f}

I originally noticed the problem using the script
http://www.cs.man.ac.uk/~fellowsd/tcl/bitsandpieces/bitmap.tcl
(recombine URL?)
User Comments: dkf added on 2006-02-27 18:14:39:
Logged In: YES 
user_id=79902

Issue was caused by deleting the foreground pixmap before
creating the new one in ImgBmapConfigureInstance; there was
a comment about being careful with the mask, but the same
care was also needed for the main bitmap data too!