Files
Work/statbar/STATLOGO.CPP
2024-08-07 09:16:27 -04:00

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));
}
}
}