зеркало из https://github.com/mozilla/gecko-dev.git
when selecting a bitmap into a drawing surface, we now reselect the bitmap
that used to be there when we're done.
This commit is contained in:
Родитель
26b34368ef
Коммит
3d295d74ad
|
@ -162,11 +162,14 @@ PRBool nsImageWin :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurfa
|
|||
|
||||
if (NULL != srcdc)
|
||||
{
|
||||
SelectObject(srcdc, mHBitmap);
|
||||
HBITMAP oldbits = ::SelectObject(srcdc, mHBitmap);
|
||||
|
||||
if (!::StretchBlt(the_hdc, aDX, aDY, aDWidth, aDHeight, srcdc, aSX, aSY,
|
||||
aSWidth, aSHeight, SRCCOPY))
|
||||
error = ::GetLastError();
|
||||
|
||||
if (nsnull != oldbits)
|
||||
::SelectObject(srcdc, oldbits);
|
||||
}
|
||||
|
||||
NS_RELEASE(dx);
|
||||
|
@ -203,13 +206,16 @@ PRBool nsImageWin :: Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurfa
|
|||
|
||||
if (NULL != srcdc)
|
||||
{
|
||||
SelectObject(srcdc, mHBitmap);
|
||||
HBITMAP oldbits = ::SelectObject(srcdc, mHBitmap);
|
||||
//if((aWidth == mBHead->biWidth) && (aHeight == mBHead->biHeight))
|
||||
//BitBlt(the_hdc,aX,aY,aWidth,aHeight,mOptimizeDC,0,0,SRCCOPY);
|
||||
|
||||
if (!::StretchBlt(the_hdc, aX, aY, aWidth, aHeight, srcdc, 0, 0,
|
||||
mBHead->biWidth, mBHead->biHeight, SRCCOPY))
|
||||
error = ::GetLastError();
|
||||
|
||||
if (nsnull != oldbits)
|
||||
::SelectObject(srcdc, oldbits);
|
||||
}
|
||||
|
||||
NS_RELEASE(dx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче