RetroArch
d2d1_2helper.h
Go to the documentation of this file.
1 
2 /*=========================================================================*\
3 
4  Copyright (c) Microsoft Corporation. All rights reserved.
5 
6  File: D2D1_2Helper.h
7 
8  Module Name: D2D
9 
10  Description: Helper files over the D2D interfaces and APIs.
11 
12 \*=========================================================================*/
13 
14 #ifdef _MSC_VER
15 #pragma once
16 #endif // _MSC_VER
17 
18 #ifndef _D2D1_2HELPER_H_
19 #define _D2D1_2HELPER_H_
20 
21 #if NTDDI_VERSION >= NTDDI_WINBLUE
22 
23 #ifndef _D2D1_2_H_
24 #include <d2d1_2.h>
25 #endif // #ifndef _D2D1_2_H_
26 
27 #ifndef D2D_USE_C_DEFINITIONS
28 
29 /*#include <winapifamily.h>*/
30 
31 /*#pragma region Application Family*/
32 /*#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)*/
33 
34 namespace D2D1
35 {
36  COM_DECLSPEC_NOTHROW
38  FLOAT
39  ComputeFlatteningTolerance(
41  FLOAT dpiX = 96.0f,
42  FLOAT dpiY = 96.0f,
43  FLOAT maxZoomFactor = 1.0f
44  )
45  {
46  D2D1_MATRIX_3X2_F dpiDependentTransform =
47  matrix * D2D1::Matrix3x2F::Scale(dpiX / 96.0f, dpiY / 96.0f);
48 
49  FLOAT absMaxZoomFactor = (maxZoomFactor > 0) ? maxZoomFactor : -maxZoomFactor;
50 
52  (absMaxZoomFactor * D2D1ComputeMaximumScaleFactor(&dpiDependentTransform));
53  }
54 
55 } // namespace D2D1
56 
57 /*#endif*/ /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
58 /*#pragma endregion*/
59 
60 #endif // #ifndef D2D_USE_C_DEFINITIONS
61 
62 #endif // #if NTDDI_VERSION >= NTDDI_WINBLUE
63 
64 #endif // #ifndef _D2D1_HELPER_H_
65 
#define D2D1FORCEINLINE
Definition: d2d1.h:3704
Definition: glslang_tab.cpp:129
GLfloat f
Definition: glext.h:8207
GLuint GLenum matrix
Definition: glext.h:10314
#define D2D1_DEFAULT_FLATTENING_TOLERANCE
Definition: d2d1.h:82
FLOAT WINAPI D2D1ComputeMaximumScaleFactor(_In_ CONST D2D1_MATRIX_3X2_F *matrix)
Represents a 3-by-2 matrix.
Definition: dcommon.h:275
Definition: glslang_tab.cpp:133