TypeTraits 结构 (d2d1_1helper.h)

包含使用指定类型存储其数据的 PointSizeRect 的实现。

语法

template<typename Type>
struct TypeTraits
{
    typedef D2D1_POINT_2F Point;
    typedef D2D1_SIZE_F   Size;
    typedef D2D1_RECT_F   Rect;
};

template<>
struct TypeTraits<UINT32>
{
    typedef D2D1_POINT_2U Point;
    typedef D2D1_SIZE_U   Size;
    typedef D2D1_RECT_U   Rect;
};

要求

   
最低受支持的客户端 Windows 7、带 SP2 的 Windows Vista 和适用于 Windows Vista 的平台更新 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows Server 2008 R2、Windows Server 2008 SP2 和适用于 Windows Server 2008 的平台更新 [桌面应用 |UWP 应用]
标头 d2d1_1helper.h (包括 D2d1_1helper.h)