Don't draw 0-width HLine
authorGé van Geldorp <ge@gse.nl>
Thu, 23 Jun 2005 17:54:22 +0000 (17:54 +0000)
committerGé van Geldorp <ge@gse.nl>
Thu, 23 Jun 2005 17:54:22 +0000 (17:54 +0000)
svn path=/trunk/; revision=16247

reactos/subsys/win32k/eng/lineto.c

index 0e7e953..671e253 100644 (file)
@@ -418,16 +418,18 @@ EngLineTo(SURFOBJ *DestObj,
          EnumMore = CLIPOBJ_bEnum(Clip, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
          for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top + Translate.y <= y1; i++)
            {
-             if (y1 < RectEnum.arcl[i].bottom + Translate.y &&
-                 RectEnum.arcl[i].left + Translate.x <= hx + deltax &&
-                 hx < RectEnum.arcl[i].right + Translate.x)
-               {
-                 DibFunctionsForBitmapFormat[OutputObj->iBitmapFormat].DIB_HLine(
+              if (y1 < RectEnum.arcl[i].bottom + Translate.y &&
+                  RectEnum.arcl[i].left + Translate.x <= hx + deltax &&
+                  hx < RectEnum.arcl[i].right + Translate.x &&
+                  max(hx, RectEnum.arcl[i].left + Translate.x) <
+                  min(hx + deltax, RectEnum.arcl[i].right + Translate.x))
+                {
+                  DibFunctionsForBitmapFormat[OutputObj->iBitmapFormat].DIB_HLine(
                                        OutputObj,
-                                      max(hx, RectEnum.arcl[i].left + Translate.x),
-                                      min(hx + deltax, RectEnum.arcl[i].right + Translate.x),
-                                      y1, Pixel);
-               }
+                                       max(hx, RectEnum.arcl[i].left + Translate.x),
+                                       min(hx + deltax, RectEnum.arcl[i].right + Translate.x),
+                                       y1, Pixel);
+                       }
            }
        }
       while (EnumMore);