Make GetBits() convert from DDB to DIB when asking for the bits, if necessary.
r=kmcclusk, sr=hyatt. bugscape bug #3322. git-svn-id: svn://10.0.0.236/trunk@83960 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a684a2fc7f
commit
f69338565d
@ -1265,3 +1265,20 @@ nsRect destRect;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a pointer to the bits for the pixelmap. Will convert to DIB if
|
||||
* only stored in optimized HBITMAP form.
|
||||
*
|
||||
* @return address of the DIB pixel array
|
||||
*/
|
||||
|
||||
PRUint8*
|
||||
nsImageWin::GetBits()
|
||||
{
|
||||
if ( !mImageBits )
|
||||
ConvertDDBtoDIB(GetWidth(), GetHeight());
|
||||
|
||||
return mImageBits;
|
||||
|
||||
} // GetBits
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual PRInt32 GetHeight() { return mBHead->biHeight; }
|
||||
virtual PRBool GetIsRowOrderTopToBottom() { return mIsTopToBottom; }
|
||||
virtual PRInt32 GetWidth() { return mBHead->biWidth; }
|
||||
virtual PRUint8* GetBits() { return mImageBits; }
|
||||
virtual PRUint8* GetBits() ;
|
||||
virtual PRInt32 GetLineStride() { return mRowBytes; }
|
||||
|
||||
NS_IMETHOD SetNaturalWidth(PRInt32 naturalwidth) { mNaturalWidth= naturalwidth; return NS_OK;}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user