[LAUN Wolfgang <[email protected]>] FW: [PATCH] bug in Tk::Canvas: disabled bitmap broken
Slaven Rezic <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
This is a bug report and patch by Wolfgang Laun. It appears that
Tcl/Tk has the same problem with create bitmap, so I made an entry in
the bug database:
http://sourceforge.net/tracker/index.php?func=detail&aid=1086917&group_id=12997&atid=112997
Regards,
Slaven
-----Original Message-----
From: LAUN Wolfgang
Sent: Wednesday, December 15, 2004 7:52 AM
To: '[email protected]'
Cc: '[email protected]'
Subject: [PATCH] bug in Tk::Canvas: disabled bitmap broken
Using $canvas->createBitmap(..., -state => 'disabled')
results in a segmentation fault: The graphics context
isn't initialized when the if condition is true due to
the first subexpression. The patch below (against the
latest Perl/Tk; the file being in some other place in
older versions) appears to fix this.
Possibly this ought to go into the original Tk code
as well - how should this info be passed on?
There is another issue in connection with bitmaps on
a canvas: Using bitmaps of differing x-y-dimensions
for regular and active or disabled bitmaps results
in an incorrect display of a non-regular bitmap.
I know why this happens but haven't had the time yet
to concoct the (not quite trivial) fix, but I'll look
after that ASAP.
Kind regards
Wolfgang
PS.: Please CC me in any answers - I'm not a subscriber.
--- pTk/tkCanvBmap.c.old Wed Nov 24 11:13:10 2004
+++ pTk/tkCanvBmap.c Wed Dec 15 07:03:17 2004
@@ -382,7 +382,7 @@
}
}
- if (state==TK_STATE_DISABLED || bitmap == None) {
+ if (bitmap == None) {
ComputeBitmapBbox(canvas, bmapPtr);
return TCL_OK;
}
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]