资 源 简 介
#include
#include // for IWICImagingFactory
#include
#define SAFE_RELEASE(P) if(P){P->Release() ; P = NULL ;}
ID2D1Factory* g_pD2DFactory = NULL ; // Direct2D factory
ID2D1HwndRenderTarget* g_pRenderTarget = NULL; // Render target
ID2D1SolidColorBrush* g_pBlackBrush = NULL ; // A black brush, reflect the line color
ID2D1RadialGradientBrush* g_pRadialGradientBrush = NULL ; // Radial gradient brush
ID2D1Layer* g_pLayer = NULL ;
ID2D1Bitmap* g_pBitmap = NULL ;
IWICImagingFactory* g_pWICFactory = NULL ;
HWND g_Hwnd ; // Window handle
// Creates a Direct2D bitmap from file
HRESULT LoadBitmapFromFile(
ID2D1RenderTarget *pRenderTarget,
IWICImagingFactory *pIWICFactory,
PCWSTR uri,
UINT dest