[ros-diffs] [tkreuzer] 40279: Add the DC XlateBrush / XlatePen hack to DC_vUpdateFillBrush / DC_vUpdateLineBrush, so these should now be a full replacement for the current usage of IntGdiSelectPen/Brush + EBRUSHOBJ_vInit

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sun Mar 29 04:15:38 CEST 2009


Author: tkreuzer
Date: Sun Mar 29 06:15:37 2009
New Revision: 40279

URL: http://svn.reactos.org/svn/reactos?rev=40279&view=rev
Log:
Add the DC XlateBrush / XlatePen hack to DC_vUpdateFillBrush / DC_vUpdateLineBrush, so these should now be a full replacement for the current usage of IntGdiSelectPen/Brush + EBRUSHOBJ_vInit

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c?rev=40279&r1=40278&r2=40279&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] Sun Mar 29 06:15:37 2009
@@ -72,11 +72,8 @@
 {
     PDC_ATTR pdcattr = pdc->pdcattr;
     PBRUSH pbrFill;
-    XLATEOBJ *pxlo;
+    XLATEOBJ *pxlo = NULL;
     ULONG iSolidColor;
-
-    /* ROS HACK, should use surf xlate */
-    pxlo = pdc->rosdc.XlatePen;
 
     /* Check if the brush handle has changed */
     if (pdcattr->hbrush != pdc->dclevel.pbrFill->BaseObject.hHmgr)
@@ -89,15 +86,24 @@
             BRUSH_ShareUnlockBrush(pdc->dclevel.pbrFill);
             pdc->dclevel.pbrFill = pbrFill;
 
+            /* ROS HACK, should use surf xlate */
+            IntUpdateBrushXlate(pdc, &pdc->rosdc.XlateBrush, pbrFill);
+
             /* Update eboFill, realizing it, if needed */
-            EBRUSHOBJ_vUpdate(&pdc->eboFill, pbrFill, pxlo);
+            EBRUSHOBJ_vUpdate(&pdc->eboFill, pbrFill, pdc->rosdc.XlateBrush);
         }
         else
         {
             /* Invalid brush handle, restore old one */
             pdcattr->hbrush = pdc->dclevel.pbrFill->BaseObject.hHmgr;
+
+            /* ROS HACK, should use surf xlate */
+            IntUpdateBrushXlate(pdc, &pdc->rosdc.XlateBrush, pdc->dclevel.pbrFill);
         }
     }
+
+    /* ROS HACK, should use surf xlate */
+    pxlo = pdc->rosdc.XlateBrush;
 
     /* Check for DC brush */
     if (pdcattr->hbrush == StockObjects[DC_BRUSH])
@@ -136,15 +142,24 @@
             BRUSH_ShareUnlockBrush(pdc->dclevel.pbrLine);
             pdc->dclevel.pbrLine = pbrLine;
 
+            /* ROS HACK, should use surf xlate */
+            IntUpdateBrushXlate(pdc, &pdc->rosdc.XlatePen, pbrLine);
+
             /* Update eboLine, realizing it, if needed */
-            EBRUSHOBJ_vUpdate(&pdc->eboLine, pbrLine, pxlo);
+            EBRUSHOBJ_vUpdate(&pdc->eboLine, pbrLine, pdc->rosdc.XlatePen);
         }
         else
         {
             /* Invalid pen handle, restore old one */
             pdcattr->hpen = pdc->dclevel.pbrLine->BaseObject.hHmgr;
+
+            /* ROS HACK, should use surf xlate */
+            IntUpdateBrushXlate(pdc, &pdc->rosdc.XlatePen, pdc->dclevel.pbrLine);
         }
     }
+
+    /* ROS HACK, should use surf xlate */
+    pxlo = pdc->rosdc.XlatePen;
 
     /* Check for DC pen */
     if (pdcattr->hpen == StockObjects[DC_PEN])



More information about the Ros-diffs mailing list