text: //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  //// PARTICULAR PURPOSE.
  ////
  //// Copyright (c) Microsoft Corporation. All rights reserved
  
  #pragma once
  
  #include "DirectXHelper.h"
  
  namespace DX
  {
  	class LoadScreen
  	{
  	public:
  		void Initialize(
  			ID2D1Device*         d2dDevice,
  			ID2D1DeviceContext*  d2dContext,
  			IWICImagingFactory*  wicFactory,
  			std::wstring	     filename
  			);
  
  		void ResetDirectXResources();
  		void ReleaseDeviceDependentResources();
  
  		void UpdateForWindowSizeChange();
  
  		void Render(D2D1::Matrix3x2F orientation2D);
  
  	private:
  		Microsoft::WRL::ComPtr<ID2D1Factory1>           m_d2dFactory;
  		Microsoft::WRL::ComPtr<ID2D1Device>             m_d2dDevice;
  		Microsoft::WRL::ComPtr<ID2D1DeviceContext>      m_d2dContext;
  		Microsoft::WRL::ComPtr<ID2D1DrawingStateBlock>  m_stateBlock;
  
  		Microsoft::WRL::ComPtr<IWICImagingFactory>      m_wicFactory;
  		Microsoft::WRL::ComPtr<ID2D1Bitmap>             m_bitmap;
  
  		D2D1_SIZE_F                                     m_imageSize;
  		D2D1_SIZE_F                                     m_offset;
  		D2D1_SIZE_F                                     m_totalSize;
  
  		std::wstring                                    m_filename;		// Require an image file
  	};
  }
  
  
  