summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-12-30 13:22:12 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-12-30 13:22:12 (GMT)
commitbb7a96e1cb79f95854115959f5209ef6c02b8797 (patch)
tree40a644b14b61eb4bc547a6270b3372ef0577be68 /generic/tkCanvas.c
parent4e81da6984774cee4b599265f08e08c1698e8887 (diff)
downloadtk-bb7a96e1cb79f95854115959f5209ef6c02b8797.zip
tk-bb7a96e1cb79f95854115959f5209ef6c02b8797.tar.gz
tk-bb7a96e1cb79f95854115959f5209ef6c02b8797.tar.bz2
Fix crash in canvPs-5.1 test (thanks to Christian Werner), and remove unnecessary #ifdef and an obsolete comment
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 53bfe00..14e9f20 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -2769,21 +2769,10 @@ DrawCanvas(
* colours and place them in the photo block. Perhaps we could
* just not bother with the alpha byte because we are using
* TK_PHOTO_COMPOSITE_SET later?
- * ***Windows: We have to swap the red and blue values. The
- * XImage storage is B - G - R - A which becomes a 32bit ARGB
- * quad. However the visual mask is a 32bit ABGR quad. And
- * Tk_PhotoPutBlock() wants R-G-B-A which is a 32bit ABGR quad.
- * If the visual mask was correct there would be no need to
- * swap anything here.
*/
-#if defined(NO_WINRGBFIX) && defined(_WIN32)
-#define R_OFFSET 2
-#define B_OFFSET 0
-#else
#define R_OFFSET 0
#define B_OFFSET 2
-#endif
blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x + R_OFFSET] =
(unsigned char)((pixel & visualPtr->red_mask) >> rshift);
blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x +1] =