2003/10/29 03:48:14
[org.ibex.core.git] / src / org / xwt / plat / X11.cc
index 5147ffb..ca45618 100644 (file)
@@ -111,14 +111,13 @@ void org::xwt::plat::X11$X11PixelBuffer::slowDrawPicture(org::xwt::Picture* s,
         char* current_pixel = (xi->data + y * xi->bytes_per_line) +
             (shared_pixmap ? cx1 * (xi->bits_per_pixel / 8) : - 1 * cy1 * xi->bytes_per_line);
         
-        for(int x=cx1; x < cx1; x++, current_pixel += xi->bits_per_pixel / 8) {
+        for(int x=cx1; x < cx2; x++, current_pixel += xi->bits_per_pixel / 8) {
             int source_x = x - dx;
             int source_y = y - dy;
 
+            // FEATURE: be smarter here; can we do something better for the alphaonly case?
             int sourcepixel = sourcedata[source_x + source_y * source->getWidth()];
             int alpha = (sourcepixel & 0xFF000000) >> 24;
-
-            // FEATURE: be smarter here; can we do something better for the alphaonly case?
             if (alphaOnly) sourcepixel = rgb;
             int source_red = (sourcepixel & 0x00FF0000) >> 16;
             int source_green = (sourcepixel & 0x0000FF00) >> 8;