You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
#pragma once
|
|
|
|
namespace SOUI
|
|
{
|
|
class SImageMaskWnd : public SWindow
|
|
{
|
|
SOUI_CLASS_NAME(SImageMaskWnd,L"imageMask")
|
|
public:
|
|
SImageMaskWnd(void);
|
|
~SImageMaskWnd(void);
|
|
|
|
void SetImage(IBitmap * pBitmap,FilterLevel fl=kHigh_FilterLevel);
|
|
|
|
protected:
|
|
void OnPaint(IRenderTarget *pRT);
|
|
|
|
SOUI_MSG_MAP_BEGIN()
|
|
MSG_WM_PAINT_EX(OnPaint)
|
|
SOUI_MSG_MAP_END()
|
|
|
|
HRESULT OnAttrMask(const SStringW & strValue,BOOL bLoading);
|
|
HRESULT OnAttrImage(const SStringW & strValue,BOOL bLoading);
|
|
|
|
void UpdateCacheFromSkin(ISkinObj *pSkin);
|
|
void UpdateCacheFromImage(IBitmap * pBitmap,FilterLevel fl);
|
|
void MakeCacheApha();
|
|
|
|
SOUI_ATTRS_BEGIN()
|
|
ATTR_CUSTOM(L"mask", OnAttrMask)//image.a
|
|
ATTR_CUSTOM(L"skin", OnAttrImage)
|
|
SOUI_ATTRS_END()
|
|
|
|
SStringW m_strSkin;
|
|
SAutoRefPtr<IBitmap> m_bmpCache;
|
|
SAutoRefPtr<IBitmap> m_bmpMask;
|
|
int m_iMaskChannel;
|
|
};
|
|
}
|
|
|