1 //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
2 //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3 //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
4 //// PARTICULAR PURPOSE.
6 //// Copyright (c) Microsoft Corporation. All rights reserved
10 #include "DirectXSample.h"
12 ref class SampleOverlay
18 _In_ ID2D1Device* d2dDevice,
19 _In_ ID2D1DeviceContext* d2dContext,
20 _In_ IWICImagingFactory* wicFactory,
21 _In_ IDWriteFactory* dwriteFactory,
22 _In_ Platform::String^ caption
25 void ResetDirectXResources();
27 void UpdateForWindowSizeChange();
31 float GetTitleHeightInDips();
35 Microsoft::WRL::ComPtr<ID2D1Factory1> m_d2dFactory;
36 Microsoft::WRL::ComPtr<ID2D1Device> m_d2dDevice;
37 Microsoft::WRL::ComPtr<ID2D1DeviceContext> m_d2dContext;
38 Microsoft::WRL::ComPtr<IDWriteFactory> m_dwriteFactory;
39 Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> m_whiteBrush;
40 Microsoft::WRL::ComPtr<ID2D1DrawingStateBlock> m_stateBlock;
42 Microsoft::WRL::ComPtr<IWICImagingFactory> m_wicFactory;
43 Microsoft::WRL::ComPtr<ID2D1Bitmap> m_logoBitmap;
44 Microsoft::WRL::ComPtr<IDWriteTextLayout> m_textLayout;
48 Platform::String^ m_sampleName;
50 float m_textVerticalOffset;
51 D2D1_SIZE_F m_logoSize;