Author: fireball
Date: Mon Nov 9 15:39:18 2009
New Revision: 44048
URL:
http://svn.reactos.org/svn/reactos?rev=44048&view=rev
Log:
- Add brush updating before any LineTo call.
- Properly mark dotted pens as needing a realization.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/lineto.c
branches/arwinss/reactos/subsystems/win32/win32k/gre/rect.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/misc.c [iso-8859-1] Mon Nov 9
15:39:18 2009
@@ -89,6 +89,9 @@
pt[1].x += pDC->rcVport.left + pDC->rcDcRect.left;
pt[1].y += pDC->rcVport.top + pDC->rcDcRect.top;
+ /* Update the pen */
+ GreUpdateBrush(pDC->pLineBrush, pDC);
+
GreLineTo(&pDC->pBitmap->SurfObj,
pDC->CombinedClip,
&(pDC->pLineBrush->BrushObj),
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/brushobj.c [iso-8859-1] Mon Nov
9 15:39:18 2009
@@ -92,6 +92,9 @@
return NULL;
}
+ /* Default to a pen which needs realization */
+ pBrush->BrushObj.iSolidColor = 0xFFFFFFFF;
+
switch (dwPenStyle & PS_STYLE_MASK)
{
case PS_NULL:
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/lineto.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/lineto.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/lineto.c [iso-8859-1] Mon Nov 9
15:39:18 2009
@@ -32,22 +32,19 @@
{
BOOLEAN ret;
SURFACE *psurfDest;
- //PEBRUSHOBJ GdiBrush;
+ PBRUSHGDI GdiBrush;
RECTL b;
ASSERT(psoDest);
psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
ASSERT(psurfDest);
- /*GdiBrush = CONTAINING_RECORD(
- pbo,
- EBRUSHOBJ,
- BrushObject);
+ GdiBrush = CONTAINING_RECORD(pbo, BRUSHGDI, BrushObj);
ASSERT(GdiBrush);
- ASSERT(GdiBrush->pbrush);
-
- if (GdiBrush->pbrush->flAttrs & GDIBRUSH_IS_NULL)
- return TRUE;*/
+
+ /* Don't do anything if null pen is selected */
+ if (GdiBrush->flAttrs & GDIBRUSH_IS_NULL)
+ return TRUE;
/* No success yet */
ret = FALSE;
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/rect.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/rect.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/rect.c [iso-8859-1] Mon Nov 9
15:39:18 2009
@@ -42,6 +42,7 @@
{
if (!(pDC->pFillBrush->flAttrs & GDIBRUSH_IS_NULL))
{
+ GreUpdateBrush(pDC->pFillBrush, pDC);
bRet = GrepBitBltEx(&pDC->pBitmap->SurfObj,
NULL,
NULL,
@@ -61,6 +62,7 @@
/* Draw pen-based rectangle */
if (!(pDC->pLineBrush->flAttrs & GDIBRUSH_IS_NULL))
{
+ GreUpdateBrush(pDC->pLineBrush, pDC);
Mix = ROP2_TO_MIX(R2_COPYPEN);/*pdcattr->jROP2*/
GreLineTo(&pDC->pBitmap->SurfObj,
pDC->CombinedClip,
@@ -118,6 +120,7 @@
{
if (!(pDC->pFillBrush->flAttrs & GDIBRUSH_IS_NULL))
{
+ GreUpdateBrush(pDC->pFillBrush, pDC);
GrepFillPolygon(pDC,
&pDC->pBitmap->SurfObj,
&pDC->pFillBrush->BrushObj,
@@ -131,6 +134,7 @@
/* Draw pen-based polygon */
if (!(pDC->pLineBrush->flAttrs & GDIBRUSH_IS_NULL))
{
+ GreUpdateBrush(pDC->pLineBrush, pDC);
Mix = ROP2_TO_MIX(R2_COPYPEN);/*pdcattr->jROP2*/
for (i=0; i<count-1; i++)
{