Minor fixes

svn path=/trunk/; revision=3527
This commit is contained in:
Jason Filby 2002-09-21 10:39:54 +00:00
parent 2f3e32bfea
commit 93dd94f0db
2 changed files with 31 additions and 19 deletions

View file

@ -128,6 +128,14 @@ EngBitBlt(SURFOBJ *Dest,
} }
} }
/* The code currently assumes there will be a source bitmap. This is not true when, for example, using this function to
* paint a brush pattern on the destination. */
if(!Source)
{
DbgPrint("EngBitBlt: A source is currently required, even though not all operations require one (FIXME)\n");
return FALSE;
}
// * The source bitmap is not managed by the GDI and we didn't already obtain it using EngCopyBits from the device // * The source bitmap is not managed by the GDI and we didn't already obtain it using EngCopyBits from the device
if(Source->iType != STYPE_BITMAP && SourceGDI->CopyBits == NULL) if(Source->iType != STYPE_BITMAP && SourceGDI->CopyBits == NULL)
{ {

View file

@ -134,26 +134,30 @@ W32kRectangle(HDC hDC,
RectBounds, // Bounding rectangle RectBounds, // Bounding rectangle
dc->w.ROPmode); // MIX */ dc->w.ROPmode); // MIX */
// FIXME: BrushObj is obtained above; decide which one is correct
BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC); BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC);
assert(BrushObj);
if (BrushObj->logbrush.lbStyle != BS_NULL) if (BrushObj)
{ {
DestRect.left = LeftRect + 1; if (BrushObj->logbrush.lbStyle != BS_NULL)
DestRect.right = RightRect - 1; {
DestRect.top = TopRect + 1; DestRect.left = LeftRect + 1;
DestRect.bottom = BottomRect - 1; DestRect.right = RightRect - 1;
ret = EngBitBlt(SurfObj, DestRect.top = TopRect + 1;
NULL, DestRect.bottom = BottomRect - 1;
NULL, ret = EngBitBlt(SurfObj,
NULL, NULL,
NULL, NULL,
&DestRect, NULL,
NULL, NULL,
NULL, &DestRect,
BrushObj, NULL,
NULL, NULL,
PATCOPY); BrushObj,
} NULL,
PATCOPY);
}
}
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC ); GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
} }