20 lines
675 B
C++
20 lines
675 B
C++
#include <statbar/statlogo.hpp>
|
|
|
|
void StatusBarLogo::postPaint(PureDevice &screenDevice,const Rect &paintRect)
|
|
{
|
|
PureDevice memDevice(screenDevice);
|
|
memDevice.select((GDIObj)mPureBitmap);
|
|
if(mStretchBlt)screenDevice.stretchBlt(paintRect,memDevice,Rect(0,0,mPureBitmap.width(),mPureBitmap.height()));
|
|
else
|
|
{
|
|
if(!mCenterx&&!mCentery)screenDevice.bitBlt(paintRect,memDevice,Point(0,0));
|
|
else
|
|
{
|
|
Rect bltRect(paintRect);
|
|
if(mCentery)bltRect.top(bltRect.top()+((paintRect.bottom()-mPureBitmap.height())/2));
|
|
if(mCenterx)bltRect.left(bltRect.left()+((paintRect.right()-mPureBitmap.width())/2));
|
|
screenDevice.bitBlt(bltRect,memDevice,Point(0,0));
|
|
}
|
|
}
|
|
}
|