- BOOLEAN ret;
- SURFGDI *SurfGDI;
- LONG x, y, d, deltax, deltay, i, length, xchange, ychange, error, hx, vy;
-
- // These functions are assigned if we're working with a DIB
- // The assigned functions depend on the bitsPerPixel of the DIB
- PFN_DIB_PutPixel DIB_PutPixel;
- PFN_DIB_HLine DIB_HLine;
- PFN_DIB_VLine DIB_VLine;
-
- SurfGDI = (SURFGDI*)AccessInternalObjectFromUserObject(Surface);
-
- MouseSafetyOnDrawStart(Surface, SurfGDI, x1, y1, x2, y2);
-
- if(Surface->iType!=STYPE_BITMAP)
- {
- // Call the driver's DrvLineTo
- ret = SurfGDI->LineTo(Surface, Clip, Brush, x1, y1, x2, y2, RectBounds, mix);
- MouseSafetyOnDrawEnd(Surface, SurfGDI);
- return ret;
- }
-
- // Assign DIB functions according to bytes per pixel
- switch(BitsPerFormat(Surface->iBitmapFormat))
- {
- case 1:
- DIB_PutPixel = (PFN_DIB_PutPixel)DIB_1BPP_PutPixel;
- DIB_HLine = (PFN_DIB_HLine)DIB_1BPP_HLine;
- DIB_VLine = (PFN_DIB_VLine)DIB_1BPP_VLine;
- break;
-
- case 4:
- DIB_PutPixel = (PFN_DIB_PutPixel)DIB_4BPP_PutPixel;
- DIB_HLine = (PFN_DIB_HLine)DIB_4BPP_HLine;
- DIB_VLine = (PFN_DIB_VLine)DIB_4BPP_VLine;
- break;
+ LONG x, y, deltax, deltay, i, xchange, ychange, error, hx, vy;
+ ULONG Pixel = Brush->iSolidColor;
+ SURFOBJ *OutputObj;
+ SURFGDI *OutputGDI;
+ RECTL DestRect;
+ POINTL Translate;
+ INTENG_ENTER_LEAVE EnterLeave;
+
+ DestRect.left = x1;
+ if (x1 != x2)
+ {
+ DestRect.right = x2;
+ }
+ else
+ {
+ DestRect.right = x2 + 1;
+ }
+ DestRect.top = y1;
+ if (y1 != y2)
+ {
+ DestRect.bottom = y2;
+ }
+ else
+ {
+ DestRect.bottom = y2 + 1;
+ }