Fixes for 18029 and 16723 -- fix image drawing on Mac to use GWorlds, and put in api to lock and unlock pixels. Pass a real nsDrawingSurface to the image, instead oif a cast GrafPtr. r=pnunn, a=chofmann.

This commit is contained in:
sfraser%netscape.com 1999-11-04 22:36:21 +00:00
parent 4c3161dbe8
commit 93d9d9b39c

View File

@ -1414,8 +1414,8 @@ NS_IMETHODIMP nsRenderingContextMac::DrawImage(nsIImage *aImage, const nsRect& a
mGS->mTMatrix.TransformCoord(&sr.x,&sr.y,&sr.width,&sr.height);
mGS->mTMatrix.TransformCoord(&dr.x,&dr.y,&dr.width,&dr.height);
nsresult result = aImage->Draw(*this,mPort,sr.x,sr.y,sr.width,sr.height,
dr.x,dr.y,dr.width,dr.height);
nsresult result = aImage->Draw(*this, mCurrentSurface, sr.x, sr.y, sr.width, sr.height,
dr.x, dr.y, dr.width, dr.height);
EndDraw();
return result;
@ -1430,7 +1430,7 @@ NS_IMETHODIMP nsRenderingContextMac::DrawImage(nsIImage *aImage, const nsRect& a
nsRect tr = aRect;
mGS->mTMatrix.TransformCoord(&tr.x,&tr.y,&tr.width,&tr.height);
nsresult result = aImage->Draw(*this,mPort,tr.x,tr.y,tr.width,tr.height);
nsresult result = aImage->Draw(*this, mCurrentSurface, tr.x, tr.y, tr.width, tr.height);
EndDraw();
return result;