MFC Support for Direct2D – Composite Effects
We can combine two or more images and/or effects by using the composite effect. Here is an example. Drawing shadows using Direct2D composite effects void CD2DStaticCtrl::_DrawImageWithShadow(CHwndRenderTarget* pRenderTarget) { ASSERT(pRenderTarget && pRenderTarget->IsValid()); ASSERT(m_pBitmap && m_pBitmap->IsValid()); // get ID2D1DeviceContext interface; note: must include <d2d1_1.h> CComQIPtr<ID2D1DeviceContext> spDeviceContext = pRenderTarget->GetRenderTarget(); // create shadow effect and set the input image … Read more