Initial
This commit is contained in:
19
statbar/STATLOGO.CPP
Normal file
19
statbar/STATLOGO.CPP
Normal file
@@ -0,0 +1,19 @@
|
||||
#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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user