resubmitting X11DRV_SetDIBitsToDevice patch in -u format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here the X11DRV_SetDIBitsToDevice patch from P.Christeas that solves bug 720 - 
Misplaced graphics in AutoCAD R14, with some minor cleanup by me,
resubmitted in -u format

Regards

Max

Index: graphics/x11drv/dib.c
===================================================================
RCS file: /home/wine/wine/graphics/x11drv/dib.c,v
retrieving revision 1.97
diff -u -r1.97 dib.c
--- graphics/x11drv/dib.c	25 Jun 2002 23:29:51 -0000	1.97
+++ graphics/x11drv/dib.c	28 Jun 2002 19:49:55 -0000
@@ -4734,9 +4734,17 @@
 				const BITMAPINFO *info, UINT coloruse )
 {
     X11DRV_DIB_IMAGEBITS_DESCR descr;
+/*
+    Changelog : 28.06.2002 : CLEANUP : cy == oldcy everytimes, of no use !!!
+    I guess must be something wrong also with 'lines' declared as UINT but used as signed
+    near end of function ( -lines), but not sure.....
+
     DWORD width, oldcy = cy;
+*/
+    DWORD width ;
     INT result;
     int height, tmpheight;
+
     POINT pt;
     DC *dc = physDev->dc;
 
@@ -4794,15 +4802,29 @@
     descr.image     = NULL;
     descr.palentry  = NULL;
     descr.lines     = tmpheight >= 0 ? lines : -lines;
+
     descr.infoWidth = width;
     descr.depth     = dc->bitsPerPixel;
     descr.drawable  = physDev->drawable;
     descr.gc        = physDev->gc;
     descr.xSrc      = xSrc;
+
+
+/*
+    Changelog : 20.06.2002 patch from P. Christeas with a minor cleanup by me : solves bug 720
     descr.ySrc      = tmpheight >= 0 ? lines-(ySrc-startscan)-cy+(oldcy-cy)
-                                     : ySrc - startscan;
+                                   : ySrc - startscan;
+*/
+    descr.ySrc      = lines-(ySrc-startscan)-cy ;
+
     descr.xDest     = physDev->org.x + pt.x;
+
+/*
+    Changelog : 28.06.2002 : CLEANUP : cy == oldcy everytimes, so it's useless to add (oldcy - cy) !!!!
     descr.yDest     = physDev->org.y + pt.y + (tmpheight >= 0 ? oldcy-cy : 0);
+*/
+    descr.yDest     = physDev->org.y + pt.y ;
+
     descr.width     = cx;
     descr.height    = cy;
     descr.useShm    = FALSE;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux