Convert ROP2 to MIX when calling driver

svn path=/trunk/; revision=13420
This commit is contained in:
Gé van Geldorp 2005-02-05 10:19:49 +00:00
parent a1c0a3b1d6
commit 7cd9c86676
5 changed files with 20 additions and 17 deletions

View file

@ -488,7 +488,7 @@ IntEngLineTo(BITMAPOBJ *DestObj,
LONG x2,
LONG y2,
RECTL *RectBounds,
MIX mix)
MIX Mix)
{
BOOLEAN ret;
SURFOBJ *DestSurf;
@ -524,7 +524,7 @@ IntEngLineTo(BITMAPOBJ *DestObj,
{
/* Call the driver's DrvLineTo */
ret = GDIDEVFUNCS(DestSurf).LineTo(
DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, mix);
DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, Mix);
}
#if 0
@ -536,7 +536,7 @@ IntEngLineTo(BITMAPOBJ *DestObj,
if (! ret)
{
ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, mix);
ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, Mix);
}
MouseSafetyOnDrawEnd(DestSurf);
@ -550,7 +550,7 @@ IntEngPolyline(BITMAPOBJ *DestObj,
BRUSHOBJ *Brush,
CONST LPPOINT pt,
LONG dCount,
MIX mix)
MIX Mix)
{
LONG i;
RECTL rect;
@ -571,7 +571,7 @@ IntEngPolyline(BITMAPOBJ *DestObj,
pt[i].x,
pt[i].y,
&rect,
mix);
Mix);
if (!ret)
{
break;

View file

@ -32,7 +32,7 @@ VOID FASTCALL
IntEngCleanupDriverObjs(struct _EPROCESS *Process,
PW32PROCESS Win32Process);
#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2))
BOOL STDCALL
IntEngLineTo(BITMAPOBJ *Surface,
CLIPOBJ *Clip,

View file

@ -212,6 +212,7 @@ NtGdiCreateCompatableDC(HDC hDC)
NewDC->w.textAlign = OrigDC->w.textAlign;
NewDC->w.backgroundColor = OrigDC->w.backgroundColor;
NewDC->w.backgroundMode = OrigDC->w.backgroundMode;
NewDC->w.ROPmode = OrigDC->w.ROPmode;
DC_UnlockDc( hDC );
if (NULL != DisplayDC)
{
@ -774,8 +775,8 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
NewDC->DMW.dmDisplayFrequency = 0;
NewDC->w.bitsPerPixel = NewDC->DMW.dmBitsPerPel; // FIXME: set this here??
NewDC->w.hPalette = NewDC->DevInfo->hpalDefault;
NewDC->w.ROPmode = R2_COPYPEN;
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel);

View file

@ -28,7 +28,7 @@
&BrushInst.BrushObject, \
x, y, (x)+1, y, \
&RectBounds, \
dc->w.ROPmode);
ROP2_TO_MIX(dc->w.ROPmode));
#define PUTLINE(x1,y1,x2,y2,BrushInst) \
ret = ret && IntEngLineTo(BitmapObj, \
@ -36,7 +36,7 @@
&BrushInst.BrushObject, \
x1, y1, x2, y2, \
&RectBounds, \
dc->w.ROPmode);
ROP2_TO_MIX(dc->w.ROPmode));
BOOL FASTCALL
IntGdiPolygon(PDC dc,
@ -93,7 +93,7 @@ IntGdiPolygon(PDC dc,
if (!(FillBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{
IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush);
ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, dc->w.ROPmode, UnsafePoints, Count, DestRect );
ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, ROP2_TO_MIX(dc->w.ROPmode), UnsafePoints, Count, DestRect );
}
BRUSHOBJ_UnlockBrush(dc->w.hBrush);
@ -128,7 +128,7 @@ IntGdiPolygon(PDC dc,
To.x,
To.y,
&DestRect,
dc->w.ROPmode); /* MIX */
ROP2_TO_MIX(dc->w.ROPmode)); /* MIX */
}
}
PENOBJ_UnlockPen( dc->w.hPen );
@ -939,6 +939,7 @@ IntRectangle(PDC dc,
GDIBRUSHINST PenBrushInst, FillBrushInst;
BOOL ret = FALSE; // default to failure
RECTL DestRect;
MIX Mix;
ASSERT ( dc ); // caller's responsibility to set this up
/* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */
@ -1001,33 +1002,34 @@ IntRectangle(PDC dc,
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{
Mix = ROP2_TO_MIX(dc->w.ROPmode);
ret = ret && IntEngLineTo(BitmapObj,
dc->CombinedClip,
&PenBrushInst.BrushObject,
LeftRect, TopRect, RightRect, TopRect,
&DestRect, // Bounding rectangle
dc->w.ROPmode); // MIX
Mix);
ret = ret && IntEngLineTo(BitmapObj,
dc->CombinedClip,
&PenBrushInst.BrushObject,
RightRect, TopRect, RightRect, BottomRect,
&DestRect, // Bounding rectangle
dc->w.ROPmode); // MIX
Mix);
ret = ret && IntEngLineTo(BitmapObj,
dc->CombinedClip,
&PenBrushInst.BrushObject,
RightRect, BottomRect, LeftRect, BottomRect,
&DestRect, // Bounding rectangle
dc->w.ROPmode); // MIX
Mix);
ret = ret && IntEngLineTo(BitmapObj,
dc->CombinedClip,
&PenBrushInst.BrushObject,
LeftRect, BottomRect, LeftRect, TopRect,
&DestRect, // Bounding rectangle
dc->w.ROPmode); // MIX */
Mix);
}
PENOBJ_UnlockPen(dc->w.hPen);

View file

@ -110,7 +110,7 @@ IntGdiLineTo(DC *dc,
Points[0].x, Points[0].y,
Points[1].x, Points[1].y,
&Bounds,
dc->w.ROPmode);
ROP2_TO_MIX(dc->w.ROPmode));
}
BITMAPOBJ_UnlockBitmap ( dc->w.hBitmap );
@ -228,7 +228,7 @@ IntGdiPolyline(DC *dc,
IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen);
Ret = IntEngPolyline(BitmapObj, dc->CombinedClip,
&PenBrushInst.BrushObject, Points, Count,
dc->w.ROPmode);
ROP2_TO_MIX(dc->w.ROPmode));
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap);
EngFreeMem(Points);