2 #include "SimpleSubPicWrapper.h"
4 //////////////////////////////////////////////////////////////////////////
9 SimpleSubPicWrapper::SimpleSubPicWrapper( ISubPicEx
* inner_obj
)
10 : CUnknown(NAME("SimpleSubPicWrapper"), NULL
)
11 , m_inner_obj(inner_obj
)
16 SimpleSubPicWrapper::SimpleSubPicWrapper( ISubPic
* inner_obj
)
17 : CUnknown(NAME("SimpleSubPicWrapper"), NULL
)
18 , m_inner_obj2(inner_obj
)
23 STDMETHODIMP
SimpleSubPicWrapper::NonDelegatingQueryInterface( REFIID riid
, void** ppv
)
27 __super::NonDelegatingQueryInterface(riid
, ppv
);
30 STDMETHODIMP
SimpleSubPicWrapper::AlphaBlt(SubPicDesc
* target
)
34 CAtlList
<const CRect
> rect_list
;
35 m_inner_obj
->GetDirtyRects(rect_list
);
37 POSITION pos
= rect_list
.GetHeadPosition();
40 const CRect
& rect
= rect_list
.GetNext(pos
);
41 m_inner_obj
->AlphaBlt(rect
, rect
, target
);
44 else if (m_inner_obj2
)
47 m_inner_obj2
->GetDirtyRect(r
);
49 m_inner_obj2
->AlphaBlt(r
, r
, target
);