X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f22033e52061bdc9d5528e4485f67283f579842c..4e5a4c69c540b430fba8efe5dae1bc1ffd5caeca:/src/x11/bitmap.cpp diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index 07dad230d6..31fd1858f0 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -150,11 +150,13 @@ bool wxMask::Create( const wxBitmap& bitmap, XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) ); - for (int j = 0; j < image.GetHeight(); j++) + int width = image.GetWidth(); + int height = image.GetHeight(); + for (int j = 0; j < height; j++) { int start_x = -1; int i; - for (i = 0; i < image.GetWidth(); i++) + for (i = 0; i < width; i++) { if ((data[index] == red) && (data[index+1] == green) && @@ -906,10 +908,12 @@ wxImage wxBitmap::ConvertToImage() const // GdkColormap *cmap = gtk_widget_get_default_colormap(); + int width = GetWidth(); + int height = GetHeight(); long pos = 0; - for (int j = 0; j < GetHeight(); j++) + for (int j = 0; j < height; j++) { - for (int i = 0; i < GetWidth(); i++) + for (int i = 0; i < width; i++) { unsigned long pixel = XGetPixel( x_image, i, j ); if (bpp == 1) @@ -1410,6 +1414,7 @@ int GrGetPixelColor(GR_SCREEN_INFO* sinfo, GR_PALETTE* palette, GR_PIXELVAL pixe return 1; } #endif + #endif // wxUSE_NANOX