Tom's patch - hope I got it right this time

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-11-19 18:59:19 +00:00
parent cc160ba62b
commit 33879bb218

View File

@ -1441,22 +1441,11 @@ MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int h
unsigned int x, y;
SelectObject(*dc, image->bitmap);
if (image->depth == 1)
{
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
SetPixel(*dc, x, y, (pixels[*(data++)] ? RGB(255,255,255) : 0)); /* data is [x+y*width] */
}
}
}
else
{
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
SetPixel(*dc, x, y, pixels[*(data++)]); /* data is [x+y*width] */
}
}
}
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
SetPixel(*dc, x, y, pixels[*(data++)]); /* data is [x+y*width] */
}
}
}
#else
void MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int height,