Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5 
      6  * d2d1.h - Header file for the Direct2D API
      7  * No original Microsoft headers were used in the creation of this
      8  * file.
      9  *API docs available at: http://msdn.microsoft.com/en-us/library/dd372349%28v=VS.85%29.aspx
     10  */
     11 
     12 #ifndef _D2D1_H
     13 #define _D2D1_H
     14 
     15 #include <unknwn.h>
     16 #include <dcommon.h>
     17 
     18 #ifdef __MINGW_HAS_DXSDK
     19 #include <dxgiformat.h>
     20 #include <d3d10_1.h>
     21 #endif
     22 
     23 #include <d2dbasetypes.h>
     24 #include <d2derr.h>
     25 
     26 #ifndef _COM_interface
     27 #define _COM_interface struct
     28 #endif
     29 
     30 typedef UINT64 D2D1_TAG;
     31 
     32 #if !defined(D2D_USE_C_DEFINITIONS) && !defined(__cplusplus)
     33 #define D2D_USE_C_DEFINITIONS
     34 #endif
     35 
     36 #ifndef __IWICBitmapSource_FWD_DEFINED__
     37 #define __IWICBitmapSource_FWD_DEFINED__
     38 typedef interface IWICBitmapSource IWICBitmapSource;
     39 #endif
     40 
     41 #ifndef __IWICBitmap_FWD_DEFINED__
     42 #define __IWICBitmap_FWD_DEFINED__
     43 typedef interface IWICBitmap IWICBitmap;
     44 #endif
     45 
     46 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
     47 
     48 #define D2D1_INVALID_TAG ULONGLONG_MAX
     49 #define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f)
     50 
     51 /* enumerations */
     52 
     53 #ifndef __MINGW_HAS_DXSDK
     54 typedef enum D3D10_FEATURE_LEVEL1 {
     55   D3D10_FEATURE_LEVEL_10_0   = 0xa000,
     56   D3D10_FEATURE_LEVEL_10_1   = 0xa100,
     57   D3D10_FEATURE_LEVEL_9_1    = 0x9100,
     58   D3D10_FEATURE_LEVEL_9_2    = 0x9200,
     59   D3D10_FEATURE_LEVEL_9_3    = 0x9300
     60 } D3D10_FEATURE_LEVEL1;
     61 
     62 typedef enum DXGI_FORMAT {
     63   DXGI_FORMAT_UNKNOWN                      = 0,
     64   DXGI_FORMAT_R32G32B32A32_TYPELESS        = 1,
     65   DXGI_FORMAT_R32G32B32A32_FLOAT           = 2,
     66   DXGI_FORMAT_R32G32B32A32_UINT            = 3,
     67   DXGI_FORMAT_R32G32B32A32_SINT            = 4,
     68   DXGI_FORMAT_R32G32B32_TYPELESS           = 5,
     69   DXGI_FORMAT_R32G32B32_FLOAT              = 6,
     70   DXGI_FORMAT_R32G32B32_UINT               = 7,
     71   DXGI_FORMAT_R32G32B32_SINT               = 8,
     72   DXGI_FORMAT_R16G16B16A16_TYPELESS        = 9,
     73   DXGI_FORMAT_R16G16B16A16_FLOAT           = 10,
     74   DXGI_FORMAT_R16G16B16A16_UNORM           = 11,
     75   DXGI_FORMAT_R16G16B16A16_UINT            = 12,
     76   DXGI_FORMAT_R16G16B16A16_SNORM           = 13,
     77   DXGI_FORMAT_R16G16B16A16_SINT            = 14,
     78   DXGI_FORMAT_R32G32_TYPELESS              = 15,
     79   DXGI_FORMAT_R32G32_FLOAT                 = 16,
     80   DXGI_FORMAT_R32G32_UINT                  = 17,
     81   DXGI_FORMAT_R32G32_SINT                  = 18,
     82   DXGI_FORMAT_R32G8X24_TYPELESS            = 19,
     83   DXGI_FORMAT_D32_FLOAT_S8X24_UINT         = 20,
     84   DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS     = 21,
     85   DXGI_FORMAT_X32_TYPELESS_G8X24_UINT      = 22,
     86   DXGI_FORMAT_R10G10B10A2_TYPELESS         = 23,
     87   DXGI_FORMAT_R10G10B10A2_UNORM            = 24,
     88   DXGI_FORMAT_R10G10B10A2_UINT             = 25,
     89   DXGI_FORMAT_R11G11B10_FLOAT              = 26,
     90   DXGI_FORMAT_R8G8B8A8_TYPELESS            = 27,
     91   DXGI_FORMAT_R8G8B8A8_UNORM               = 28,
     92   DXGI_FORMAT_R8G8B8A8_UNORM_SRGB          = 29,
     93   DXGI_FORMAT_R8G8B8A8_UINT                = 30,
     94   DXGI_FORMAT_R8G8B8A8_SNORM               = 31,
     95   DXGI_FORMAT_R8G8B8A8_SINT                = 32,
     96   DXGI_FORMAT_R16G16_TYPELESS              = 33,
     97   DXGI_FORMAT_R16G16_FLOAT                 = 34,
     98   DXGI_FORMAT_R16G16_UNORM                 = 35,
     99   DXGI_FORMAT_R16G16_UINT                  = 36,
    100   DXGI_FORMAT_R16G16_SNORM                 = 37,
    101   DXGI_FORMAT_R16G16_SINT                  = 38,
    102   DXGI_FORMAT_R32_TYPELESS                 = 39,
    103   DXGI_FORMAT_D32_FLOAT                    = 40,
    104   DXGI_FORMAT_R32_FLOAT                    = 41,
    105   DXGI_FORMAT_R32_UINT                     = 42,
    106   DXGI_FORMAT_R32_SINT                     = 43,
    107   DXGI_FORMAT_R24G8_TYPELESS               = 44,
    108   DXGI_FORMAT_D24_UNORM_S8_UINT            = 45,
    109   DXGI_FORMAT_R24_UNORM_X8_TYPELESS        = 46,
    110   DXGI_FORMAT_X24_TYPELESS_G8_UINT         = 47,
    111   DXGI_FORMAT_R8G8_TYPELESS                = 48,
    112   DXGI_FORMAT_R8G8_UNORM                   = 49,
    113   DXGI_FORMAT_R8G8_UINT                    = 50,
    114   DXGI_FORMAT_R8G8_SNORM                   = 51,
    115   DXGI_FORMAT_R8G8_SINT                    = 52,
    116   DXGI_FORMAT_R16_TYPELESS                 = 53,
    117   DXGI_FORMAT_R16_FLOAT                    = 54,
    118   DXGI_FORMAT_D16_UNORM                    = 55,
    119   DXGI_FORMAT_R16_UNORM                    = 56,
    120   DXGI_FORMAT_R16_UINT                     = 57,
    121   DXGI_FORMAT_R16_SNORM                    = 58,
    122   DXGI_FORMAT_R16_SINT                     = 59,
    123   DXGI_FORMAT_R8_TYPELESS                  = 60,
    124   DXGI_FORMAT_R8_UNORM                     = 61,
    125   DXGI_FORMAT_R8_UINT                      = 62,
    126   DXGI_FORMAT_R8_SNORM                     = 63,
    127   DXGI_FORMAT_R8_SINT                      = 64,
    128   DXGI_FORMAT_A8_UNORM                     = 65,
    129   DXGI_FORMAT_R1_UNORM                     = 66,
    130   DXGI_FORMAT_R9G9B9E5_SHAREDEXP           = 67,
    131   DXGI_FORMAT_R8G8_B8G8_UNORM              = 68,
    132   DXGI_FORMAT_G8R8_G8B8_UNORM              = 69,
    133   DXGI_FORMAT_BC1_TYPELESS                 = 70,
    134   DXGI_FORMAT_BC1_UNORM                    = 71,
    135   DXGI_FORMAT_BC1_UNORM_SRGB               = 72,
    136   DXGI_FORMAT_BC2_TYPELESS                 = 73,
    137   DXGI_FORMAT_BC2_UNORM                    = 74,
    138   DXGI_FORMAT_BC2_UNORM_SRGB               = 75,
    139   DXGI_FORMAT_BC3_TYPELESS                 = 76,
    140   DXGI_FORMAT_BC3_UNORM                    = 77,
    141   DXGI_FORMAT_BC3_UNORM_SRGB               = 78,
    142   DXGI_FORMAT_BC4_TYPELESS                 = 79,
    143   DXGI_FORMAT_BC4_UNORM                    = 80,
    144   DXGI_FORMAT_BC4_SNORM                    = 81,
    145   DXGI_FORMAT_BC5_TYPELESS                 = 82,
    146   DXGI_FORMAT_BC5_UNORM                    = 83,
    147   DXGI_FORMAT_BC5_SNORM                    = 84,
    148   DXGI_FORMAT_B5G6R5_UNORM                 = 85,
    149   DXGI_FORMAT_B5G5R5A1_UNORM               = 86,
    150   DXGI_FORMAT_B8G8R8A8_UNORM               = 87,
    151   DXGI_FORMAT_B8G8R8X8_UNORM               = 88,
    152   DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM   = 89,
    153   DXGI_FORMAT_B8G8R8A8_TYPELESS            = 90,
    154   DXGI_FORMAT_B8G8R8A8_UNORM_SRGB          = 91,
    155   DXGI_FORMAT_B8G8R8X8_TYPELESS            = 92,
    156   DXGI_FORMAT_B8G8R8X8_UNORM_SRGB          = 93,
    157   DXGI_FORMAT_BC6H_TYPELESS                = 94,
    158   DXGI_FORMAT_BC6H_UF16                    = 95,
    159   DXGI_FORMAT_BC6H_SF16                    = 96,
    160   DXGI_FORMAT_BC7_TYPELESS                 = 97,
    161   DXGI_FORMAT_BC7_UNORM                    = 98,
    162   DXGI_FORMAT_BC7_UNORM_SRGB               = 99,
    163   DXGI_FORMAT_FORCE_UINT                   = 0xffffffff
    164 } DXGI_FORMAT, *LPDXGI_FORMAT;
    165 
    166 #endif /*__MINGW_HAS_DXSDK*/
    167 
    168 #ifndef __IDWriteRenderingParams_FWD_DEFINED__
    169 #define __IDWriteRenderingParams_FWD_DEFINED__
    170 typedef struct IDWriteRenderingParams IDWriteRenderingParams;
    171 #endif
    172 
    173 #ifndef __IDXGISurface_FWD_DEFINED__
    174 #define __IDXGISurface_FWD_DEFINED__
    175 typedef struct IDXGISurface IDXGISurface;
    176 #endif
    177 
    178 #ifndef __IDWriteTextFormat_FWD_DEFINED__
    179 #define __IDWriteTextFormat_FWD_DEFINED__
    180 typedef struct IDWriteTextFormat IDWriteTextFormat;
    181 #endif
    182 
    183 #ifndef __IDWriteTextLayout_FWD_DEFINED__
    184 #define __IDWriteTextLayout_FWD_DEFINED__
    185 typedef struct IDWriteTextLayout IDWriteTextLayout;
    186 #endif
    187 
    188 #ifndef __IDWriteFontFace_FWD_DEFINED__
    189 #define __IDWriteFontFace_FWD_DEFINED__
    190 typedef struct IDWriteFontFace IDWriteFontFace;
    191 #endif
    192 
    193 typedef enum _D2D1_ALPHA_MODE {
    194   D2D1_ALPHA_MODE_UNKNOWN         = 0,
    195   D2D1_ALPHA_MODE_PREMULTIPLIED   = 1,
    196   D2D1_ALPHA_MODE_STRAIGHT        = 2,
    197   D2D1_ALPHA_MODE_IGNORE          = 3
    198 } D2D1_ALPHA_MODE;
    199 
    200 typedef enum _D2D1_ANTIALIAS_MODE {
    201   D2D1_ANTIALIAS_MODE_PER_PRIMITIVE   = 0,
    202   D2D1_ANTIALIAS_MODE_ALIASED         = 1
    203 } D2D1_ANTIALIAS_MODE;
    204 
    205 typedef enum _D2D1_ARC_SIZE {
    206   D2D1_ARC_SIZE_SMALL   = 0,
    207   D2D1_ARC_SIZE_LARGE   = 1
    208 } D2D1_ARC_SIZE;
    209 
    210 typedef enum _D2D1_BITMAP_INTERPOLATION_MODE {
    211   D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR   = 0,
    212   D2D1_BITMAP_INTERPOLATION_MODE_LINEAR             = 1
    213 } D2D1_BITMAP_INTERPOLATION_MODE;
    214 
    215 typedef enum _D2D1_CAP_STYLE {
    216   D2D1_CAP_STYLE_FLAT       = 0,
    217   D2D1_CAP_STYLE_SQUARE     = 1,
    218   D2D1_CAP_STYLE_ROUND      = 2,
    219   D2D1_CAP_STYLE_TRIANGLE   = 3
    220 } D2D1_CAP_STYLE;
    221 
    222 typedef enum _D2D1_COMBINE_MODE {
    223   D2D1_COMBINE_MODE_UNION       = 0,
    224   D2D1_COMBINE_MODE_INTERSECT   = 1,
    225   D2D1_COMBINE_MODE_XOR         = 2,
    226   D2D1_COMBINE_MODE_EXCLUDE     = 3
    227 } D2D1_COMBINE_MODE;
    228 
    229 typedef enum _D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS {
    230   D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE             = 0x00000000,
    231   D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE   = 0x00000001
    232 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
    233 
    234 typedef enum _D2D1_DASH_STYLE {
    235   D2D1_DASH_STYLE_SOLID          = 0,
    236   D2D1_DASH_STYLE_DASH           = 1,
    237   D2D1_DASH_STYLE_DOT            = 2,
    238   D2D1_DASH_STYLE_DASH_DOT       = 3,
    239   D2D1_DASH_STYLE_DASH_DOT_DOT   = 4,
    240   D2D1_DASH_STYLE_CUSTOM         = 5
    241 } D2D1_DASH_STYLE;
    242 
    243 typedef enum _D2D1_DC_INITIALIZE_MODE {
    244   D2D1_DC_INITIALIZE_MODE_COPY    = 0,
    245   D2D1_DC_INITIALIZE_MODE_CLEAR   = 1
    246 } D2D1_DC_INITIALIZE_MODE;
    247 
    248 typedef enum _D2D1_DEBUG_LEVEL {
    249   D2D1_DEBUG_LEVEL_NONE          = 0,
    250   D2D1_DEBUG_LEVEL_ERROR         = 1,
    251   D2D1_DEBUG_LEVEL_WARNING       = 2,
    252   D2D1_DEBUG_LEVEL_INFORMATION   = 3
    253 } D2D1_DEBUG_LEVEL;
    254 
    255 typedef enum _D2D1_DRAW_TEXT_OPTIONS {
    256   D2D1_DRAW_TEXT_OPTIONS_NO_SNAP   = 0x00000001,
    257   D2D1_DRAW_TEXT_OPTIONS_CLIP      = 0x00000002,
    258   D2D1_DRAW_TEXT_OPTIONS_NONE      = 0x00000000
    259 } D2D1_DRAW_TEXT_OPTIONS;
    260 
    261 typedef enum _D2D1_EXTEND_MODE {
    262   D2D1_EXTEND_MODE_CLAMP    = 0,
    263   D2D1_EXTEND_MODE_WRAP     = 1,
    264   D2D1_EXTEND_MODE_MIRROR   = 2
    265 } D2D1_EXTEND_MODE;
    266 
    267 typedef enum _D2D1_FACTORY_TYPE {
    268   D2D1_FACTORY_TYPE_SINGLE_THREADED   = 0,
    269   D2D1_FACTORY_TYPE_MULTI_THREADED    = 1
    270 } D2D1_FACTORY_TYPE;
    271 
    272 typedef enum _D2D1_FEATURE_LEVEL {
    273   D2D1_FEATURE_LEVEL_DEFAULT   = 0,
    274   D2D1_FEATURE_LEVEL_9         = D3D10_FEATURE_LEVEL_9_1,
    275   D2D1_FEATURE_LEVEL_10        = D3D10_FEATURE_LEVEL_10_0
    276 } D2D1_FEATURE_LEVEL;
    277 
    278 typedef enum _D2D1_FIGURE_BEGIN {
    279   D2D1_FIGURE_BEGIN_FILLED   = 0,
    280   D2D1_FIGURE_BEGIN_HOLLOW   = 1
    281 } D2D1_FIGURE_BEGIN;
    282 
    283 typedef enum _D2D1_FIGURE_END {
    284   D2D1_FIGURE_END_OPEN     = 0,
    285   D2D1_FIGURE_END_CLOSED   = 1
    286 } D2D1_FIGURE_END;
    287 
    288 typedef enum _D2D1_FILL_MODE {
    289   D2D1_FILL_MODE_ALTERNATE   = 0,
    290   D2D1_FILL_MODE_WINDING     = 1
    291 } D2D1_FILL_MODE;
    292 
    293 typedef enum _D2D1_GAMMA {
    294   D2D1_GAMMA_2_2   = 0,
    295   D2D1_GAMMA_1_0   = 1
    296 } D2D1_GAMMA;
    297 
    298 typedef enum _D2D1_GEOMETRY_RELATION {
    299   D2D1_GEOMETRY_RELATION_UNKNOWN        = 0,
    300   D2D1_GEOMETRY_RELATION_DISJOINT       = 1,
    301   D2D1_GEOMETRY_RELATION_IS_CONTAINED   = 2,
    302   D2D1_GEOMETRY_RELATION_CONTAINS       = 3,
    303   D2D1_GEOMETRY_RELATION_OVERLAP        = 4
    304 } D2D1_GEOMETRY_RELATION;
    305 
    306 typedef enum _D2D1_GEOMETRY_SIMPLIFICATION_OPTION {
    307   D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES   = 0,
    308   D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES              = 1
    309 } D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
    310 
    311 typedef enum _D2D1_LAYER_OPTIONS {
    312   D2D1_LAYER_OPTIONS_NONE                       = 0x00000000,
    313   D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE   = 0x00000001
    314 } D2D1_LAYER_OPTIONS;
    315 
    316 typedef enum _D2D1_LINE_JOIN {
    317   D2D1_LINE_JOIN_MITER            = 0,
    318   D2D1_LINE_JOIN_BEVEL            = 1,
    319   D2D1_LINE_JOIN_ROUND            = 2,
    320   D2D1_LINE_JOIN_MITER_OR_BEVEL   = 3
    321 } D2D1_LINE_JOIN;
    322 
    323 typedef enum _D2D1_OPACITY_MASK_CONTENT {
    324   D2D1_OPACITY_MASK_CONTENT_GRAPHICS              = 0,
    325   D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL          = 1,
    326   D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE   = 2
    327 } D2D1_OPACITY_MASK_CONTENT;
    328 
    329 typedef enum _D2D1_PATH_SEGMENT {
    330   D2D1_PATH_SEGMENT_NONE                    = 0x00000000,
    331   D2D1_PATH_SEGMENT_FORCE_UNSTROKED         = 0x00000001,
    332   D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN   = 0x00000002
    333 } D2D1_PATH_SEGMENT;
    334 
    335 typedef enum _D2D1_PRESENT_OPTIONS {
    336   D2D1_PRESENT_OPTIONS_NONE              = 0x00000000,
    337   D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS   = 0x00000001,
    338   D2D1_PRESENT_OPTIONS_IMMEDIATELY       = 0x00000002
    339 } D2D1_PRESENT_OPTIONS;
    340 
    341 typedef enum _D2D1_RENDER_TARGET_TYPE {
    342   D2D1_RENDER_TARGET_TYPE_DEFAULT     = 0,
    343   D2D1_RENDER_TARGET_TYPE_SOFTWARE    = 1,
    344   D2D1_RENDER_TARGET_TYPE_HARDWARE    = 2
    345 } D2D1_RENDER_TARGET_TYPE;
    346 
    347 typedef enum _D2D1_RENDER_TARGET_USAGE {
    348   D2D1_RENDER_TARGET_USAGE_NONE                    = 0x00000000,
    349   D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING   = 0x00000001,
    350   D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE          = 0x00000002
    351 } D2D1_RENDER_TARGET_USAGE;
    352 
    353 typedef enum _D2D1_SWEEP_DIRECTION {
    354   D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE   = 0,
    355   D2D1_SWEEP_DIRECTION_CLOCKWISE           = 1
    356 } D2D1_SWEEP_DIRECTION;
    357 
    358 typedef enum _D2D1_TEXT_ANTIALIAS_MODE {
    359   D2D1_TEXT_ANTIALIAS_MODE_DEFAULT     = 0,
    360   D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE   = 1,
    361   D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE   = 2,
    362   D2D1_TEXT_ANTIALIAS_MODE_ALIASED     = 3
    363 } D2D1_TEXT_ANTIALIAS_MODE;
    364 
    365 typedef enum _D2D1_WINDOW_STATE {
    366   D2D1_WINDOW_STATE_NONE       = 0x0000000,
    367   D2D1_WINDOW_STATE_OCCLUDED   = 0x0000001
    368 } D2D1_WINDOW_STATE;
    369 
    370 /* this is a hack so we can use forward declares in C (easier than reordering interfaces) */
    371 #if !defined(__cplusplus)
    372 #undef DECLARE_INTERFACE
    373 #define DECLARE_INTERFACE(iface) struct iface { struct iface##Vtbl *lpVtbl; }; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl
    374 #endif
    375 
    376 /* interface forward declares */
    377 
    378 typedef _COM_interface ID2D1Bitmap ID2D1Bitmap;
    379 typedef _COM_interface ID2D1BitmapBrush ID2D1BitmapBrush;
    380 typedef _COM_interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget;
    381 typedef _COM_interface ID2D1Brush ID2D1Brush;
    382 typedef _COM_interface ID2D1DCRenderTarget ID2D1DCRenderTarget;
    383 typedef _COM_interface ID2D1DrawingStateBlock ID2D1DrawingStateBlock;
    384 typedef _COM_interface ID2D1EllipseGeometry ID2D1EllipseGeometry;
    385 typedef _COM_interface ID2D1Factory ID2D1Factory;
    386 typedef _COM_interface ID2D1GdiInteropRenderTarget ID2D1GdiInteropRenderTarget;
    387 typedef _COM_interface ID2D1Geometry ID2D1Geometry;
    388 typedef _COM_interface ID2D1GeometryGroup ID2D1GeometryGroup;
    389 typedef _COM_interface ID2D1GeometrySink ID2D1GeometrySink;
    390 typedef _COM_interface ID2D1GradientStopCollection ID2D1GradientStopCollection;
    391 typedef _COM_interface ID2D1HwndRenderTarget ID2D1HwndRenderTarget;
    392 typedef _COM_interface ID2D1Layer ID2D1Layer;
    393 typedef _COM_interface ID2D1LinearGradientBrush ID2D1LinearGradientBrush;
    394 typedef _COM_interface ID2D1Mesh ID2D1Mesh;
    395 typedef _COM_interface ID2D1PathGeometry ID2D1PathGeometry;
    396 typedef _COM_interface ID2D1RadialGradientBrush ID2D1RadialGradientBrush;
    397 typedef _COM_interface ID2D1RectangleGeometry ID2D1RectangleGeometry;
    398 typedef _COM_interface ID2D1RenderTarget ID2D1RenderTarget;
    399 typedef _COM_interface ID2D1Resource ID2D1Resource;
    400 typedef _COM_interface ID2D1RoundedRectangleGeometry ID2D1RoundedRectangleGeometry;
    401 typedef _COM_interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink;
    402 typedef _COM_interface ID2D1SolidColorBrush ID2D1SolidColorBrush;
    403 typedef _COM_interface ID2D1StrokeStyle ID2D1StrokeStyle;
    404 typedef _COM_interface ID2D1TessellationSink ID2D1TessellationSink;
    405 typedef _COM_interface ID2D1TransformedGeometry ID2D1TransformedGeometry;
    406 
    407 /* structures */
    408 
    409 typedef struct D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
    410 
    411 typedef struct D2D1_ARC_SEGMENT D2D1_ARC_SEGMENT;
    412 typedef struct D2D1_BEZIER_SEGMENT D2D1_BEZIER_SEGMENT;
    413 typedef struct D2D1_BITMAP_BRUSH_PROPERTIES D2D1_BITMAP_BRUSH_PROPERTIES;
    414 typedef struct D2D1_BITMAP_PROPERTIES D2D1_BITMAP_PROPERTIES;
    415 typedef struct D2D1_BRUSH_PROPERTIES D2D1_BRUSH_PROPERTIES;
    416 typedef struct D2D1_DRAWING_STATE_DESCRIPTION D2D1_DRAWING_STATE_DESCRIPTION;
    417 typedef struct D2D1_ELLIPSE D2D1_ELLIPSE;
    418 typedef struct D2D1_FACTORY_OPTIONS D2D1_FACTORY_OPTIONS;
    419 typedef struct D2D1_GRADIENT_STOP D2D1_GRADIENT_STOP;
    420 typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES D2D1_HWND_RENDER_TARGET_PROPERTIES;
    421 typedef struct D2D1_LAYER_PARAMETERS D2D1_LAYER_PARAMETERS;
    422 typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
    423 typedef struct D2D1_PIXEL_FORMAT D2D1_PIXEL_FORMAT;
    424 typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT D2D1_QUADRATIC_BEZIER_SEGMENT;
    425 typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
    426 typedef struct D2D1_RENDER_TARGET_PROPERTIES D2D1_RENDER_TARGET_PROPERTIES;
    427 typedef struct D2D1_ROUNDED_RECT D2D1_ROUNDED_RECT;
    428 typedef struct D2D1_STROKE_STYLE_PROPERTIES D2D1_STROKE_STYLE_PROPERTIES;
    429 typedef struct D2D1_TRIANGLE D2D1_TRIANGLE;
    430 
    431 struct D2D1_ARC_SEGMENT {
    432   D2D1_POINT_2F        point;
    433   D2D1_SIZE_F          size;
    434   FLOAT                rotationAngle;
    435   D2D1_SWEEP_DIRECTION sweepDirection;
    436   D2D1_ARC_SIZE        arcSize;
    437 };
    438 
    439 struct D2D1_BEZIER_SEGMENT {
    440   D2D1_POINT_2F point1;
    441   D2D1_POINT_2F point2;
    442   D2D1_POINT_2F point3;
    443 };
    444 
    445 struct D2D1_BITMAP_BRUSH_PROPERTIES {
    446   D2D1_EXTEND_MODE               extendModeX;
    447   D2D1_EXTEND_MODE               extendModeY;
    448   D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
    449 };
    450 
    451 struct D2D1_PIXEL_FORMAT {
    452   DXGI_FORMAT     format;
    453   D2D1_ALPHA_MODE alphaMode;
    454 };
    455 
    456 struct D2D1_BITMAP_PROPERTIES {
    457   D2D1_PIXEL_FORMAT pixelFormat;
    458   FLOAT             dpiX;
    459   FLOAT             dpiY;
    460 };
    461 
    462 struct D2D1_BRUSH_PROPERTIES {
    463   FLOAT             opacity;
    464   D2D1_MATRIX_3X2_F transform;
    465 };
    466 
    467 struct D2D1_DRAWING_STATE_DESCRIPTION {
    468   D2D1_ANTIALIAS_MODE      antialiasMode;
    469   D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
    470   D2D1_TAG                 tag1;
    471   D2D1_TAG                 tag2;
    472   D2D1_MATRIX_3X2_F        transform;
    473 };
    474 
    475 struct D2D1_ELLIPSE {
    476   D2D1_POINT_2F point;
    477   FLOAT         radiusX;
    478   FLOAT         radiusY;
    479 };
    480 
    481 struct D2D1_FACTORY_OPTIONS {
    482   D2D1_DEBUG_LEVEL debugLevel;
    483 };
    484 
    485 struct D2D1_GRADIENT_STOP {
    486   FLOAT        position;
    487   D2D1_COLOR_F color;
    488 };
    489 
    490 struct D2D1_HWND_RENDER_TARGET_PROPERTIES {
    491   HWND                 hwnd;
    492   D2D1_SIZE_U          pixelSize;
    493   D2D1_PRESENT_OPTIONS presentOptions;
    494 };
    495 
    496 struct D2D1_LAYER_PARAMETERS {
    497   D2D1_RECT_F         contentBounds;
    498   ID2D1Geometry       *geometricMask;
    499   D2D1_ANTIALIAS_MODE maskAntialiasMode;
    500   D2D1_MATRIX_3X2_F   maskTransform;
    501   FLOAT               opacity;
    502   ID2D1Brush          *opacityBrush;
    503   D2D1_LAYER_OPTIONS  layerOptions;
    504 };
    505 
    506 struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES {
    507   D2D1_POINT_2F startPoint;
    508   D2D1_POINT_2F endPoint;
    509 };
    510 
    511 struct D2D1_QUADRATIC_BEZIER_SEGMENT {
    512   D2D1_POINT_2F point1;
    513   D2D1_POINT_2F point2;
    514 };
    515 
    516 struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES {
    517   D2D1_POINT_2F center;
    518   D2D1_POINT_2F gradientOriginOffset;
    519   FLOAT         radiusX;
    520   FLOAT         radiusY;
    521 };
    522 
    523 struct D2D1_RENDER_TARGET_PROPERTIES {
    524   D2D1_RENDER_TARGET_TYPE  type;
    525   D2D1_PIXEL_FORMAT        pixelFormat;
    526   FLOAT                    dpiX;
    527   FLOAT                    dpiY;
    528   D2D1_RENDER_TARGET_USAGE usage;
    529   D2D1_FEATURE_LEVEL       minLevel;
    530 };
    531 
    532 struct D2D1_ROUNDED_RECT {
    533   D2D1_RECT_F rect;
    534   FLOAT       radiusX;
    535   FLOAT       radiusY;
    536 };
    537 
    538 struct D2D1_STROKE_STYLE_PROPERTIES {
    539   D2D1_CAP_STYLE  startCap;
    540   D2D1_CAP_STYLE  endCap;
    541   D2D1_CAP_STYLE  dashCap;
    542   D2D1_LINE_JOIN  lineJoin;
    543   FLOAT           miterLimit;
    544   D2D1_DASH_STYLE dashStyle;
    545   FLOAT           dashOffset;
    546 };
    547 
    548 struct D2D1_TRIANGLE {
    549   D2D1_POINT_2F point1;
    550   D2D1_POINT_2F point2;
    551   D2D1_POINT_2F point3;
    552 };
    553 
    554 /* interfaces */
    555 
    556 /**
    557  * Header generated from msdn for the purposes of allowing
    558  * 3rd party compiler compatibility with the Microsoft API
    559  */
    560 DEFINE_GUID(IID_ID2D1Resource, 0x2cd90691,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
    561 
    562 #ifndef D2D_USE_C_DEFINITIONS
    563 
    564 interface ID2D1Resource : public IUnknown {
    565     STDMETHOD_(void, GetFactory)(ID2D1Factory **factory) const PURE;
    566 };
    567 
    568 #else
    569 
    570 typedef struct ID2D1ResourceVtbl {
    571     IUnknownVtbl Base;
    572 
    573     STDMETHOD_(void, GetFactory)(ID2D1Resource *This, ID2D1Factory **factory) PURE;
    574 } ID2D1ResourceVtbl;
    575 
    576 interface ID2D1Resource {
    577     const ID2D1ResourceVtbl *lpVtbl;
    578 };
    579 
    580 #define ID2D1Resource_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown*)this,A,B)
    581 #define ID2D1Resource_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown*)this)
    582 #define ID2D1Resource_Release(this) (this)->lpVtbl->Base.Release((IUnknown*)this)
    583 #define ID2D1Resource_GetFactory(this,A) (this)->lpVtbl->GetFactory(this,A)
    584 
    585 #endif
    586 
    587 DEFINE_GUID(IID_ID2D1Brush, 0x2cd906a8,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
    588 
    589 #ifndef D2D_USE_C_DEFINITIONS
    590 
    591 interface ID2D1Brush : public ID2D1Resource {
    592     STDMETHOD_(void, SetOpacity)(FLOAT opacity) PURE;
    593     STDMETHOD_(void, SetTransform)(const D2D1_MATRIX_3X2_F *transform) PURE;
    594     STDMETHOD_(FLOAT, GetOpacity)(void) const PURE;
    595     STDMETHOD_(void, GetTransform)(D2D1_MATRIX_3X2_F *transform) const PURE;
    596 
    597     void SetTransform(const D2D1_MATRIX_3X2_F &transform) {
    598         SetTransform(&transform);
    599     }
    600 };
    601 
    602 #else
    603 
    604 typedef struct ID2D1BrushVtbl {
    605     ID2D1ResourceVtbl Base;
    606 
    607     STDMETHOD_(void, SetOpacity)(ID2D1Brush *This, FLOAT opacity) PURE;
    608     STDMETHOD_(void, SetTransform)(ID2D1Brush *This, const D2D1_MATRIX_3X2_F *transform) PURE;
    609     STDMETHOD_(FLOAT, GetOpacity)(ID2D1Brush *This) PURE;
    610     STDMETHOD_(void, GetTransform)(ID2D1Brush *This, D2D1_MATRIX_3X2_F *transform) PURE;
    611 } ID2D1BrushVtbl;
    612 
    613 interface ID2D1Brush {
    614     const ID2D1BrushVtbl *lpVtbl;
    615 };
    616 
    617 #define ID2D1Brush_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
    618 #define ID2D1Brush_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
    619 #define ID2D1Brush_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
    620 #define ID2D1Brush_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
    621 #define ID2D1Brush_SetOpacity(this,A) (this)->lpVtbl->SetOpacity(this,A)
    622 #define ID2D1Brush_SetTransform(this,A) (this)->lpVtbl->SetTransform(this,A)
    623 #define ID2D1Brush_GetOpacity(this) (this)->lpVtbl->GetOpacity(this)
    624 #define ID2D1Brush_GetTransform(this,A) (this)->lpVtbl->GetTransform(this,A)
    625 
    626 #endif
    627 
    628 DEFINE_GUID(IID_ID2D1Bitmap, 0xa2296057,0xea42,0x4099,0x98,0x3b,0x53,0x9f,0xb6,0x50,0x54,0x26);
    629 
    630 #ifndef D2D_USE_C_DEFINITIONS
    631 
    632 interface ID2D1Bitmap : public ID2D1Resource {
    633     STDMETHOD_(D2D1_SIZE_F, GetSize)(void) const PURE;
    634     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(void) const PURE;
    635     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(void) const PURE;
    636     STDMETHOD_(void, GetDpi)(FLOAT *dpiX, FLOAT *dpiY) const PURE;
    637     STDMETHOD(CopyFromBitmap)(const D2D1_POINT_2U *destPoint, ID2D1Bitmap *bitmap, const D2D1_RECT_U *srcRect) PURE;
    638     STDMETHOD(CopyFromRenderTarget)(const D2D1_POINT_2U *destPoint, ID2D1RenderTarget *renderTarget, const D2D1_RECT_U *srcRect) PURE;
    639     STDMETHOD(CopyFromMemory)(const D2D1_RECT_U *dstRect, const void *srcData, UINT32 pitch) PURE;
    640 };
    641 
    642 #else
    643 
    644 typedef struct ID2D1BitmapVtbl {
    645     ID2D1ResourceVtbl Base;
    646 
    647     STDMETHOD_(D2D1_SIZE_F, GetSize)(ID2D1Bitmap *This) PURE;
    648     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(ID2D1Bitmap *This) PURE;
    649     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(ID2D1Bitmap *This) PURE;
    650     STDMETHOD_(void, GetDpi)(ID2D1Bitmap *This, FLOAT *dpiX, FLOAT *dpiY) PURE;
    651     STDMETHOD(CopyFromBitmap)(ID2D1Bitmap *This, const D2D1_POINT_2U *destPoint, ID2D1Bitmap *bitmap, const D2D1_RECT_U *srcRect) PURE;
    652     STDMETHOD(CopyFromRenderTarget)(ID2D1Bitmap *This, const D2D1_POINT_2U *destPoint, ID2D1RenderTarget *renderTarget, const D2D1_RECT_U *srcRect) PURE;
    653     STDMETHOD(CopyFromMemory)(ID2D1Bitmap *This, const D2D1_RECT_U *dstRect, const void *srcData, UINT32 pitch) PURE;
    654 } ID2D1BitmapVtbl;
    655 
    656 interface ID2D1Bitmap {
    657     const ID2D1BitmapVtbl *lpVtbl;
    658 };
    659 
    660 #define ID2D1Bitmap_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnkwnown*)this,A,B)
    661 #define ID2D1Bitmap_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
    662 #define ID2D1Bitmap_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
    663 #define ID2D1Bitmap_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
    664 #define ID2D1Bitmap_GetSize(this) (this)->lpVtbl->GetSize(this)
    665 #define ID2D1Bitmap_GetPixelSize(this) (this)->lpVtbl->GetPixelSize(this)
    666 #define ID2D1Bitmap_GetPixelFormat(this) (this)->lpVtbl->GetPixelFormat(this)
    667 #define ID2D1Bitmap_GetDpi(this,A,B) (this)->lpVtbl->GetDpi(this,A,B)
    668 #define ID2D1Bitmap_CopyFromBitmap(this,A,B,C) (this)->lpVtbl->CopyFromBitmap(this,A,B,C)
    669 #define ID2D1Bitmap_CopyFromRenderTarget(this,A,B,C) (this)->lpVtbl->CopyFromRenderTarget(this,A,B,C)
    670 #define ID2D1Bitmap_CopyFromMemory(this,A,B,C) (this)->lpVtbl->CopyFromMemory(this,A,B,C)
    671 
    672 #endif
    673 
    674 DEFINE_GUID(IID_ID2D1BitmapBrush, 0x2cd906aa,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
    675 
    676 #ifndef D2D_USE_C_DEFINITIONS
    677 
    678 interface ID2D1BitmapBrush : public ID2D1Brush {
    679     STDMETHOD_(void, SetExtendModeX)(D2D1_EXTEND_MODE extendModeX) PURE;
    680     STDMETHOD_(void, SetExtendModeY)(D2D1_EXTEND_MODE extendModeY) PURE;
    681     STDMETHOD_(void, SetInterpolationMode)(D2D1_BITMAP_INTERPOLATION_MODE interpolationMode) PURE;
    682     STDMETHOD_(void, SetBitmap)(ID2D1Bitmap *bitmap) PURE;
    683     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)(void) const PURE;
    684     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)(void) const PURE;
    685     STDMETHOD_(D2D1_BITMAP_INTERPOLATION_MODE, GetInterpolationMode)(void) const PURE;
    686     STDMETHOD_(void, GetBitmap)(ID2D1Bitmap **bitmap) const PURE;
    687 };
    688 
    689 #else
    690 
    691 typedef struct ID2D1BitmapBrushVtbl {
    692     ID2D1BrushVtbl Base;
    693 
    694     STDMETHOD_(void, SetExtendModeX)(ID2D1BitmapBrush *This, D2D1_EXTEND_MODE extendModeX) PURE;
    695     STDMETHOD_(void, SetExtendModeY)(ID2D1BitmapBrush *This, D2D1_EXTEND_MODE extendModeY) PURE;
    696     STDMETHOD_(void, SetInterpolationMode)(ID2D1BitmapBrush *This, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode) PURE;
    697     STDMETHOD_(void, SetBitmap)(ID2D1BitmapBrush *This, ID2D1Bitmap *bitmap) PURE;
    698     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)(ID2D1BitmapBrush *This) PURE;
    699     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)(ID2D1BitmapBrush *This) PURE;
    700     STDMETHOD_(D2D1_BITMAP_INTERPOLATION_MODE, GetInterpolationMode)(ID2D1BitmapBrush *This) PURE;
    701     STDMETHOD_(void, GetBitmap)(ID2D1BitmapBrush *This, ID2D1Bitmap **bitmap) PURE;
    702 } ID2D1BitmapBrushVtbl;
    703 
    704 interface ID2D1BitmapBrush {
    705     const ID2D1BitmapBrushVtbl *lpVtbl;
    706 };
    707 
    708 #define ID2D1BitmapBrush_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnkwnown*)this,A,B)
    709 #define ID2D1BitmapBrush_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
    710 #define ID2D1BitmapBrush_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
    711 #define ID2D1BitmapBrush_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
    712 #define ID2D1BitmapBrush_SetOpacity(this,A) (this)->lpVtbl->Base.SetOpacity((ID2D1Brush*)this,A)
    713 #define ID2D1BitmapBrush_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform((ID2D1Brush*)this,A)
    714 #define ID2D1BitmapBrush_GetOpacity(this) (this)->lpVtbl->Base.GetOpacity((ID2D1Brush*)this)
    715 #define ID2D1BitmapBrush_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform((ID2D1Brush*)this,A)
    716 #define ID2D1BitmapBrush_SetExtendModeX(this,A) (this)->lpVtbl->SetExtendModeX(this,A)
    717 #define ID2D1BitmapBrush_SetExtendModeY(this,A) (this)->lpVtbl->SetExtendModeY(this,A)
    718 #define ID2D1BitmapBrush_SetInterpolationMode(this,A) (this)->lpVtbl->SetInterpolationMode(this,A)
    719 #define ID2D1BitmapBrush_SetBitmap(this,A) (this)->lpVtbl->SetBitmap(this,A)
    720 #define ID2D1BitmapBrush_GetExtendModeX(this) (this)->lpVtbl->GetExtendModeX(this)
    721 #define ID2D1BitmapBrush_GetExtendModeY(this) (this)->lpVtbl->GetExtendModeY(this)
    722 #define ID2D1BitmapBrush_GetInterpolationMode(this) (this)->lpVtbl->GetInterpolationMode(this)
    723 #define ID2D1BitmapBrush_GetBitmap(this,A) (this)->lpVtbl->GetBitmap(this,A)
    724 
    725 #endif
    726 
    727 DEFINE_GUID(IID_ID2D1RenderTarget, 0x2cd90694,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
    728 
    729 #ifndef D2D_USE_C_DEFINITIONS
    730 
    731 interface ID2D1RenderTarget : public ID2D1Resource {
    732     STDMETHOD(CreateBitmap)(D2D1_SIZE_U size, const void *srcData, UINT32 pitch, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    733     STDMETHOD(CreateBitmapFromWicBitmap)(IWICBitmapSource *wicBitmapSource, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    734     STDMETHOD(CreateSharedBitmap)(REFIID riid, void *data, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    735     STDMETHOD(CreateBitmapBrush)(ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1BitmapBrush **bitmapBrush) PURE;
    736     STDMETHOD(CreateSolidColorBrush)(const D2D1_COLOR_F *color, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1SolidColorBrush **solidColorBrush) PURE;
    737     STDMETHOD(CreateGradientStopCollection)(const D2D1_GRADIENT_STOP *gradientStops, UINT gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection **gradientStopCollection) PURE;
    738     STDMETHOD(CreateLinearGradientBrush)(const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1LinearGradientBrush **linearGradientBrush) PURE;
    739     STDMETHOD(CreateRadialGradientBrush)(const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1RadialGradientBrush **radialGradientBrush) PURE;
    740     STDMETHOD(CreateCompatibleRenderTarget)(const D2D1_SIZE_F *desiredSize, const D2D1_SIZE_U *desiredPixelSize, const D2D1_PIXEL_FORMAT *desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget **bitmapRenderTarget) PURE;
    741     STDMETHOD(CreateLayer)(const D2D1_SIZE_F *size, ID2D1Layer **layer) PURE;
    742     STDMETHOD(CreateMesh)(ID2D1Mesh **mesh) PURE;
    743     STDMETHOD_(void, DrawLine)(D2D1_POINT_2F point0, D2D1_POINT_2F point1, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) PURE;
    744     STDMETHOD_(void, DrawRectangle)(const D2D1_RECT_F *rect, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) PURE;
    745     STDMETHOD_(void, FillRectangle)(const D2D1_RECT_F *rect, ID2D1Brush *brush) PURE;
    746     STDMETHOD_(void, DrawRoundedRectangle)(const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) PURE;
    747     STDMETHOD_(void, FillRoundedRectangle)(const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush) PURE;
    748     STDMETHOD_(void, DrawEllipse)(const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) PURE;
    749     STDMETHOD_(void, FillEllipse)(const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush) PURE;
    750     STDMETHOD_(void, DrawGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) PURE;
    751     STDMETHOD_(void, FillGeometry)(ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush = NULL) PURE;
    752     STDMETHOD_(void, FillMesh)(ID2D1Mesh *mesh, ID2D1Brush *brush) PURE;
    753     STDMETHOD_(void, FillOpacityMask)(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F *destinationRectangle = NULL, const D2D1_RECT_F *sourceRectangle = NULL) PURE;
    754     STDMETHOD_(void, DrawBitmap)(ID2D1Bitmap *bitmap, const D2D1_RECT_F *destinationRectangle = NULL, FLOAT opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, const D2D1_RECT_F *sourceRectangle = NULL) PURE;
    755     STDMETHOD_(void, DrawText)(const WCHAR *string, UINT stringLength, IDWriteTextFormat *textFormat, const D2D1_RECT_F *layoutRect, ID2D1Brush *defaultForegroundBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) PURE;
    756     STDMETHOD_(void, DrawTextLayout)(D2D1_POINT_2F origin, IDWriteTextLayout *textLayout, ID2D1Brush *defaultForegroundBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE) PURE;
    757     STDMETHOD_(void, DrawGlyphRun)(D2D1_POINT_2F baselineOrigin, CONST DWRITE_GLYPH_RUN *glyphRun, ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) PURE;
    758     STDMETHOD_(void, SetTransform)(const D2D1_MATRIX_3X2_F *transform) PURE;
    759     STDMETHOD_(void, GetTransform)(D2D1_MATRIX_3X2_F *transform) const PURE;
    760     STDMETHOD_(void, SetAntialiasMode)(D2D1_ANTIALIAS_MODE antialiasMode) PURE;
    761     STDMETHOD_(D2D1_ANTIALIAS_MODE, GetAntialiasMode)(void) const PURE;
    762     STDMETHOD_(void, SetTextAntialiasMode)(D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) PURE;
    763     STDMETHOD_(D2D1_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)(void) const PURE;
    764     STDMETHOD_(void, SetTextRenderingParams)(IDWriteRenderingParams *textRenderingParams = NULL) PURE;
    765     STDMETHOD_(void, GetTextRenderingParams)(IDWriteRenderingParams **textRenderingParams) const PURE;
    766     STDMETHOD_(void, SetTags)(D2D1_TAG tag1, D2D1_TAG tag2) PURE;
    767     STDMETHOD_(void, GetTags)(D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL) const PURE;
    768     STDMETHOD_(void, PushLayer)(const D2D1_LAYER_PARAMETERS *layerParameters, ID2D1Layer *layer) PURE;
    769     STDMETHOD_(void, PopLayer)(void) PURE;
    770     STDMETHOD(Flush)(D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL) PURE;
    771     STDMETHOD_(void, SaveDrawingState)(ID2D1DrawingStateBlock *drawingStateBlock) const PURE;
    772     STDMETHOD_(void, RestoreDrawingState)(ID2D1DrawingStateBlock *drawingStateBlock) PURE;
    773     STDMETHOD_(void, PushAxisAlignedClip)(const D2D1_RECT_F *clipRect, D2D1_ANTIALIAS_MODE antialiasMode) PURE;
    774     STDMETHOD_(void, PopAxisAlignedClip)(void) PURE;
    775     STDMETHOD_(void, Clear)(const D2D1_COLOR_F *clearColor = NULL) PURE;
    776     STDMETHOD_(void, BeginDraw)(void) PURE;
    777     STDMETHOD(EndDraw)(D2D1_TAG *tag1 = NULL, D2D1_TAG *tag2 = NULL) PURE;
    778     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(void) const PURE;
    779     STDMETHOD_(void, SetDpi)(FLOAT dpiX, FLOAT dpiY) PURE;
    780     STDMETHOD_(void, GetDpi)(FLOAT *dpiX, FLOAT *dpiY) const PURE;
    781     STDMETHOD_(D2D1_SIZE_F, GetSize)(void) const PURE;
    782     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(void) const PURE;
    783     STDMETHOD_(UINT32, GetMaximumBitmapSize)(void) const PURE;
    784     STDMETHOD_(BOOL, IsSupported)(const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) const PURE;
    785 
    786     HRESULT CreateBitmap(D2D1_SIZE_U size, const void *srcData, UINT32 pitch, const D2D1_BITMAP_PROPERTIES &bitmapProperties, ID2D1Bitmap **bitmap) {
    787         return CreateBitmap(size, srcData, pitch, &bitmapProperties, bitmap);
    788     }
    789 
    790     HRESULT CreateBitmap(D2D1_SIZE_U size, const D2D1_BITMAP_PROPERTIES &bitmapProperties, ID2D1Bitmap **bitmap) {
    791         return CreateBitmap(size, NULL, 0, &bitmapProperties, bitmap);
    792     }
    793 
    794     HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, const D2D1_BITMAP_PROPERTIES &bitmapProperties, ID2D1Bitmap **bitmap) {
    795         return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap);
    796     }
    797 
    798     HRESULT CreateBitmapFromWicBitmap(IWICBitmapSource *wicBitmapSource, ID2D1Bitmap **bitmap) {
    799         return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap);
    800     }
    801 
    802     HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, ID2D1BitmapBrush **bitmapBrush) {
    803         return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush);
    804     }
    805 
    806     HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties, ID2D1BitmapBrush **bitmapBrush) {
    807         return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush);
    808     }
    809 
    810     HRESULT CreateBitmapBrush(ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties, const D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1BitmapBrush **bitmapBrush) {
    811         return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush);
    812     }
    813 
    814     HRESULT CreateSolidColorBrush(const D2D1_COLOR_F &color, ID2D1SolidColorBrush **solidColorBrush) {
    815         return CreateSolidColorBrush(&color, NULL, solidColorBrush);
    816     }
    817 
    818     HRESULT CreateSolidColorBrush(const D2D1_COLOR_F &color, const D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1SolidColorBrush **solidColorBrush) {
    819         return CreateSolidColorBrush(&color, &brushProperties, solidColorBrush);
    820     }
    821 
    822     HRESULT CreateGradientStopCollection(const D2D1_GRADIENT_STOP *gradientStops, UINT gradientStopsCount, ID2D1GradientStopCollection **gradientStopCollection) {
    823         return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection);
    824     }
    825 
    826     HRESULT CreateLinearGradientBrush(const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1LinearGradientBrush **linearGradientBrush) {
    827         return CreateLinearGradientBrush(&linearGradientBrushProperties, NULL, gradientStopCollection, linearGradientBrush);
    828     }
    829 
    830     HRESULT CreateLinearGradientBrush(const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties, const D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1LinearGradientBrush **linearGradientBrush) {
    831         return CreateLinearGradientBrush(&linearGradientBrushProperties, &brushProperties, gradientStopCollection, linearGradientBrush);
    832     }
    833 
    834     HRESULT CreateRadialGradientBrush(const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1RadialGradientBrush **radialGradientBrush) {
    835         return CreateRadialGradientBrush(&radialGradientBrushProperties, NULL, gradientStopCollection, radialGradientBrush);
    836     }
    837 
    838     HRESULT CreateRadialGradientBrush(const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties, const D2D1_BRUSH_PROPERTIES &brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1RadialGradientBrush **radialGradientBrush) {
    839         return CreateRadialGradientBrush(&radialGradientBrushProperties, &brushProperties, gradientStopCollection, radialGradientBrush);
    840     }
    841 
    842     HRESULT CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget **bitmapRenderTarget) {
    843         return CreateCompatibleRenderTarget(NULL, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
    844     }
    845 
    846     HRESULT CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize, ID2D1BitmapRenderTarget **bitmapRenderTarget) {
    847         return CreateCompatibleRenderTarget(&desiredSize, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
    848     }
    849 
    850     HRESULT CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize, D2D1_SIZE_U desiredPixelSize, ID2D1BitmapRenderTarget **bitmapRenderTarget){
    851         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
    852     }
    853 
    854     HRESULT CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize, D2D1_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, ID2D1BitmapRenderTarget **bitmapRenderTarget) {
    855         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
    856     }
    857 
    858     HRESULT CreateCompatibleRenderTarget(D2D1_SIZE_F desiredSize, D2D1_SIZE_U desiredPixelSize, D2D1_PIXEL_FORMAT desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget **bitmapRenderTarget) {
    859         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget);
    860     }
    861 
    862     HRESULT CreateLayer(D2D1_SIZE_F size, ID2D1Layer **layer) {
    863         return CreateLayer(&size, layer);
    864     }
    865 
    866     HRESULT CreateLayer(ID2D1Layer **layer) {
    867         return CreateLayer(NULL, layer);
    868     }
    869 
    870     void DrawRectangle(const D2D1_RECT_F &rect, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) {
    871         DrawRectangle(&rect, brush, strokeWidth, strokeStyle);
    872     }
    873 
    874     void FillRectangle(const D2D1_RECT_F &rect, ID2D1Brush *brush) {
    875         FillRectangle(&rect, brush);
    876     }
    877 
    878     void DrawRoundedRectangle(const D2D1_ROUNDED_RECT &roundedRect, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) {
    879         DrawRoundedRectangle(&roundedRect, brush, strokeWidth, strokeStyle);
    880     }
    881 
    882     void FillRoundedRectangle(const D2D1_ROUNDED_RECT &roundedRect, ID2D1Brush *brush) {
    883         FillRoundedRectangle(&roundedRect, brush);
    884     }
    885 
    886     void DrawEllipse(const D2D1_ELLIPSE &ellipse, ID2D1Brush *brush, FLOAT strokeWidth = 1.0f, ID2D1StrokeStyle *strokeStyle = NULL) {
    887         DrawEllipse(&ellipse, brush, strokeWidth, strokeStyle);
    888     }
    889 
    890     void FillEllipse(const D2D1_ELLIPSE &ellipse, ID2D1Brush *brush) {
    891         FillEllipse(&ellipse, brush);
    892     }
    893 
    894     void FillOpacityMask(ID2D1Bitmap *opacityMask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F &destinationRectangle, const D2D1_RECT_F &sourceRectangle) {
    895         FillOpacityMask(opacityMask, brush, content, &destinationRectangle, &sourceRectangle);
    896     }
    897 
    898     void DrawBitmap(ID2D1Bitmap *bitmap, const D2D1_RECT_F &destinationRectangle, FLOAT opacity = 1.0f, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, const D2D1_RECT_F *sourceRectangle = NULL) {
    899         DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle);
    900     }
    901 
    902     void DrawBitmap(ID2D1Bitmap *bitmap, const D2D1_RECT_F &destinationRectangle, FLOAT opacity, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, const D2D1_RECT_F &sourceRectangle) {
    903         DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle);
    904     }
    905 
    906     void SetTransform(const D2D1_MATRIX_3X2_F &transform) {
    907         SetTransform(&transform);
    908     }
    909 
    910     void PushLayer(const D2D1_LAYER_PARAMETERS &layerParameters, ID2D1Layer *layer) {
    911         PushLayer(&layerParameters, layer);
    912     }
    913 
    914     void PushAxisAlignedClip(const D2D1_RECT_F &clipRect, D2D1_ANTIALIAS_MODE antialiasMode) {
    915         return PushAxisAlignedClip(&clipRect, antialiasMode);
    916     }
    917 
    918     void Clear(const D2D1_COLOR_F &clearColor) {
    919         return Clear(&clearColor);
    920     }
    921 
    922     void DrawText(const WCHAR *string, UINT stringLength, IDWriteTextFormat *textFormat, const D2D1_RECT_F &layoutRect, ID2D1Brush *defaultForegroundBrush, D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE, DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL) {
    923         return DrawText(string, stringLength, textFormat, &layoutRect, defaultForegroundBrush, options, measuringMode);
    924     }
    925 
    926     BOOL IsSupported(const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties) const {
    927         return IsSupported(&renderTargetProperties);
    928     }
    929 };
    930 
    931 #else
    932 
    933 typedef struct ID2D1RenderTargetVtbl {
    934     ID2D1ResourceVtbl Base;
    935 
    936     STDMETHOD(CreateBitmap)(ID2D1RenderTarget *This, D2D1_SIZE_U size, const void *srcData, UINT32 pitch, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    937     STDMETHOD(CreateBitmapFromWicBitmap)(ID2D1RenderTarget *This, IWICBitmapSource *wicBitmapSource, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    938     STDMETHOD(CreateSharedBitmap)(ID2D1RenderTarget *This, REFIID riid, void *data, const D2D1_BITMAP_PROPERTIES *bitmapProperties, ID2D1Bitmap **bitmap) PURE;
    939     STDMETHOD(CreateBitmapBrush)(ID2D1RenderTarget *This, ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1BitmapBrush **bitmapBrush) PURE;
    940     STDMETHOD(CreateSolidColorBrush)(ID2D1RenderTarget *This, const D2D1_COLOR_F *color, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1SolidColorBrush **solidColorBrush) PURE;
    941     STDMETHOD(CreateGradientStopCollection)(ID2D1RenderTarget *This, const D2D1_GRADIENT_STOP *gradientStops, UINT gradientStopsCount, D2D1_GAMMA colorInterpolationGamma, D2D1_EXTEND_MODE extendMode, ID2D1GradientStopCollection **gradientStopCollection) PURE;
    942     STDMETHOD(CreateLinearGradientBrush)(ID2D1RenderTarget *This, const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1LinearGradientBrush **linearGradientBrush) PURE;
    943     STDMETHOD(CreateRadialGradientBrush)(ID2D1RenderTarget *This, const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties, const D2D1_BRUSH_PROPERTIES *brushProperties, ID2D1GradientStopCollection *gradientStopCollection, ID2D1RadialGradientBrush **radialGradientBrush) PURE;
    944     STDMETHOD(CreateCompatibleRenderTarget)(ID2D1RenderTarget *This, const D2D1_SIZE_F *desiredSize, const D2D1_SIZE_U *desiredPixelSize, const D2D1_PIXEL_FORMAT *desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget **bitmapRenderTarget) PURE;
    945     STDMETHOD(CreateLayer)(ID2D1RenderTarget *This, const D2D1_SIZE_F *size, ID2D1Layer **layer) PURE;
    946     STDMETHOD(CreateMesh)(ID2D1RenderTarget *This, ID2D1Mesh **mesh) PURE;
    947     STDMETHOD_(void, DrawLine)(ID2D1RenderTarget *This, D2D1_POINT_2F point0, D2D1_POINT_2F point1, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
    948     STDMETHOD_(void, DrawRectangle)(ID2D1RenderTarget *This, const D2D1_RECT_F *rect, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
    949     STDMETHOD_(void, FillRectangle)(ID2D1RenderTarget *This, const D2D1_RECT_F *rect, ID2D1Brush *brush) PURE;
    950     STDMETHOD_(void, DrawRoundedRectangle)(ID2D1RenderTarget *This, const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
    951     STDMETHOD_(void, FillRoundedRectangle)(ID2D1RenderTarget *This, const D2D1_ROUNDED_RECT *roundedRect, ID2D1Brush *brush) PURE;
    952     STDMETHOD_(void, DrawEllipse)(ID2D1RenderTarget *This, const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
    953     STDMETHOD_(void, FillEllipse)(ID2D1RenderTarget *This, const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush) PURE;
    954     STDMETHOD_(void, DrawGeometry)(ID2D1RenderTarget *This, ID2D1Geometry *geometry, ID2D1Brush *brush, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle) PURE;
    955     STDMETHOD_(void, FillGeometry)(ID2D1RenderTarget *This, ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacityBrush) PURE;
    956     STDMETHOD_(void, FillMesh)(ID2D1RenderTarget *This, ID2D1Mesh *mesh, ID2D1Brush *brush) PURE;
    957     STDMETHOD_(void, FillOpacityMask)(ID2D1RenderTarget *This, ID2D1Bitmap *opacityMask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F *destinationRectangle, const D2D1_RECT_F *sourceRectangle) PURE;
    958     STDMETHOD_(void, DrawBitmap)(ID2D1RenderTarget *This, ID2D1Bitmap *bitmap, const D2D1_RECT_F *destinationRectangle, FLOAT opacity, D2D1_BITMAP_INTERPOLATION_MODE interpolationMode, const D2D1_RECT_F *sourceRectangle) PURE;
    959     STDMETHOD_(void, DrawText)(ID2D1RenderTarget *This, const WCHAR *string, UINT stringLength, IDWriteTextFormat *textFormat, const D2D1_RECT_F *layoutRect, ID2D1Brush *defaultForegroundBrush, D2D1_DRAW_TEXT_OPTIONS options, DWRITE_MEASURING_MODE measuringMode) PURE;
    960     STDMETHOD_(void, DrawTextLayout)(ID2D1RenderTarget *This, D2D1_POINT_2F origin, IDWriteTextLayout *textLayout, ID2D1Brush *defaultForegroundBrush, D2D1_DRAW_TEXT_OPTIONS options) PURE;
    961     STDMETHOD_(void, DrawGlyphRun)(ID2D1RenderTarget *This, D2D1_POINT_2F baselineOrigin, const DWRITE_GLYPH_RUN *glyphRun, ID2D1Brush *foregroundBrush, DWRITE_MEASURING_MODE measuringMode) PURE;
    962     STDMETHOD_(void, SetTransform)(ID2D1RenderTarget *This, const D2D1_MATRIX_3X2_F *transform) PURE;
    963     STDMETHOD_(void, GetTransform)(ID2D1RenderTarget *This, D2D1_MATRIX_3X2_F *transform) PURE;
    964     STDMETHOD_(void, SetAntialiasMode)(ID2D1RenderTarget *This, D2D1_ANTIALIAS_MODE antialiasMode) PURE;
    965     STDMETHOD_(D2D1_ANTIALIAS_MODE, GetAntialiasMode)(ID2D1RenderTarget *This) PURE;
    966     STDMETHOD_(void, SetTextAntialiasMode)(ID2D1RenderTarget *This, D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) PURE;
    967     STDMETHOD_(D2D1_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)(ID2D1RenderTarget *This) PURE;
    968     STDMETHOD_(void, SetTextRenderingParams)(ID2D1RenderTarget *This, IDWriteRenderingParams *textRenderingParams) PURE;
    969     STDMETHOD_(void, GetTextRenderingParams)(ID2D1RenderTarget *This, IDWriteRenderingParams **textRenderingParams) PURE;
    970     STDMETHOD_(void, SetTags)(ID2D1RenderTarget *This, D2D1_TAG tag1, D2D1_TAG tag2) PURE;
    971     STDMETHOD_(void, GetTags)(ID2D1RenderTarget *This, D2D1_TAG *tag1, D2D1_TAG *tag2) PURE;
    972     STDMETHOD_(void, PushLayer)(ID2D1RenderTarget *This, const D2D1_LAYER_PARAMETERS *layerParameters, ID2D1Layer *layer) PURE;
    973     STDMETHOD_(void, PopLayer)(ID2D1RenderTarget *This) PURE;
    974     STDMETHOD(Flush)(ID2D1RenderTarget *This, D2D1_TAG *tag1, D2D1_TAG *tag2) PURE;
    975     STDMETHOD_(void, SaveDrawingState)(ID2D1RenderTarget *This, ID2D1DrawingStateBlock *drawingStateBlock) PURE;
    976     STDMETHOD_(void, RestoreDrawingState)(ID2D1RenderTarget *This, ID2D1DrawingStateBlock *drawingStateBlock) PURE;
    977     STDMETHOD_(void, PushAxisAlignedClip)(ID2D1RenderTarget *This, const D2D1_RECT_F *clipRect, D2D1_ANTIALIAS_MODE antialiasMode) PURE;
    978     STDMETHOD_(void, PopAxisAlignedClip)(ID2D1RenderTarget *This) PURE;
    979     STDMETHOD_(void, Clear)(ID2D1RenderTarget *This, const D2D1_COLOR_F *clearColor) PURE;
    980     STDMETHOD_(void, BeginDraw)(ID2D1RenderTarget *This) PURE;
    981     STDMETHOD(EndDraw)(ID2D1RenderTarget *This, D2D1_TAG *tag1, D2D1_TAG *tag2) PURE;
    982     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(ID2D1RenderTarget *This) PURE;
    983     STDMETHOD_(void, SetDpi)(ID2D1RenderTarget *This, FLOAT dpiX, FLOAT dpiY) PURE;
    984     STDMETHOD_(void, GetDpi)(ID2D1RenderTarget *This, FLOAT *dpiX, FLOAT *dpiY) PURE;
    985     STDMETHOD_(D2D1_SIZE_F, GetSize)(ID2D1RenderTarget *This) PURE;
    986     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(ID2D1RenderTarget *This) PURE;
    987     STDMETHOD_(UINT32, GetMaximumBitmapSize)(ID2D1RenderTarget *This) PURE;
    988     STDMETHOD_(BOOL, IsSupported)(ID2D1RenderTarget *This, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties) PURE;
    989 } ID2D1RenderTargetVtbl;
    990 
    991 interface ID2D1RenderTarget {
    992     const ID2D1RenderTargetVtbl *lpVtbl;
    993 };
    994 
    995 #define ID2D1RenderTarget_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
    996 #define ID2D1RenderTarget_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
    997 #define ID2D1RenderTarget_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
    998 #define ID2D1RenderTarget_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
    999 #define ID2D1RenderTarget_BeginDraw(this) (this)->lpVtbl->BeginDraw(this)
   1000 #define ID2D1RenderTarget_Clear(this,A) (this)->lpVtbl->Clear(this,A)
   1001 #define ID2D1RenderTarget_CreateBitmap(this,A,B,C,D,E) (this)->lpVtbl->CreateBitmap(this,A,B,C,D,E)
   1002 #define ID2D1RenderTarget_CreateBitmapBrush(this,A,B) (this)->lpVtbl->CreateBitmapBrush(this,A,B)
   1003 #define ID2D1RenderTarget_CreateBitmapFromWicBitmap(this,A,B) (this)->lpVtbl->CreateBitmapFromWicBitmap(this,A,B)
   1004 #define ID2D1RenderTarget_CreateCompatibleRenderTarget(this,A) (this)->lpVtbl->CreateCompatibleRenderTarget(this,A)
   1005 #define ID2D1RenderTarget_CreateGradientStopCollection(this,A,B,C) (this)->lpVtbl->CreateGradientStopCollection(this,A,B,C)
   1006 #define ID2D1RenderTarget_CreateLayer(this,A) (this)->lpVtbl->CreateLayer(this,A)
   1007 #define ID2D1RenderTarget_CreateLinearGradientBrush(this,A,B,C,D) (this)->lpVtbl->CreateLinearGradientBrush(this,A,B,C,D)
   1008 #define ID2D1RenderTarget_CreateMesh(this,A) (this)->lpVtbl->CreateMesh(this,A)
   1009 #define ID2D1RenderTarget_CreateRadialGradientBrush(this,A,B,C,D) (this)->lpVtbl->CreateRadialGradientBrush(this,A,B,C,D)
   1010 #define ID2D1RenderTarget_CreateSharedBitmap(this,A,B,C,D) (this)->lpVtbl->CreateSharedBitmap(this,A,B,C,D)
   1011 #define ID2D1RenderTarget_CreateSolidColorBrush(this,A,B,C) (this)->lpVtbl->CreateSolidColorBrush(this,A,B,C)
   1012 #define ID2D1RenderTarget_DrawBitmap(this,A,B,C,D,E) (this)->lpVtbl->DrawBitmap(this,A,B,C,D,E)
   1013 #define ID2D1RenderTarget_DrawEllipse(this,A,B,C,D) (this)->lpVtbl->DrawEllipse(this,A,B,C,D)
   1014 #define ID2D1RenderTarget_DrawGeometry(this,A,B,C,D) (this)->lpVtbl->DrawGeometry(this,A,B,C,D)
   1015 #define ID2D1RenderTarget_DrawGlyphRun(this,A,B,C,D) (this)->lpVtbl->DrawGlyphRun(this,A,B,C,D)
   1016 #define ID2D1RenderTarget_DrawLine(this,A,B,C,D,E) (this)->lpVtbl->DrawLine(this,A,B,C,D,E)
   1017 #define ID2D1RenderTarget_DrawRectangle(this,A,B,C,D) (this)->lpVtbl->DrawRectangle(this,A,B,C,D)
   1018 #define ID2D1RenderTarget_DrawRoundedRectangle(this,A,B,C,D) (this)->lpVtbl->DrawRoundedRectangle(this,A,B,C,D)
   1019 #define ID2D1RenderTarget_DrawText(this,A,B,C,D,E,F,G) (this)->lpVtbl->DrawText(this,A,B,C,D,E,F,G)
   1020 #define ID2D1RenderTarget_DrawTextLayout(this,A,B,C,D) (this)->lpVtbl->DrawTextLayout(this,A,B,C,D)
   1021 #define ID2D1RenderTarget_EndDraw(this,A,B) (this)->lpVtbl->EndDraw(this,A,B)
   1022 #define ID2D1RenderTarget_FillEllipse(this,A,B) (this)->lpVtbl->FillEllipse(this,A,B)
   1023 #define ID2D1RenderTarget_FillGeometry(this,A,B,C) (this)->lpVtbl->FillGeometry(this,A,B,C)
   1024 #define ID2D1RenderTarget_FillMesh(this,A,B) (this)->lpVtbl->FillMesh(this,A,B)
   1025 #define ID2D1RenderTarget_FillOpacityMask(this,A,B,C,D,E) (this)->lpVtbl->FillOpacityMask(this,A,B,C,D,E)
   1026 #define ID2D1RenderTarget_FillRectangle(this,A,B) (this)->lpVtbl->FillRectangle(this,A,B)
   1027 #define ID2D1RenderTarget_FillRoundedRectangle(this,A,B) (this)->lpVtbl->FillRoundedRectangle(this,A,B)
   1028 #define ID2D1RenderTarget_Flush(this,A,B) (this)->lpVtbl->Flush(this,A,B)
   1029 #define ID2D1RenderTarget_GetAntialiasMode(this) (this)->lpVtbl->GetAntialiasMode(this)
   1030 #define ID2D1RenderTarget_GetDpi(this,A,B) (this)->lpVtbl->GetDpi(this,A,B)
   1031 #define ID2D1RenderTarget_GetMaximumBitmapSize(this) (this)->lpVtbl->GetMaximumBitmapSize(this)
   1032 #define ID2D1RenderTarget_GetPixelFormat(this) (this)->lpVtbl->GetPixelFormat(this)
   1033 #define ID2D1RenderTarget_GetPixelSize(this) (this)->lpVtbl->GetPixelSize(this)
   1034 #define ID2D1RenderTarget_GetSize(this) (this)->lpVtbl->GetSize(this)
   1035 #define ID2D1RenderTarget_GetTags(this,A,B) (this)->lpVtbl->GetTags(this,A,B)
   1036 #define ID2D1RenderTarget_GetTextAntialiasMode(this) (this)->lpVtbl->GetTextAntialiasMode(this)
   1037 #define ID2D1RenderTarget_GetTextRenderingParams(this,A) (this)->lpVtbl->GetTextRenderingParams(this,A)
   1038 #define ID2D1RenderTarget_GetTransform(this,A) (this)->lpVtbl->GetTransform(this,A)
   1039 #define ID2D1RenderTarget_IsSupported(this,A) (this)->lpVtbl->IsSupported(this,A)
   1040 #define ID2D1RenderTarget_PopAxisAlignedClip(this) (this)->lpVtbl->PopAxisAlignedClip(this)
   1041 #define ID2D1RenderTarget_PopLayer(this) (this)->lpVtbl->PopLayer(this)
   1042 #define ID2D1RenderTarget_PushAxisAlignedClip(this,A,B) (this)->lpVtbl->PushAxisAlignedClip(this,A,B)
   1043 #define ID2D1RenderTarget_PushLayer(this,A,B) (this)->lpVtbl->PushLayer(this,A,B)
   1044 #define ID2D1RenderTarget_RestoreDrawingState(this,A) (this)->lpVtbl->RestoreDrawingState(this,A)
   1045 #define ID2D1RenderTarget_SaveDrawingState(this,A) (this)->lpVtbl->SaveDrawingState(this,A)
   1046 #define ID2D1RenderTarget_SetAntialiasMode(this,A) (this)->lpVtbl->SetAntialiasMode(this,A)
   1047 #define ID2D1RenderTarget_SetDpi(this,A,B) (this)->lpVtbl->SetDpi(this,A,B)
   1048 #define ID2D1RenderTarget_SetTags(this,A,B) (this)->lpVtbl->SetTags(this,A,B)
   1049 #define ID2D1RenderTarget_SetTextAntialiasMode(this,A) (this)->lpVtbl->SetTextAntialiasMode(this,A)
   1050 #define ID2D1RenderTarget_SetTextRenderingParams(this,A) (this)->lpVtbl->SetTextRenderingParams(this,A)
   1051 #define ID2D1RenderTarget_SetTransform(this,A) (this)->lpVtbl->SetTransform(this,A)
   1052 
   1053 #endif
   1054 
   1055 DEFINE_GUID(IID_ID2D1Geometry, 0x2cd906a1,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1056 
   1057 #ifndef D2D_USE_C_DEFINITIONS
   1058 
   1059 interface ID2D1Geometry : public ID2D1Resource {
   1060     STDMETHOD(GetBounds)(const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) const PURE;
   1061     STDMETHOD(GetWidenedBounds)(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_RECT_F *bounds) const PURE;
   1062     STDMETHOD(StrokeContainsPoint)(D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) const PURE;
   1063     STDMETHOD(FillContainsPoint)(D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) const PURE;
   1064     STDMETHOD(CompareWithGeometry)(ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const PURE;
   1065     STDMETHOD(Simplify)(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const PURE;
   1066     STDMETHOD(Tessellate)(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1TessellationSink *tessellationSink) const PURE;
   1067     STDMETHOD(CombineWithGeometry)(ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const PURE;
   1068     STDMETHOD(Outline)(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const PURE;
   1069     STDMETHOD(ComputeArea)(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *area) const PURE;
   1070     STDMETHOD(ComputeLength)(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *length) const PURE;
   1071     STDMETHOD(ComputePointAtLength)(FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const PURE;
   1072     STDMETHOD(Widen)(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const PURE;
   1073 
   1074     HRESULT GetBounds(const D2D1_MATRIX_3X2_F &worldTransform, D2D1_RECT_F *bounds) const {
   1075         return GetBounds(&worldTransform, bounds);
   1076     }
   1077 
   1078     HRESULT GetWidenedBounds(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, D2D1_RECT_F *bounds) const {
   1079         return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, bounds);
   1080     }
   1081 
   1082     HRESULT GetWidenedBounds(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) const {
   1083         return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds);
   1084     }
   1085 
   1086     HRESULT GetWidenedBounds(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, D2D1_RECT_F *bounds) const {
   1087         return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds);
   1088     }
   1089 
   1090     HRESULT StrokeContainsPoint(D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, BOOL *contains) const {
   1091         return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, contains);
   1092     }
   1093 
   1094     HRESULT StrokeContainsPoint(D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, BOOL *contains) const {
   1095         return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
   1096     }
   1097 
   1098     HRESULT StrokeContainsPoint(D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, BOOL *contains) const {
   1099         return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
   1100     }
   1101 
   1102     HRESULT FillContainsPoint(D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, BOOL *contains) const {
   1103         return FillContainsPoint(point, &worldTransform, flatteningTolerance, contains);
   1104     }
   1105 
   1106     HRESULT FillContainsPoint(D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform, BOOL *contains) const {
   1107         return FillContainsPoint(point, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
   1108     }
   1109 
   1110     HRESULT FillContainsPoint(D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F &worldTransform, BOOL *contains) const {
   1111         return FillContainsPoint(point, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
   1112     }
   1113 
   1114     HRESULT CompareWithGeometry(ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) const {
   1115         return CompareWithGeometry(inputGeometry, &inputGeometryTransform, flatteningTolerance, relation);
   1116     }
   1117 
   1118     HRESULT CompareWithGeometry(ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform, D2D1_GEOMETRY_RELATION *relation) const {
   1119         return CompareWithGeometry(inputGeometry, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation);
   1120     }
   1121 
   1122     HRESULT CompareWithGeometry(ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F &inputGeometryTransform, D2D1_GEOMETRY_RELATION *relation) const {
   1123         return CompareWithGeometry(inputGeometry, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation);
   1124     }
   1125 
   1126     HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1127         return Simplify(simplificationOption, &worldTransform, flatteningTolerance, geometrySink);
   1128     }
   1129 
   1130     HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1131         return Simplify(simplificationOption, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1132     }
   1133 
   1134     HRESULT Simplify(D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1135         return Simplify(simplificationOption, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1136     }
   1137 
   1138     HRESULT Tessellate(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1TessellationSink *tessellationSink) const {
   1139         return Tessellate(&worldTransform, flatteningTolerance, tessellationSink);
   1140     }
   1141 
   1142     HRESULT Tessellate(const D2D1_MATRIX_3X2_F *worldTransform, ID2D1TessellationSink *tessellationSink) const {
   1143         return Tessellate(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink);
   1144     }
   1145 
   1146     HRESULT Tessellate(const D2D1_MATRIX_3X2_F &worldTransform, ID2D1TessellationSink *tessellationSink) const {
   1147         return Tessellate(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink);
   1148     }
   1149 
   1150     HRESULT CombineWithGeometry(ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F &inputGeometryTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1151         return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, flatteningTolerance, geometrySink);
   1152     }
   1153 
   1154     HRESULT CombineWithGeometry(ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, CONST D2D1_MATRIX_3X2_F *inputGeometryTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1155         return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1156     }
   1157 
   1158     HRESULT CombineWithGeometry(ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F &inputGeometryTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1159         return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1160     }
   1161 
   1162     HRESULT Outline(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1163         return Outline(&worldTransform, flatteningTolerance, geometrySink);
   1164     }
   1165 
   1166     HRESULT Outline(const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1167         return Outline(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1168     }
   1169 
   1170     HRESULT Outline(const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1171         return Outline(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1172     }
   1173 
   1174     HRESULT ComputeArea(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, FLOAT *area) const {
   1175         return ComputeArea(&worldTransform, flatteningTolerance, area);
   1176     }
   1177 
   1178     HRESULT ComputeArea(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT *area) const {
   1179         return ComputeArea(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area);
   1180     }
   1181 
   1182     HRESULT ComputeArea(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT *area) const {
   1183         return ComputeArea(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area);
   1184     }
   1185 
   1186     HRESULT ComputeLength(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, FLOAT *length) const {
   1187         return ComputeLength(&worldTransform, flatteningTolerance, length);
   1188     }
   1189 
   1190     HRESULT ComputeLength(const D2D1_MATRIX_3X2_F *worldTransform, FLOAT *length) const {
   1191         return ComputeLength(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length);
   1192     }
   1193 
   1194     HRESULT  ComputeLength(const D2D1_MATRIX_3X2_F &worldTransform, FLOAT *length) const {
   1195         return ComputeLength(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length);
   1196     }
   1197 
   1198     HRESULT ComputePointAtLength(FLOAT length, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const {
   1199         return ComputePointAtLength(length, &worldTransform, flatteningTolerance, point, unitTangentVector);
   1200     }
   1201 
   1202     HRESULT ComputePointAtLength(FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const {
   1203         return ComputePointAtLength(length, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector);
   1204     }
   1205 
   1206     HRESULT ComputePointAtLength(FLOAT length, const D2D1_MATRIX_3X2_F &worldTransform, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) const {
   1207         return ComputePointAtLength(length, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector);
   1208     }
   1209 
   1210     HRESULT Widen(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1211         return Widen(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, geometrySink);
   1212     }
   1213 
   1214     HRESULT Widen(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1215         return Widen(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1216     }
   1217 
   1218     HRESULT Widen(FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F &worldTransform, ID2D1SimplifiedGeometrySink *geometrySink) const {
   1219         return Widen(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
   1220     }
   1221 };
   1222 
   1223 #else
   1224 
   1225 typedef struct ID2D1GeometryVtbl {
   1226     ID2D1ResourceVtbl Base;
   1227 
   1228     STDMETHOD(GetBounds)(ID2D1Geometry *This, const D2D1_MATRIX_3X2_F *worldTransform, D2D1_RECT_F *bounds) PURE;
   1229     STDMETHOD(GetWidenedBounds)(ID2D1Geometry *This, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_RECT_F *bounds) PURE;
   1230     STDMETHOD(StrokeContainsPoint)(ID2D1Geometry *This, D2D1_POINT_2F point, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) PURE;
   1231     STDMETHOD(FillContainsPoint)(ID2D1Geometry *This, D2D1_POINT_2F point, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, BOOL *contains) PURE;
   1232     STDMETHOD(CompareWithGeometry)(ID2D1Geometry *This, ID2D1Geometry *inputGeometry, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, D2D1_GEOMETRY_RELATION *relation) PURE;
   1233     STDMETHOD(Simplify)(ID2D1Geometry *This, D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) PURE;
   1234     STDMETHOD(Tessellate)(ID2D1Geometry *This, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1TessellationSink *tessellationSink) PURE;
   1235     STDMETHOD(CombineWithGeometry)(ID2D1Geometry *This, ID2D1Geometry *inputGeometry, D2D1_COMBINE_MODE combineMode, const D2D1_MATRIX_3X2_F *inputGeometryTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) PURE;
   1236     STDMETHOD(Outline)(ID2D1Geometry *This, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) PURE;
   1237     STDMETHOD(ComputeArea)(ID2D1Geometry *This, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *area) PURE;
   1238     STDMETHOD(ComputeLength)(ID2D1Geometry *This, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, FLOAT *length) PURE;
   1239     STDMETHOD(ComputePointAtLength)(ID2D1Geometry *This, FLOAT length, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, D2D1_POINT_2F *point, D2D1_POINT_2F *unitTangentVector) PURE;
   1240     STDMETHOD(Widen)(ID2D1Geometry *This, FLOAT strokeWidth, ID2D1StrokeStyle *strokeStyle, const D2D1_MATRIX_3X2_F *worldTransform, FLOAT flatteningTolerance, ID2D1SimplifiedGeometrySink *geometrySink) PURE;
   1241 } ID2D1GeometryVtbl;
   1242 
   1243 interface ID2D1Geometry {
   1244     const ID2D1GeometryVtbl *lpVtbl;
   1245 };
   1246 
   1247 #define ID2D1Geometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   1248 #define ID2D1Geometry_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   1249 #define ID2D1Geometry_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   1250 #define ID2D1Geometry_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   1251 #define ID2D1Geometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->CombineWithGeometry(this,A,B,C,D)
   1252 #define ID2D1Geometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->CompareWithGeometry(this,A,B,C)
   1253 #define ID2D1Geometry_ComputeArea(this,A,B) (this)->lpVtbl->ComputeArea(this,A,B)
   1254 #define ID2D1Geometry_ComputeLength(this,A,B) (this)->lpVtbl->ComputeLength(this,A,B)
   1255 #define ID2D1Geometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->ComputePointAtLength(this,A,B,C,D)
   1256 #define ID2D1Geometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->FillContainsPoint(this,A,B,C)
   1257 #define ID2D1Geometry_GetBounds(this,A,B) (this)->lpVtbl->GetBounds(this,A,B)
   1258 #define ID2D1Geometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->GetWidenedBounds(this,A,B,C,D)
   1259 #define ID2D1Geometry_Outline(this,A,B) (this)->lpVtbl->Outline(this,A,B)
   1260 #define ID2D1Geometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->StrokeContainsPoint(this,A,B,C,D,E)
   1261 #define ID2D1Geometry_Simplify(this,A,B,C) (this)->lpVtbl->Simplify(this,A,B,C)
   1262 #define ID2D1Geometry_Tessellate(this,A,B) (this)->lpVtbl->Tessellate(this,A,B)
   1263 #define ID2D1Geometry_Widen(this,A,B,C,D) (this)->lpVtbl->Widen(this,A,B,C,D)
   1264 
   1265 #endif
   1266 
   1267 DEFINE_GUID(IID_ID2D1BitmapRenderTarget, 0x2cd90695,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1268 
   1269 #ifndef D2D_USE_C_DEFINITIONS
   1270 
   1271 interface ID2D1BitmapRenderTarget : public ID2D1RenderTarget {
   1272     STDMETHOD(GetBitmap)(ID2D1Bitmap **bitmap) PURE;
   1273 };
   1274 
   1275 #else
   1276 
   1277 typedef struct ID2D1BitmapRenderTargetVtbl {
   1278     ID2D1RenderTargetVtbl Base;
   1279 
   1280     STDMETHOD(GetBitmap)(ID2D1BitmapRenderTarget *This, ID2D1Bitmap **bitmap) PURE;
   1281 } ID2D1BitmapRenderTargetVtbl;
   1282 
   1283 interface ID2D1BitmapRenderTarget {
   1284     const ID2D1BitmapRenderTargetVtbl *lpVtbl;
   1285 };
   1286 
   1287 #define ID2D1BitmapRenderTarget_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1288 #define ID2D1BitmapRenderTarget_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1289 #define ID2D1BitmapRenderTarget_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1290 #define ID2D1BitmapRenderTarget_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1291 #define ID2D1BitmapRenderTarget_BeginDraw(this) (this)->lpVtbl->Base.BeginDraw(this)
   1292 #define ID2D1BitmapRenderTarget_Clear(this,A) (this)->lpVtbl->Base.Clear(this,A)
   1293 #define ID2D1BitmapRenderTarget_CreateBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.CreateBitmap(this,A,B,C,D,E)
   1294 #define ID2D1BitmapRenderTarget_CreateBitmapBrush(this,A,B) (this)->lpVtbl->Base.CreateBitmapBrush(this,A,B)
   1295 #define ID2D1BitmapRenderTarget_CreateBitmapFromWicBitmap(this,A,B) (this)->lpVtbl->Base.CreateBitmapFromWicBitmap(this,A,B)
   1296 #define ID2D1BitmapRenderTarget_CreateCompatibleBitmapRenderTarget(this,A) (this)->lpVtbl->Base.CreateCompatibleBitmapRenderTarget(this,A)
   1297 #define ID2D1BitmapRenderTarget_CreateGradientStopCollection(this,A,B,C) (this)->lpVtbl->Base.CreateGradientStopCollection(this,A,B,C)
   1298 #define ID2D1BitmapRenderTarget_CreateLayer(this,A) (this)->lpVtbl->Base.CreateLayer(this,A)
   1299 #define ID2D1BitmapRenderTarget_CreateLinearGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateLinearGradientBrush(this,A,B,C,D)
   1300 #define ID2D1BitmapRenderTarget_CreateMesh(this,A) (this)->lpVtbl->Base.CreateMesh(this,A)
   1301 #define ID2D1BitmapRenderTarget_CreateRadialGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateRadialGradientBrush(this,A,B,C,D)
   1302 #define ID2D1BitmapRenderTarget_CreateSharedBitmap(this,A,B,C,D) (this)->lpVtbl->Base.CreateSharedBitmap(this,A,B,C,D)
   1303 #define ID2D1BitmapRenderTarget_CreateSolidColorBrush(this,A,B,C) (this)->lpVtbl->Base.CreateSolidColorBrush(this,A,B,C)
   1304 #define ID2D1BitmapRenderTarget_DrawBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawBitmap(this,A,B,C,D,E)
   1305 #define ID2D1BitmapRenderTarget_DrawEllipse(this,A,B,C,D) (this)->lpVtbl->Base.DrawEllipse(this,A,B,C,D)
   1306 #define ID2D1BitmapRenderTarget_DrawGeometry(this,A,B,C,D) (this)->lpVtbl->Base.DrawGeometry(this,A,B,C,D)
   1307 #define ID2D1BitmapRenderTarget_DrawGlyphRun(this,A,B,C,D) (this)->lpVtbl->Base.DrawGlyphRun(this,A,B,C,D)
   1308 #define ID2D1BitmapRenderTarget_DrawLine(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawLine(this,A,B,C,D,E)
   1309 #define ID2D1BitmapRenderTarget_DrawRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRectangle(this,A,B,C,D)
   1310 #define ID2D1BitmapRenderTarget_DrawRoundedRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRoundedRectangle(this,A,B,C,D)
   1311 #define ID2D1BitmapRenderTarget_DrawText(this,A,B,C,D,E,F,G) (this)->lpVtbl->Base.DrawText(this,A,B,C,D,E,F,G)
   1312 #define ID2D1BitmapRenderTarget_DrawTextLayout(this,A,B,C,D) (this)->lpVtbl->Base.DrawTextLayout(this,A,B,C,D)
   1313 #define ID2D1BitmapRenderTarget_EndDraw(this,A,B) (this)->lpVtbl->Base.EndDraw(this,A,B)
   1314 #define ID2D1BitmapRenderTarget_FillEllipse(this,A,B) (this)->lpVtbl->Base.FillEllipse(this,A,B)
   1315 #define ID2D1BitmapRenderTarget_FillGeometry(this,A,B,C) (this)->lpVtbl->Base.FillGeometry(this,A,B,C)
   1316 #define ID2D1BitmapRenderTarget_FillMesh(this,A,B) (this)->lpVtbl->Base.FillMesh(this,A,B)
   1317 #define ID2D1BitmapRenderTarget_FillOpacityMask(this,A,B,C,D,E) (this)->lpVtbl->Base.FillOpacityMask(this,A,B,C,D,E)
   1318 #define ID2D1BitmapRenderTarget_FillRectangle(this,A,B) (this)->lpVtbl->Base.FillRectangle(this,A,B)
   1319 #define ID2D1BitmapRenderTarget_FillRoundedRectangle(this,A,B) (this)->lpVtbl->Base.FillRoundedRectangle(this,A,B)
   1320 #define ID2D1BitmapRenderTarget_Flush(this,A,B) (this)->lpVtbl->Base.Flush(this,A,B)
   1321 #define ID2D1BitmapRenderTarget_GetAntialiasMode(this) (this)->lpVtbl->Base.GetAntialiasMode(this)
   1322 #define ID2D1BitmapRenderTarget_GetDpi(this,A,B) (this)->lpVtbl->Base.GetDpi(this,A,B)
   1323 #define ID2D1BitmapRenderTarget_GetMaximumBitmapSize(this) (this)->lpVtbl->Base.GetMaximumBitmapSize(this)
   1324 #define ID2D1BitmapRenderTarget_GetPixelFormat(this) (this)->lpVtbl->Base.GetPixelFormat(this)
   1325 #define ID2D1BitmapRenderTarget_GetPixelSize(this) (this)->lpVtbl->Base.GetPixelSize(this)
   1326 #define ID2D1BitmapRenderTarget_GetSize(this) (this)->lpVtbl->Base.GetSize(this)
   1327 #define ID2D1BitmapRenderTarget_GetTags(this,A,B) (this)->lpVtbl->Base.GetTags(this,A,B)
   1328 #define ID2D1BitmapRenderTarget_GetTextAntialiasMode(this) (this)->lpVtbl->Base.GetTextAntialiasMode(this)
   1329 #define ID2D1BitmapRenderTarget_GetTextRenderingParams(this,A) (this)->lpVtbl->Base.GetTextRenderingParams(this,A)
   1330 #define ID2D1BitmapRenderTarget_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   1331 #define ID2D1BitmapRenderTarget_IsSupported(this,A) (this)->lpVtbl->Base.IsSupported(this,A)
   1332 #define ID2D1BitmapRenderTarget_PopAxisAlignedClip(this) (this)->lpVtbl->Base.PopAxisAlignedClip(this)
   1333 #define ID2D1BitmapRenderTarget_PopLayer(this) (this)->lpVtbl->Base.PopLayer(this)
   1334 #define ID2D1BitmapRenderTarget_PushAxisAlignedClip(this,A,B) (this)->lpVtbl->Base.PushAxisAlignedClip(this,A,B)
   1335 #define ID2D1BitmapRenderTarget_PushLayer(this,A,B) (this)->lpVtbl->Base.PushLayer(this,A,B)
   1336 #define ID2D1BitmapRenderTarget_RestoreDrawingState(this,A) (this)->lpVtbl->Base.RestoreDrawingState(this,A)
   1337 #define ID2D1BitmapRenderTarget_SaveDrawingState(this,A) (this)->lpVtbl->Base.SaveDrawingState(this,A)
   1338 #define ID2D1BitmapRenderTarget_SetAntialiasMode(this,A) (this)->lpVtbl->Base.SetAntialiasMode(this,A)
   1339 #define ID2D1BitmapRenderTarget_SetDpi(this,A,B) (this)->lpVtbl->Base.SetDpi(this,A,B)
   1340 #define ID2D1BitmapRenderTarget_SetTags(this,A,B) (this)->lpVtbl->Base.SetTags(this,A,B)
   1341 #define ID2D1BitmapRenderTarget_SetTextAntialiasMode(this,A) (this)->lpVtbl->Base.SetTextAntialiasMode(this,A)
   1342 #define ID2D1BitmapRenderTarget_SetTextRenderingParams(this,A) (this)->lpVtbl->Base.SetTextRenderingParams(this,A)
   1343 #define ID2D1BitmapRenderTarget_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   1344 #define ID2D1BitmapRenderTarget_GetBitmap(this,A) (this)->lpVtbl->GetBitmap(this,A)
   1345 
   1346 #endif
   1347 
   1348 DEFINE_GUID(IID_ID2D1DCRenderTarget, 0x1c51bc64,0xde61,0x46fd,0x98,0x99,0x63,0xa5,0xd8,0xf0,0x39,0x50);
   1349 
   1350 #ifndef D2D_USE_C_DEFINITIONS
   1351 
   1352 interface ID2D1DCRenderTarget : public ID2D1RenderTarget {
   1353     STDMETHOD(BindDC)(const HDC hDC, const RECT *pSubRect) PURE;
   1354 };
   1355 
   1356 #else
   1357 
   1358 typedef struct ID2D1DCRenderTargetVtbl {
   1359     ID2D1RenderTargetVtbl Base;
   1360 
   1361     STDMETHOD(BindDC)(ID2D1DCRenderTarget *This, const HDC hDC, const RECT *pSubRect) PURE;
   1362 } ID2D1DCRenderTargetVtbl;
   1363 
   1364 interface ID2D1DCRenderTarget
   1365 {
   1366     const ID2D1DCRenderTargetVtbl *lpVtbl;
   1367 };
   1368 
   1369 #define ID2D1DCRenderTarget_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1370 #define ID2D1DCRenderTarget_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1371 #define ID2D1DCRenderTarget_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1372 #define ID2D1DCRenderTarget_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1373 #define ID2D1DCRenderTarget_BeginDraw(this) (this)->lpVtbl->Base.BeginDraw(this)
   1374 #define ID2D1DCRenderTarget_Clear(this,A) (this)->lpVtbl->Base.Clear(this,A)
   1375 #define ID2D1DCRenderTarget_CreateBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.CreateBitmap(this,A,B,C,D,E)
   1376 #define ID2D1DCRenderTarget_CreateBitmapBrush(this,A,B) (this)->lpVtbl->Base.CreateBitmapBrush(this,A,B)
   1377 #define ID2D1DCRenderTarget_CreateBitmapFromWicBitmap(this,A,B) (this)->lpVtbl->Base.CreateBitmapFromWicBitmap(this,A,B)
   1378 #define ID2D1DCRenderTarget_CreateCompatibleRenderTarget(this,A) (this)->lpVtbl->Base.CreateCompatibleRenderTarget(this,A)
   1379 #define ID2D1DCRenderTarget_CreateGradientStopCollection(this,A,B,C) (this)->lpVtbl->Base.CreateGradientStopCollection(this,A,B,C)
   1380 #define ID2D1DCRenderTarget_CreateLayer(this,A) (this)->lpVtbl->Base.CreateLayer(this,A)
   1381 #define ID2D1DCRenderTarget_CreateLinearGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateLinearGradientBrush(this,A,B,C,D)
   1382 #define ID2D1DCRenderTarget_CreateMesh(this,A) (this)->lpVtbl->Base.CreateMesh(this,A)
   1383 #define ID2D1DCRenderTarget_CreateRadialGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateRadialGradientBrush(this,A,B,C,D)
   1384 #define ID2D1DCRenderTarget_CreateSharedBitmap(this,A,B,C,D) (this)->lpVtbl->Base.CreateSharedBitmap(this,A,B,C,D)
   1385 #define ID2D1DCRenderTarget_CreateSolidColorBrush(this,A,B,C) (this)->lpVtbl->Base.CreateSolidColorBrush(this,A,B,C)
   1386 #define ID2D1DCRenderTarget_DrawBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawBitmap(this,A,B,C,D,E)
   1387 #define ID2D1DCRenderTarget_DrawEllipse(this,A,B,C,D) (this)->lpVtbl->Base.DrawEllipse(this,A,B,C,D)
   1388 #define ID2D1DCRenderTarget_DrawGeometry(this,A,B,C,D) (this)->lpVtbl->Base.DrawGeometry(this,A,B,C,D)
   1389 #define ID2D1DCRenderTarget_DrawGlyphRun(this,A,B,C,D) (this)->lpVtbl->Base.DrawGlyphRun(this,A,B,C,D)
   1390 #define ID2D1DCRenderTarget_DrawLine(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawLine(this,A,B,C,D,E)
   1391 #define ID2D1DCRenderTarget_DrawRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRectangle(this,A,B,C,D)
   1392 #define ID2D1DCRenderTarget_DrawRoundedRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRoundedRectangle(this,A,B,C,D)
   1393 #define ID2D1DCRenderTarget_DrawText(this,A,B,C,D,E,F,G) (this)->lpVtbl->Base.DrawText(this,A,B,C,D,E,F,G)
   1394 #define ID2D1DCRenderTarget_DrawTextLayout(this,A,B,C,D) (this)->lpVtbl->Base.DrawTextLayout(this,A,B,C,D)
   1395 #define ID2D1DCRenderTarget_EndDraw(this,A,B) (this)->lpVtbl->Base.EndDraw(this,A,B)
   1396 #define ID2D1DCRenderTarget_FillEllipse(this,A,B) (this)->lpVtbl->Base.FillEllipse(this,A,B)
   1397 #define ID2D1DCRenderTarget_FillGeometry(this,A,B,C) (this)->lpVtbl->Base.FillGeometry(this,A,B,C)
   1398 #define ID2D1DCRenderTarget_FillMesh(this,A,B) (this)->lpVtbl->Base.FillMesh(this,A,B)
   1399 #define ID2D1DCRenderTarget_FillOpacityMask(this,A,B,C,D,E) (this)->lpVtbl->Base.FillOpacityMask(this,A,B,C,D,E)
   1400 #define ID2D1DCRenderTarget_FillRectangle(this,A,B) (this)->lpVtbl->Base.FillRectangle(this,A,B)
   1401 #define ID2D1DCRenderTarget_FillRoundedRectangle(this,A,B) (this)->lpVtbl->Base.FillRoundedRectangle(this,A,B)
   1402 #define ID2D1DCRenderTarget_Flush(this,A,B) (this)->lpVtbl->Base.Flush(this,A,B)
   1403 #define ID2D1DCRenderTarget_GetAntialiasMode(this) (this)->lpVtbl->Base.GetAntialiasMode(this)
   1404 #define ID2D1DCRenderTarget_GetDpi(this,A,B) (this)->lpVtbl->Base.GetDpi(this,A,B)
   1405 #define ID2D1DCRenderTarget_GetMaximumBitmapSize(this) (this)->lpVtbl->Base.GetMaximumBitmapSize(this)
   1406 #define ID2D1DCRenderTarget_GetPixelFormat(this) (this)->lpVtbl->Base.GetPixelFormat(this)
   1407 #define ID2D1DCRenderTarget_GetPixelSize(this) (this)->lpVtbl->Base.GetPixelSize(this)
   1408 #define ID2D1DCRenderTarget_GetSize(this) (this)->lpVtbl->Base.GetSize(this)
   1409 #define ID2D1DCRenderTarget_GetTags(this,A,B) (this)->lpVtbl->Base.GetTags(this,A,B)
   1410 #define ID2D1DCRenderTarget_GetTextAntialiasMode(this) (this)->lpVtbl->Base.GetTextAntialiasMode(this)
   1411 #define ID2D1DCRenderTarget_GetTextRenderingParams(this,A) (this)->lpVtbl->Base.GetTextRenderingParams(this,A)
   1412 #define ID2D1DCRenderTarget_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   1413 #define ID2D1DCRenderTarget_IsSupported(this,A) (this)->lpVtbl->Base.IsSupported(this,A)
   1414 #define ID2D1DCRenderTarget_PopAxisAlignedClip(this) (this)->lpVtbl->Base.PopAxisAlignedClip(this)
   1415 #define ID2D1DCRenderTarget_PopLayer(this) (this)->lpVtbl->Base.PopLayer(this)
   1416 #define ID2D1DCRenderTarget_PushAxisAlignedClip(this,A,B) (this)->lpVtbl->Base.PushAxisAlignedClip(this,A,B)
   1417 #define ID2D1DCRenderTarget_PushLayer(this,A,B) (this)->lpVtbl->Base.PushLayer(this,A,B)
   1418 #define ID2D1DCRenderTarget_RestoreDrawingState(this,A) (this)->lpVtbl->Base.RestoreDrawingState(this,A)
   1419 #define ID2D1DCRenderTarget_SaveDrawingState(this,A) (this)->lpVtbl->Base.SaveDrawingState(this,A)
   1420 #define ID2D1DCRenderTarget_SetAntialiasMode(this,A) (this)->lpVtbl->Base.SetAntialiasMode(this,A)
   1421 #define ID2D1DCRenderTarget_SetDpi(this,A,B) (this)->lpVtbl->Base.SetDpi(this,A,B)
   1422 #define ID2D1DCRenderTarget_SetTags(this,A,B) (this)->lpVtbl->Base.SetTags(this,A,B)
   1423 #define ID2D1DCRenderTarget_SetTextAntialiasMode(this,A) (this)->lpVtbl->Base.SetTextAntialiasMode(this,A)
   1424 #define ID2D1DCRenderTarget_SetTextRenderingParams(this,A) (this)->lpVtbl->Base.SetTextRenderingParams(this,A)
   1425 #define ID2D1DCRenderTarget_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   1426 #define ID2D1DCRenderTarget_BindDC(this,A,B) (this)->lpVtbl->BindDC(this,A,B)
   1427 
   1428 #endif
   1429 
   1430 DEFINE_GUID(IID_ID2D1DrawingStateBlock, 0x28506e39,0xebf6,0x46a1,0xbb,0x47,0xfd,0x85,0x56,0x5a,0xb9,0x57);
   1431 
   1432 #ifndef D2D_USE_C_DEFINITIONS
   1433 
   1434 interface ID2D1DrawingStateBlock : public ID2D1Resource {
   1435     STDMETHOD_(void, GetDescription)(D2D1_DRAWING_STATE_DESCRIPTION *stateDescription) const PURE;
   1436     STDMETHOD_(void, SetDescription)(const D2D1_DRAWING_STATE_DESCRIPTION *stateDescription) PURE;
   1437     STDMETHOD_(void, SetTextRenderingParams)(IDWriteRenderingParams *textRenderingParams = NULL) PURE;
   1438     STDMETHOD_(void, GetTextRenderingParams)(IDWriteRenderingParams **textRenderingParams) const PURE;
   1439 
   1440     void SetDescription(const D2D1_DRAWING_STATE_DESCRIPTION &stateDescription) {
   1441         SetDescription(&stateDescription);
   1442     }
   1443 };
   1444 
   1445 #else
   1446 
   1447 typedef struct ID2D1DrawingStateBlockVtbl {
   1448     ID2D1ResourceVtbl Base;
   1449 
   1450     STDMETHOD_(void, GetDescription)(ID2D1DrawingStateBlock *This, D2D1_DRAWING_STATE_DESCRIPTION *stateDescription) PURE;
   1451     STDMETHOD_(void, SetDescription)(ID2D1DrawingStateBlock *This, const D2D1_DRAWING_STATE_DESCRIPTION *stateDescription) PURE;
   1452     STDMETHOD_(void, SetTextRenderingParams)(ID2D1DrawingStateBlock *This, IDWriteRenderingParams *textRenderingParams) PURE;
   1453     STDMETHOD_(void, GetTextRenderingParams)(ID2D1DrawingStateBlock *This, IDWriteRenderingParams **textRenderingParams) PURE;
   1454 } ID2D1DrawingStateBlockVtbl;
   1455 
   1456 interface ID2D1DrawingStateBlock {
   1457     const struct ID2D1DrawingStateBlockVtbl *lpVtbl;
   1458 };
   1459 
   1460 #define ID2D1DrawingStateBlock_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   1461 #define ID2D1DrawingStateBlock_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   1462 #define ID2D1DrawingStateBlock_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   1463 #define ID2D1DrawingStateBlock_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   1464 #define ID2D1DrawingStateBlock_GetDescription(this,A) (this)->lpVtbl->GetDescription(this,A)
   1465 #define ID2D1DrawingStateBlock_GetTextRenderingParams(this,A) (this)->lpVtbl->GetTextRenderingParams(this,A)
   1466 #define ID2D1DrawingStateBlock_SetDescription(this,A) (this)->lpVtbl->SetDescription(this,A)
   1467 #define ID2D1DrawingStateBlock_SetTextRenderingParams(this,A) (this)->lpVtbl->SetTextRenderingParams(this,A)
   1468 
   1469 #endif
   1470 
   1471 DEFINE_GUID(IID_ID2D1SimplifiedGeometrySink, 0x2cd9069e,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1472 
   1473 #ifndef D2D_USE_C_DEFINITIONS
   1474 
   1475 interface ID2D1SimplifiedGeometrySink : public IUnknown {
   1476     STDMETHOD_(void, SetFillMode)(D2D1_FILL_MODE fillMode) PURE;
   1477     STDMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT vertexFlags) PURE;
   1478     STDMETHOD_(void, BeginFigure)(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) PURE;
   1479     STDMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointsCount) PURE;
   1480     STDMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) PURE;
   1481     STDMETHOD_(void, EndFigure)(D2D1_FIGURE_END figureEnd) PURE;
   1482     STDMETHOD(Close)(void) PURE;
   1483 };
   1484 
   1485 #else
   1486 
   1487 typedef struct ID2D1SimplifiedGeometrySinkVtbl {
   1488     IUnknownVtbl Base;
   1489 
   1490     STDMETHOD_(void, SetFillMode)(ID2D1SimplifiedGeometrySink *This, D2D1_FILL_MODE fillMode) PURE;
   1491     STDMETHOD_(void, SetSegmentFlags)(ID2D1SimplifiedGeometrySink *This, D2D1_PATH_SEGMENT vertexFlags) PURE;
   1492     STDMETHOD_(void, BeginFigure)(ID2D1SimplifiedGeometrySink *This, D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) PURE;
   1493     STDMETHOD_(void, AddLines)(ID2D1SimplifiedGeometrySink *This, const D2D1_POINT_2F *points, UINT pointsCount) PURE;
   1494     STDMETHOD_(void, AddBeziers)(ID2D1SimplifiedGeometrySink *This, const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) PURE;
   1495     STDMETHOD_(void, EndFigure)(ID2D1SimplifiedGeometrySink *This, D2D1_FIGURE_END figureEnd) PURE;
   1496     STDMETHOD(Close)(ID2D1SimplifiedGeometrySink *This) PURE;
   1497 } ID2D1SimplifiedGeometrySinkVtbl;
   1498 
   1499 interface ID2D1SimplifiedGeometrySink {
   1500     const ID2D1SimplifiedGeometrySinkVtbl *lpVtbl;
   1501 };
   1502 
   1503 #define ID2D1SimplifiedGeometrySink_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown*)this,A,B)
   1504 #define ID2D1SimplifiedGeometrySink_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown*)this)
   1505 #define ID2D1SimplifiedGeometrySink_Release(this) (this)->lpVtbl->Base.Release((IUnknown*)this)
   1506 #define ID2D1SimplifiedGeometrySink_SetFillMode(this,A) (this)->lpVtbl->SetFillMode(this,A)
   1507 #define ID2D1SimplifiedGeometrySink_SetSegmentFlags(this,A) (this)->lpVtbl->SetSegmentFlags(this,A)
   1508 #define ID2D1SimplifiedGeometrySink_BeginFigure(this,A,B) (this)->lpVtbl->BeginFigure(this,A,B)
   1509 #define ID2D1SimplifiedGeometrySink_AddLines(this,A,B) (this)->lpVtbl->AddLines(this,A,B)
   1510 #define ID2D1SimplifiedGeometrySink_AddBeziers(this,A,B) (this)->lpVtbl->AddBeziers(this,A,B)
   1511 #define ID2D1SimplifiedGeometrySink_EndFigure(this,A) (this)->lpVtbl->EndFigure(this,A)
   1512 #define ID2D1SimplifiedGeometrySink_Close(this) (this)->lpVtbl->Close(this)
   1513 
   1514 #endif
   1515 
   1516 DEFINE_GUID(IID_ID2D1EllipseGeometry, 0x2cd906a4,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1517 
   1518 #ifndef D2D_USE_C_DEFINITIONS
   1519 
   1520 interface ID2D1EllipseGeometry : public ID2D1Geometry {
   1521     STDMETHOD_(void, GetEllipse)(D2D1_ELLIPSE *ellipse) const PURE;
   1522 };
   1523 
   1524 #else
   1525 
   1526 typedef struct ID2D1EllipseGeometryVtbl {
   1527     ID2D1GeometryVtbl Base;
   1528 
   1529     STDMETHOD_(void, GetEllipse)(ID2D1EllipseGeometry *This, D2D1_ELLIPSE *ellipse) PURE;
   1530 } ID2D1EllipseGeometryVtbl;
   1531 
   1532 interface ID2D1EllipseGeometry {
   1533     const struct ID2D1EllipseGeometryVtbl *lpVtbl;
   1534 };
   1535 
   1536 #define ID2D1EllipseGeometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1537 #define ID2D1EllipseGeometry_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1538 #define ID2D1EllipseGeometry_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1539 #define ID2D1EllipseGeometry_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1540 #define ID2D1EllipseGeometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   1541 #define ID2D1EllipseGeometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   1542 #define ID2D1EllipseGeometry_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   1543 #define ID2D1EllipseGeometry_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   1544 #define ID2D1EllipseGeometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   1545 #define ID2D1EllipseGeometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   1546 #define ID2D1EllipseGeometry_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   1547 #define ID2D1EllipseGeometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   1548 #define ID2D1EllipseGeometry_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   1549 #define ID2D1EllipseGeometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   1550 #define ID2D1EllipseGeometry_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   1551 #define ID2D1EllipseGeometry_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   1552 #define ID2D1EllipseGeometry_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   1553 #define ID2D1EllipseGeometry_GetEllipse(this,A) (this)->lpVtbl->GetEllipse(this,A)
   1554 
   1555 #endif
   1556 
   1557 DEFINE_GUID(IID_ID2D1Factory, 0x06152247,0x6f50,0x465a,0x92,0x45,0x11,0x8b,0xfd,0x3b,0x60,0x07);
   1558 
   1559 #ifndef D2D_USE_C_DEFINITIONS
   1560 
   1561 interface ID2D1Factory : public IUnknown {
   1562     STDMETHOD(ReloadSystemMetrics)(void) PURE;
   1563     STDMETHOD_(void, GetDesktopDpi)(FLOAT *dpiX, FLOAT *dpiY) PURE;
   1564     STDMETHOD(CreateRectangleGeometry)(const D2D1_RECT_F *rectangle, ID2D1RectangleGeometry **rectangleGeometry) PURE;
   1565     STDMETHOD(CreateRoundedRectangleGeometry)(const D2D1_ROUNDED_RECT *roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) PURE;
   1566     STDMETHOD(CreateEllipseGeometry)(const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **ellipseGeometry) PURE;
   1567     STDMETHOD(CreateGeometryGroup)(D2D1_FILL_MODE fillMode, ID2D1Geometry **geometries, UINT geometriesCount, ID2D1GeometryGroup **geometryGroup) PURE;
   1568     STDMETHOD(CreateTransformedGeometry)(ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F *transform, ID2D1TransformedGeometry **transformedGeometry) PURE;
   1569     STDMETHOD(CreatePathGeometry)(ID2D1PathGeometry **pathGeometry) PURE;
   1570     STDMETHOD(CreateStrokeStyle)(const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes, UINT dashesCount, ID2D1StrokeStyle **strokeStyle) PURE;
   1571     STDMETHOD(CreateDrawingStateBlock)(const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) PURE;
   1572     STDMETHOD(CreateWicBitmapRenderTarget)(IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) PURE;
   1573     STDMETHOD(CreateHwndRenderTarget)(const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget) PURE;
   1574     STDMETHOD(CreateDxgiSurfaceRenderTarget)(IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) PURE;
   1575     STDMETHOD(CreateDCRenderTarget)(const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1DCRenderTarget **dcRenderTarget) PURE;
   1576 
   1577     HRESULT CreateRectangleGeometry(const D2D1_RECT_F &rectangle, ID2D1RectangleGeometry **rectangleGeometry) {
   1578         return CreateRectangleGeometry(&rectangle, rectangleGeometry);
   1579     }
   1580 
   1581     HRESULT CreateRoundedRectangleGeometry(const D2D1_ROUNDED_RECT &roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) {
   1582         return CreateRoundedRectangleGeometry(&roundedRectangle, roundedRectangleGeometry);
   1583     }
   1584 
   1585     HRESULT CreateEllipseGeometry(const D2D1_ELLIPSE &ellipse, ID2D1EllipseGeometry **ellipseGeometry) {
   1586         return CreateEllipseGeometry(&ellipse, ellipseGeometry);
   1587     }
   1588 
   1589     HRESULT CreateTransformedGeometry(ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F &transform, ID2D1TransformedGeometry **transformedGeometry) {
   1590         return CreateTransformedGeometry(sourceGeometry, &transform, transformedGeometry);
   1591     }
   1592 
   1593     HRESULT CreateStrokeStyle(const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties, const FLOAT *dashes, UINT dashesCount, ID2D1StrokeStyle **strokeStyle) {
   1594         return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle);
   1595     }
   1596 
   1597     HRESULT CreateDrawingStateBlock(const D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription, ID2D1DrawingStateBlock **drawingStateBlock) {
   1598         return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock);
   1599     }
   1600 
   1601     HRESULT CreateDrawingStateBlock(ID2D1DrawingStateBlock **drawingStateBlock) {
   1602         return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock);
   1603     }
   1604 
   1605     HRESULT CreateWicBitmapRenderTarget(IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1RenderTarget **renderTarget) {
   1606         return CreateWicBitmapRenderTarget(target, &renderTargetProperties, renderTarget);
   1607     }
   1608 
   1609     HRESULT CreateHwndRenderTarget(const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES &hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget) {
   1610         return CreateHwndRenderTarget(&renderTargetProperties, &hwndRenderTargetProperties, hwndRenderTarget);
   1611     }
   1612 
   1613     HRESULT CreateDxgiSurfaceRenderTarget(IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties, ID2D1RenderTarget **renderTarget) {
   1614         return CreateDxgiSurfaceRenderTarget(dxgiSurface, &renderTargetProperties, renderTarget);
   1615     }
   1616 };
   1617 
   1618 #else
   1619 
   1620 typedef struct ID2D1FactoryVtbl {
   1621     IUnknownVtbl Base;
   1622 
   1623     STDMETHOD(ReloadSystemMetrics)(ID2D1Factory *This) PURE;
   1624     STDMETHOD_(void, GetDesktopDpi)(ID2D1Factory *This, FLOAT *dpiX, FLOAT *dpiY) PURE;
   1625     STDMETHOD(CreateRectangleGeometry)(ID2D1Factory *This, const D2D1_RECT_F *rectangle, ID2D1RectangleGeometry **rectangleGeometry) PURE;
   1626     STDMETHOD(CreateRoundedRectangleGeometry)(ID2D1Factory *This, const D2D1_ROUNDED_RECT *roundedRectangle, ID2D1RoundedRectangleGeometry **roundedRectangleGeometry) PURE;
   1627     STDMETHOD(CreateEllipseGeometry)(ID2D1Factory *This, const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **ellipseGeometry) PURE;
   1628     STDMETHOD(CreateGeometryGroup)(ID2D1Factory *This, D2D1_FILL_MODE fillMode, ID2D1Geometry **geometries, UINT geometriesCount, ID2D1GeometryGroup **geometryGroup) PURE;
   1629     STDMETHOD(CreateTransformedGeometry)(ID2D1Factory *This, ID2D1Geometry *sourceGeometry, const D2D1_MATRIX_3X2_F *transform, ID2D1TransformedGeometry **transformedGeometry) PURE;
   1630     STDMETHOD(CreatePathGeometry)(ID2D1Factory *This, ID2D1PathGeometry **pathGeometry) PURE;
   1631     STDMETHOD(CreateStrokeStyle)(ID2D1Factory *This, const D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties, const FLOAT *dashes, UINT dashesCount, ID2D1StrokeStyle **strokeStyle) PURE;
   1632     STDMETHOD(CreateDrawingStateBlock)(ID2D1Factory *This, const D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription, IDWriteRenderingParams *textRenderingParams, ID2D1DrawingStateBlock **drawingStateBlock) PURE;
   1633     STDMETHOD(CreateWicBitmapRenderTarget)(ID2D1Factory *This, IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) PURE;
   1634     STDMETHOD(CreateHwndRenderTarget)(ID2D1Factory *This, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties, ID2D1HwndRenderTarget **hwndRenderTarget) PURE;
   1635     STDMETHOD(CreateDxgiSurfaceRenderTarget)(ID2D1Factory *This, IDXGISurface *dxgiSurface, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1RenderTarget **renderTarget) PURE;
   1636     STDMETHOD(CreateDCRenderTarget)(ID2D1Factory *This, const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, ID2D1DCRenderTarget **dcRenderTarget) PURE;
   1637 } ID2D1FactoryVtbl;
   1638 
   1639 interface ID2D1Factory {
   1640     const ID2D1FactoryVtbl *lpVtbl;
   1641 };
   1642 
   1643 #define ID2D1Factory_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown*)this,A,B)
   1644 #define ID2D1Factory_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown*)this)
   1645 #define ID2D1Factory_Release(this) (this)->lpVtbl->Base.Release((IUnknown*)this)
   1646 #define ID2D1Factory_CreateDCRenderTarget(this,A,B) (this)->lpVtbl->CreateDCRenderTarget(this,A,B)
   1647 #define ID2D1Factory_CreateDrawingStateBlock(this,A,B,C) (this)->lpVtbl->CreateDrawingStateBlock(this,A,B,C)
   1648 #define ID2D1Factory_CreateDxgiSurfaceRenderTarget(this,A,B,C) (this)->lpVtbl->CreateDxgiSurfaceRenderTarget(this,A,B,C)
   1649 #define ID2D1Factory_CreateEllipseGeometry(this,A,B) (this)->lpVtbl->CreateEllipseGeometry(this,A,B)
   1650 #define ID2D1Factory_CreateGeometryGroup(this,A,B,C,D) (this)->lpVtbl->CreateGeometryGroup(this,A,B,C,D)
   1651 #define ID2D1Factory_CreateHwndRenderTarget(this,A,B,C) (this)->lpVtbl->CreateHwndRenderTarget(this,A,B,C)
   1652 #define ID2D1Factory_CreatePathGeometry(this,A) (this)->lpVtbl->CreatePathGeometry(this,A)
   1653 #define ID2D1Factory_CreateRectangleGeometry(this,A,B) (this)->lpVtbl->CreateRectangleGeometry(this,A,B)
   1654 #define ID2D1Factory_CreateRoundedRectangleGeometry(this,A,B) (this)->lpVtbl->CreateRoundedRectangleGeometry(this,A,B)
   1655 #define ID2D1Factory_CreateStrokeStyle(this,A,B,C,D) (this)->lpVtbl->CreateStrokeStyle(this,A,B,C,D)
   1656 #define ID2D1Factory_CreateTransformedGeometry(this,A,B,C) (this)->lpVtbl->CreateTransformedGeometry(this,A,B,C)
   1657 #define ID2D1Factory_CreateWicBitmapRenderTarget(this,A,B,C) (this)->lpVtbl->CreateWicBitmapRenderTarget(this,A,B,C)
   1658 #define ID2D1Factory_GetDesktopDpi(this,A,B) (this)->lpVtbl->GetDesktopDpi(this,A,B)
   1659 #define ID2D1Factory_ReloadSystemMetrics(this) (this)->lpVtbl->ReloadSystemMetrics(this)
   1660 
   1661 #endif
   1662 
   1663 DEFINE_GUID(IID_ID2D1GdiInteropRenderTarget, 0xe0db51c3,0x6f77,0x4bae,0xb3,0xd5,0xe4,0x75,0x09,0xb3,0x58,0x38);
   1664 
   1665 #ifndef D2D_USE_C_DEFINITIONS
   1666 
   1667 interface ID2D1GdiInteropRenderTarget : public IUnknown {
   1668     STDMETHOD(GetDC)(D2D1_DC_INITIALIZE_MODE mode, HDC *hdc) PURE;
   1669     STDMETHOD(ReleaseDC)(const RECT *update) PURE;
   1670 };
   1671 
   1672 #else
   1673 
   1674 typedef struct ID2D1GdiInteropRenderTargetVtbl {
   1675     IUnknownVtbl Base;
   1676 
   1677     STDMETHOD(GetDC)(ID2D1GdiInteropRenderTarget *This, D2D1_DC_INITIALIZE_MODE mode, HDC *hdc) PURE;
   1678     STDMETHOD(ReleaseDC)(ID2D1GdiInteropRenderTarget *This, const RECT *update) PURE;
   1679 } ID2D1GdiInteropRenderTargetVtbl;
   1680 
   1681 interface ID2D1GdiInteropRenderTarget {
   1682     const ID2D1GdiInteropRenderTargetVtbl *lpVtbl;
   1683 };
   1684 
   1685 #define ID2D1GdiInteropRenderTarget_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown*)this,A,B)
   1686 #define ID2D1GdiInteropRenderTarget_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown*)this)
   1687 #define ID2D1GdiInteropRenderTarget_Release(this) (this)->lpVtbl->Base.Release((IUnknown*)this)
   1688 #define ID2D1GdiInteropRenderTarget_GetDC(this,A,B) (this)->lpVtbl->GetDC(this,A,B)
   1689 #define ID2D1GdiInteropRenderTarget_ReleaseDC(this,A) (this)->lpVtbl->ReleaseDC(this,A)
   1690 
   1691 #endif
   1692 
   1693 DEFINE_GUID(IID_ID2D1GeometryGroup, 0x2cd906a6,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1694 
   1695 #ifndef D2D_USE_C_DEFINITIONS
   1696 
   1697 interface ID2D1GeometryGroup : public ID2D1Geometry {
   1698     STDMETHOD_(D2D1_FILL_MODE, GetFillMode)() const PURE;
   1699     STDMETHOD_(UINT32, GetSourceGeometryCount)() const PURE;
   1700     STDMETHOD_(void, GetSourceGeometries)(ID2D1Geometry **geometries, UINT geometriesCount) const PURE;
   1701 };
   1702 
   1703 #else
   1704 
   1705 typedef struct ID2D1GeometryGroupVtbl {
   1706     ID2D1GeometryVtbl Base;
   1707 
   1708     STDMETHOD_(D2D1_FILL_MODE, GetFillMode)(ID2D1GeometryGroup *This) PURE;
   1709     STDMETHOD_(UINT32, GetSourceGeometryCount)(ID2D1GeometryGroup *This) PURE;
   1710     STDMETHOD_(void, GetSourceGeometries)(ID2D1GeometryGroup *This, ID2D1Geometry **geometries, UINT geometriesCount) PURE;
   1711 } ID2D1GeometryGroupVtbl;
   1712 
   1713 interface ID2D1GeometryGroup {
   1714     const struct ID2D1GeometryGroupVtbl *lpVtbl;
   1715 };
   1716 
   1717 #define ID2D1GeometryGroup_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1718 #define ID2D1GeometryGroup_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1719 #define ID2D1GeometryGroup_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1720 #define ID2D1GeometryGroup_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1721 #define ID2D1GeometryGroup_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   1722 #define ID2D1GeometryGroup_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   1723 #define ID2D1GeometryGroup_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   1724 #define ID2D1GeometryGroup_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   1725 #define ID2D1GeometryGroup_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   1726 #define ID2D1GeometryGroup_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   1727 #define ID2D1GeometryGroup_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   1728 #define ID2D1GeometryGroup_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   1729 #define ID2D1GeometryGroup_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   1730 #define ID2D1GeometryGroup_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   1731 #define ID2D1GeometryGroup_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   1732 #define ID2D1GeometryGroup_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   1733 #define ID2D1GeometryGroup_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   1734 #define ID2D1GeometryGroup_GetFillMode(this) (this)->lpVtbl->GetFillMode(this)
   1735 #define ID2D1GeometryGroup_GetSourceGeometries(this,A,B) (this)->lpVtbl->GetSourceGeometries(this,A,B)
   1736 #define ID2D1GeometryGroup_GetSourceGeometryCount(this) (this)->lpVtbl->GetSourceGeometryCount(this)
   1737 
   1738 #endif
   1739 
   1740 DEFINE_GUID(IID_ID2D1GeometrySink, 0x2cd9069f,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1741 
   1742 #ifndef D2D_USE_C_DEFINITIONS
   1743 
   1744 interface ID2D1GeometrySink : public ID2D1SimplifiedGeometrySink {
   1745     STDMETHOD_(void, AddLine)(D2D1_POINT_2F point) PURE;
   1746     STDMETHOD_(void, AddBezier)(const D2D1_BEZIER_SEGMENT *bezier) PURE;
   1747     STDMETHOD_(void, AddQuadraticBezier)(const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier) PURE;
   1748     STDMETHOD_(void, AddQuadraticBeziers)(const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers, UINT beziersCount) PURE;
   1749     STDMETHOD_(void, AddArc)(const D2D1_ARC_SEGMENT *arc) PURE;
   1750 
   1751     void AddBezier(const D2D1_BEZIER_SEGMENT &bezier) {
   1752         AddBezier(&bezier);
   1753     }
   1754 
   1755     void AddQuadraticBezier(const D2D1_QUADRATIC_BEZIER_SEGMENT &bezier) {
   1756         AddQuadraticBezier(&bezier);
   1757     }
   1758 
   1759     void  AddArc(const D2D1_ARC_SEGMENT &arc) {
   1760         AddArc(&arc);
   1761     }
   1762 };
   1763 
   1764 #else
   1765 
   1766 typedef struct ID2D1GeometrySinkVtbl {
   1767     ID2D1SimplifiedGeometrySinkVtbl Base;
   1768 
   1769     STDMETHOD_(void, AddLine)(ID2D1GeometrySink *This, D2D1_POINT_2F point) PURE;
   1770     STDMETHOD_(void, AddBezier)(ID2D1GeometrySink *This, const D2D1_BEZIER_SEGMENT *bezier) PURE;
   1771     STDMETHOD_(void, AddQuadraticBezier)(ID2D1GeometrySink *This, const D2D1_QUADRATIC_BEZIER_SEGMENT *bezier) PURE;
   1772     STDMETHOD_(void, AddQuadraticBeziers)(ID2D1GeometrySink *This, const D2D1_QUADRATIC_BEZIER_SEGMENT *beziers, UINT beziersCount) PURE;
   1773     STDMETHOD_(void, AddArc)(ID2D1GeometrySink *This, const D2D1_ARC_SEGMENT *arc) PURE;
   1774 } ID2D1GeometrySinkVtbl;
   1775 
   1776 interface ID2D1GeometrySink {
   1777     const ID2D1GeometrySinkVtbl *lpVtbl;
   1778 };
   1779 
   1780 #define ID2D1GeometrySink_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   1781 #define ID2D1GeometrySink_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   1782 #define ID2D1GeometrySink_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   1783 #define ID2D1GeometrySink_SetFillMode(this,A) (this)->lpVtbl->Base.SetFillMode(this,A)
   1784 #define ID2D1GeometrySink_SetSegmentFlags(this,A) (this)->lpVtbl->Base.SetSegmentFlags(this,A)
   1785 #define ID2D1GeometrySink_BeginFigure(this,A,B) (this)->lpVtbl->Base.BeginFigure(this,A,B)
   1786 #define ID2D1GeometrySink_AddLines(this,A,B) (this)->lpVtbl->Base.AddLines(this,A,B)
   1787 #define ID2D1GeometrySink_AddBeziers(this,A,B) (this)->lpVtbl->Base.AddBeziers(this,A,B)
   1788 #define ID2D1GeometrySink_EndFigure(this,A) (this)->lpVtbl->Base.EndFigure(this,A)
   1789 #define ID2D1GeometrySink_Close(this) (this)->lpVtbl->Base.Close(this)
   1790 #define ID2D1GeometrySink_AddArc(this,A) (this)->lpVtbl->AddArc(this,A)
   1791 #define ID2D1GeometrySink_AddBezier(this,A) (this)->lpVtbl->AddBezier(this,A)
   1792 #define ID2D1GeometrySink_AddLine(this,A) (this)->lpVtbl->AddLine(this,A)
   1793 #define ID2D1GeometrySink_AddQuadraticBezier(this,A) (this)->lpVtbl->AddQuadraticBezier(this,A)
   1794 #define ID2D1GeometrySink_AddQuadraticBeziers(this,A,B) (this)->lpVtbl->AddQuadraticBeziers(this,A,B)
   1795 
   1796 #endif
   1797 
   1798 DEFINE_GUID(IID_ID2D1GradientStopCollection, 0x2cd906a7,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1799 
   1800 #ifndef D2D_USE_C_DEFINITIONS
   1801 
   1802 interface ID2D1GradientStopCollection : public ID2D1Resource {
   1803     STDMETHOD_(UINT32, GetGradientStopCount)(void) const PURE;
   1804     STDMETHOD_(void, GetGradientStops)(D2D1_GRADIENT_STOP *gradientStops, UINT gradientStopsCount) const PURE;
   1805     STDMETHOD_(D2D1_GAMMA, GetColorInterpolationGamma)(void) const PURE;
   1806     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendMode)(void) const PURE;
   1807 };
   1808 
   1809 #else
   1810 
   1811 typedef struct ID2D1GradientStopCollectionVtbl {
   1812     ID2D1ResourceVtbl Base;
   1813 
   1814     STDMETHOD_(UINT32, GetGradientStopCount)(ID2D1GradientStopCollection *This) PURE;
   1815     STDMETHOD_(void, GetGradientStops)(ID2D1GradientStopCollection *This, D2D1_GRADIENT_STOP *gradientStops, UINT gradientStopsCount) PURE;
   1816     STDMETHOD_(D2D1_GAMMA, GetColorInterpolationGamma)(ID2D1GradientStopCollection *This) PURE;
   1817     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendMode)(ID2D1GradientStopCollection *This) PURE;
   1818 } ID2D1GradientStopCollectionVtbl;
   1819 
   1820 interface ID2D1GradientStopCollection {
   1821     const ID2D1GradientStopCollectionVtbl *lpVtbl;
   1822 };
   1823 
   1824 #define ID2D1GradientStopCollection_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   1825 #define ID2D1GradientStopCollection_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   1826 #define ID2D1GradientStopCollection_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   1827 #define ID2D1GradientStopCollection_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   1828 #define ID2D1GradientStopCollection_GetColorInterpolationGamma(this) (this)->lpVtbl->GetColorInterpolationGamma(this)
   1829 #define ID2D1GradientStopCollection_GetExtendMode(this) (this)->lpVtbl->GetExtendMode(this)
   1830 #define ID2D1GradientStopCollection_GetGradientStopCount(this) (this)->lpVtbl->GetGradientStopCount(this)
   1831 #define ID2D1GradientStopCollection_GetGradientStops(this,A,B) (this)->lpVtbl->GetGradientStops(this,A,B)
   1832 
   1833 #endif
   1834 
   1835 #ifndef D2D_USE_C_DEFINITIONS
   1836 
   1837 interface ID2D1HwndRenderTarget : public ID2D1RenderTarget {
   1838     STDMETHOD_(D2D1_WINDOW_STATE, CheckWindowState)() PURE;
   1839     STDMETHOD(Resize)(const D2D1_SIZE_U *pixelSize) PURE;
   1840     STDMETHOD_(HWND, GetHwnd)() const PURE;
   1841 
   1842     HRESULT Resize(const D2D1_SIZE_U &pixelSize) {
   1843         return Resize(&pixelSize);
   1844     }
   1845 };
   1846 
   1847 #else
   1848 
   1849 typedef interface ID2D1HwndRenderTarget ID2D1HwndRenderTarget;
   1850 
   1851 typedef struct ID2D1HwndRenderTargetVtbl {
   1852     ID2D1RenderTargetVtbl Base;
   1853 
   1854     STDMETHOD_(D2D1_WINDOW_STATE, CheckWindowState)(ID2D1HwndRenderTarget *This) PURE;
   1855     STDMETHOD(Resize)(ID2D1HwndRenderTarget *This, const D2D1_SIZE_U *pixelSize) PURE;
   1856     STDMETHOD_(HWND, GetHwnd)(ID2D1HwndRenderTarget *This) PURE;
   1857 } ID2D1HwndRenderTargetVtbl;
   1858 
   1859 interface ID2D1HwndRenderTarget {
   1860     const struct ID2D1HwndRenderTargetVtbl *lpVtbl;
   1861 };
   1862 
   1863 #define ID2D1HwndRenderTarget_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1864 #define ID2D1HwndRenderTarget_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1865 #define ID2D1HwndRenderTarget_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1866 #define ID2D1HwndRenderTarget_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1867 #define ID2D1HwndRenderTarget_BeginDraw(this) (this)->lpVtbl->Base.BeginDraw(this)
   1868 #define ID2D1HwndRenderTarget_Clear(this,A) (this)->lpVtbl->Base.Clear(this,A)
   1869 #define ID2D1HwndRenderTarget_CreateBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.CreateBitmap(this,A,B,C,D,E)
   1870 #define ID2D1HwndRenderTarget_CreateBitmapBrush(this,A,B) (this)->lpVtbl->Base.CreateBitmapBrush(this,A,B)
   1871 #define ID2D1HwndRenderTarget_CreateBitmapFromWicBitmap(this,A,B) (this)->lpVtbl->Base.CreateBitmapFromWicBitmap(this,A,B)
   1872 #define ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(this,A) (this)->lpVtbl->Base.CreateCompatibleRenderTarget(this,A)
   1873 #define ID2D1HwndRenderTarget_CreateGradientStopCollection(this,A,B,C) (this)->lpVtbl->Base.CreateGradientStopCollection(this,A,B,C)
   1874 #define ID2D1HwndRenderTarget_CreateLayer(this,A) (this)->lpVtbl->Base.CreateLayer(this,A)
   1875 #define ID2D1HwndRenderTarget_CreateLinearGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateLinearGradientBrush(this,A,B,C,D)
   1876 #define ID2D1HwndRenderTarget_CreateMesh(this,A) (this)->lpVtbl->Base.CreateMesh(this,A)
   1877 #define ID2D1HwndRenderTarget_CreateRadialGradientBrush(this,A,B,C,D) (this)->lpVtbl->Base.CreateRadialGradientBrush(this,A,B,C,D)
   1878 #define ID2D1HwndRenderTarget_CreateSharedBitmap(this,A,B,C,D) (this)->lpVtbl->Base.CreateSharedBitmap(this,A,B,C,D)
   1879 #define ID2D1HwndRenderTarget_CreateSolidColorBrush(this,A,B,C) (this)->lpVtbl->Base.CreateSolidColorBrush(this,A,B,C)
   1880 #define ID2D1HwndRenderTarget_DrawBitmap(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawBitmap(this,A,B,C,D,E)
   1881 #define ID2D1HwndRenderTarget_DrawEllipse(this,A,B,C,D) (this)->lpVtbl->Base.DrawEllipse(this,A,B,C,D)
   1882 #define ID2D1HwndRenderTarget_DrawGeometry(this,A,B,C,D) (this)->lpVtbl->Base.DrawGeometry(this,A,B,C,D)
   1883 #define ID2D1HwndRenderTarget_DrawGlyphRun(this,A,B,C,D) (this)->lpVtbl->Base.DrawGlyphRun(this,A,B,C,D)
   1884 #define ID2D1HwndRenderTarget_DrawLine(this,A,B,C,D,E) (this)->lpVtbl->Base.DrawLine(this,A,B,C,D,E)
   1885 #define ID2D1HwndRenderTarget_DrawRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRectangle(this,A,B,C,D)
   1886 #define ID2D1HwndRenderTarget_DrawRoundedRectangle(this,A,B,C,D) (this)->lpVtbl->Base.DrawRoundedRectangle(this,A,B,C,D)
   1887 #define ID2D1HwndRenderTarget_DrawText(this,A,B,C,D,E,F,G) (this)->lpVtbl->Base.DrawText(this,A,B,C,D,E,F,G)
   1888 #define ID2D1HwndRenderTarget_DrawTextLayout(this,A,B,C,D) (this)->lpVtbl->Base.DrawTextLayout(this,A,B,C,D)
   1889 #define ID2D1HwndRenderTarget_EndDraw(this,A,B) (this)->lpVtbl->Base.EndDraw(this,A,B)
   1890 #define ID2D1HwndRenderTarget_FillEllipse(this,A,B) (this)->lpVtbl->Base.FillEllipse(this,A,B)
   1891 #define ID2D1HwndRenderTarget_FillGeometry(this,A,B,C) (this)->lpVtbl->Base.FillGeometry(this,A,B,C)
   1892 #define ID2D1HwndRenderTarget_FillMesh(this,A,B) (this)->lpVtbl->Base.FillMesh(this,A,B)
   1893 #define ID2D1HwndRenderTarget_FillOpacityMask(this,A,B,C,D,E) (this)->lpVtbl->Base.FillOpacityMask(this,A,B,C,D,E)
   1894 #define ID2D1HwndRenderTarget_FillRectangle(this,A,B) (this)->lpVtbl->Base.FillRectangle(this,A,B)
   1895 #define ID2D1HwndRenderTarget_FillRoundedRectangle(this,A,B) (this)->lpVtbl->Base.FillRoundedRectangle(this,A,B)
   1896 #define ID2D1HwndRenderTarget_Flush(this,A,B) (this)->lpVtbl->Base.Flush(this,A,B)
   1897 #define ID2D1HwndRenderTarget_GetAntialiasMode(this) (this)->lpVtbl->Base.GetAntialiasMode(this)
   1898 #define ID2D1HwndRenderTarget_GetDpi(this,A,B) (this)->lpVtbl->Base.GetDpi(this,A,B)
   1899 #define ID2D1HwndRenderTarget_GetMaximumBitmapSize(this) (this)->lpVtbl->Base.GetMaximumBitmapSize(this)
   1900 #define ID2D1HwndRenderTarget_GetPixelFormat(this) (this)->lpVtbl->Base.GetPixelFormat(this)
   1901 #define ID2D1HwndRenderTarget_GetPixelSize(this) (this)->lpVtbl->Base.GetPixelSize(this)
   1902 #define ID2D1HwndRenderTarget_GetSize(this) (this)->lpVtbl->Base.GetSize(this)
   1903 #define ID2D1HwndRenderTarget_GetTags(this,A,B) (this)->lpVtbl->Base.GetTags(this,A,B)
   1904 #define ID2D1HwndRenderTarget_GetTextAntialiasMode(this) (this)->lpVtbl->Base.GetTextAntialiasMode(this)
   1905 #define ID2D1HwndRenderTarget_GetTextRenderingParams(this,A) (this)->lpVtbl->Base.GetTextRenderingParams(this,A)
   1906 #define ID2D1HwndRenderTarget_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   1907 #define ID2D1HwndRenderTarget_IsSupported(this,A) (this)->lpVtbl->Base.IsSupported(this,A)
   1908 #define ID2D1HwndRenderTarget_PopAxisAlignedClip(this) (this)->lpVtbl->Base.PopAxisAlignedClip(this)
   1909 #define ID2D1HwndRenderTarget_PopLayer(this) (this)->lpVtbl->Base.PopLayer(this)
   1910 #define ID2D1HwndRenderTarget_PushAxisAlignedClip(this,A,B) (this)->lpVtbl->Base.PushAxisAlignedClip(this,A,B)
   1911 #define ID2D1HwndRenderTarget_PushLayer(this,A,B) (this)->lpVtbl->Base.PushLayer(this,A,B)
   1912 #define ID2D1HwndRenderTarget_RestoreDrawingState(this,A) (this)->lpVtbl->Base.RestoreDrawingState(this,A)
   1913 #define ID2D1HwndRenderTarget_SaveDrawingState(this,A) (this)->lpVtbl->Base.SaveDrawingState(this,A)
   1914 #define ID2D1HwndRenderTarget_SetAntialiasMode(this,A) (this)->lpVtbl->Base.SetAntialiasMode(this,A)
   1915 #define ID2D1HwndRenderTarget_SetDpi(this,A,B) (this)->lpVtbl->Base.SetDpi(this,A,B)
   1916 #define ID2D1HwndRenderTarget_SetTags(this,A,B) (this)->lpVtbl->Base.SetTags(this,A,B)
   1917 #define ID2D1HwndRenderTarget_SetTextAntialiasMode(this,A) (this)->lpVtbl->Base.SetTextAntialiasMode(this,A)
   1918 #define ID2D1HwndRenderTarget_SetTextRenderingParams(this,A) (this)->lpVtbl->Base.SetTextRenderingParams(this,A)
   1919 #define ID2D1HwndRenderTarget_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   1920 #define ID2D1HwndRenderTarget_CheckWindowState(this) (this)->lpVtbl->CheckWindowState(this)
   1921 #define ID2D1HwndRenderTarget_GetHwnd(this) (this)->lpVtbl->GetHwnd(this)
   1922 #define ID2D1HwndRenderTarget_Resize(this,A) (this)->lpVtbl->Resize(this,A)
   1923 
   1924 #endif
   1925 
   1926 DEFINE_GUID(IID_ID2D1Layer, 0x2cd9069b,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1927 
   1928 #ifndef D2D_USE_C_DEFINITIONS
   1929 
   1930 interface ID2D1Layer : public ID2D1Resource {
   1931     STDMETHOD_(D2D1_SIZE_F, GetSize)(void) const PURE;
   1932 };
   1933 
   1934 #else
   1935 
   1936 typedef struct ID2D1LayerVtbl {
   1937     ID2D1ResourceVtbl Base;
   1938 
   1939     STDMETHOD_(D2D1_SIZE_F, GetSize)(ID2D1Layer *This) PURE;
   1940 } ID2D1LayerVtbl;
   1941 
   1942 interface ID2D1Layer {
   1943     const ID2D1LayerVtbl *lpVtbl;
   1944 };
   1945 
   1946 #define ID2D1Layer_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   1947 #define ID2D1Layer_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   1948 #define ID2D1Layer_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   1949 #define ID2D1Layer_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   1950 #define ID2D1Layer_GetSize(this) (this)->lpVtbl->GetSize(this)
   1951 
   1952 #endif
   1953 
   1954 DEFINE_GUID(IID_ID2D1LinearGradientBrush, 0x2cd906ab,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1955 
   1956 #ifndef D2D_USE_C_DEFINITIONS
   1957 
   1958 interface ID2D1LinearGradientBrush : public ID2D1Brush {
   1959     STDMETHOD_(void, SetStartPoint)(D2D1_POINT_2F startPoint) PURE;
   1960     STDMETHOD_(void, SetEndPoint)(D2D1_POINT_2F endPoint) PURE;
   1961     STDMETHOD_(D2D1_POINT_2F, GetStartPoint)(void) const PURE;
   1962     STDMETHOD_(D2D1_POINT_2F, GetEndPoint)(void) const PURE;
   1963     STDMETHOD_(void, GetGradientStopCollection)(ID2D1GradientStopCollection **gradientStopCollection) const PURE;
   1964 };
   1965 
   1966 #else
   1967 
   1968 typedef struct ID2D1LinearGradientBrushVtbl {
   1969     ID2D1BrushVtbl Base;
   1970 
   1971     STDMETHOD_(void, SetStartPoint)(ID2D1LinearGradientBrush *This, D2D1_POINT_2F startPoint) PURE;
   1972     STDMETHOD_(void, SetEndPoint)(ID2D1LinearGradientBrush *This, D2D1_POINT_2F endPoint) PURE;
   1973     STDMETHOD_(D2D1_POINT_2F, GetStartPoint)(ID2D1LinearGradientBrush *This) PURE;
   1974     STDMETHOD_(D2D1_POINT_2F, GetEndPoint)(ID2D1LinearGradientBrush *This) PURE;
   1975     STDMETHOD_(void, GetGradientStopCollection)(ID2D1LinearGradientBrush *This, ID2D1GradientStopCollection **gradientStopCollection) PURE;
   1976 } ID2D1LinearGradientBrushVtbl;
   1977 
   1978 interface ID2D1LinearGradientBrush {
   1979     const ID2D1LinearGradientBrushVtbl *lpVtbl;
   1980 };
   1981 
   1982 #define ID2D1LinearGradientBrush_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   1983 #define ID2D1LinearGradientBrush_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   1984 #define ID2D1LinearGradientBrush_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   1985 #define ID2D1LinearGradientBrush_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   1986 #define ID2D1LinearGradientBrush_SetOpacity(this,A) (this)->lpVtbl->Base.SetOpacity(this,A)
   1987 #define ID2D1LinearGradientBrush_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   1988 #define ID2D1LinearGradientBrush_GetOpacity(this) (this)->lpVtbl->Base.GetOpacity(this)
   1989 #define ID2D1LinearGradientBrush_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   1990 #define ID2D1LinearGradientBrush_GetEndPoint(this) (this)->lpVtbl->GetEndPoint(this)
   1991 #define ID2D1LinearGradientBrush_GetGradientStopCollection(this,A) (this)->lpVtbl->GetGradientStopCollection(this,A)
   1992 #define ID2D1LinearGradientBrush_GetStartPoint(this) (this)->lpVtbl->GetStartPoint(this)
   1993 #define ID2D1LinearGradientBrush_SetEndPoint(this,A) (this)->lpVtbl->SetEndPoint(this,A)
   1994 #define ID2D1LinearGradientBrush_SetStartPoint(this,A) (this)->lpVtbl->SetStartPoint(this,A)
   1995 
   1996 #endif
   1997 
   1998 DEFINE_GUID(IID_ID2D1Mesh,0x2cd906c2,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   1999 
   2000 #ifndef D2D_USE_C_DEFINITIONS
   2001 
   2002 interface ID2D1Mesh : public ID2D1Resource {
   2003     STDMETHOD(Open)(ID2D1TessellationSink **tessellationSink) PURE;
   2004 };
   2005 
   2006 #else
   2007 
   2008 typedef struct ID2D1MeshVtbl{
   2009     ID2D1ResourceVtbl Base;
   2010 
   2011     STDMETHOD(Open)(ID2D1Mesh *This, ID2D1TessellationSink **tessellationSink) PURE;
   2012 } ID2D1MeshVtbl;
   2013 
   2014 interface ID2D1Mesh {
   2015     const struct ID2D1MeshVtbl *lpVtbl;
   2016 };
   2017 
   2018 #define ID2D1Mesh_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   2019 #define ID2D1Mesh_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   2020 #define ID2D1Mesh_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   2021 #define ID2D1Mesh_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   2022 #define ID2D1Mesh_Open(this,A) (this)->lpVtbl->Open(this,A)
   2023 
   2024 #endif
   2025 
   2026 DEFINE_GUID(IID_ID2D1PathGeometry, 0x2cd906a5,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2027 
   2028 #ifndef D2D_USE_C_DEFINITIONS
   2029 
   2030 interface ID2D1PathGeometry : public ID2D1Geometry {
   2031     STDMETHOD(Open)(ID2D1GeometrySink **geometrySink) PURE;
   2032     STDMETHOD(Stream)(ID2D1GeometrySink *geometrySink) const PURE;
   2033     STDMETHOD(GetSegmentCount)(UINT32 *count) const PURE;
   2034     STDMETHOD(GetFigureCount)(UINT32 *count) const PURE;
   2035 };
   2036 
   2037 #else
   2038 
   2039 typedef struct ID2D1PathGeometryVtbl {
   2040     ID2D1GeometryVtbl Base;
   2041 
   2042     STDMETHOD(Open)(ID2D1PathGeometry *This, ID2D1GeometrySink **geometrySink) PURE;
   2043     STDMETHOD(Stream)(ID2D1PathGeometry *This, ID2D1GeometrySink *geometrySink) PURE;
   2044     STDMETHOD(GetSegmentCount)(ID2D1PathGeometry *This, UINT32 *count) PURE;
   2045     STDMETHOD(GetFigureCount)(ID2D1PathGeometry *This, UINT32 *count) PURE;
   2046 } ID2D1PathGeometryVtbl;
   2047 
   2048 interface ID2D1PathGeometry {
   2049     const ID2D1PathGeometryVtbl *lpVtbl;
   2050 };
   2051 
   2052 #define ID2D1PathGeometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2053 #define ID2D1PathGeometry_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2054 #define ID2D1PathGeometry_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2055 #define ID2D1PathGeometry_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2056 #define ID2D1PathGeometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   2057 #define ID2D1PathGeometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   2058 #define ID2D1PathGeometry_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   2059 #define ID2D1PathGeometry_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   2060 #define ID2D1PathGeometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   2061 #define ID2D1PathGeometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   2062 #define ID2D1PathGeometry_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   2063 #define ID2D1PathGeometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   2064 #define ID2D1PathGeometry_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   2065 #define ID2D1PathGeometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   2066 #define ID2D1PathGeometry_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   2067 #define ID2D1PathGeometry_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   2068 #define ID2D1PathGeometry_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   2069 #define ID2D1PathGeometry_Open(this,A) (this)->lpVtbl->Open(this,A)
   2070 #define ID2D1PathGeometry_Stream(this,A) (this)->lpVtbl->Stream(this,A)
   2071 #define ID2D1PathGeometry_GetSegmentCount(this,A) (this)->lpVtbl->GetSegmentCount(this,A)
   2072 #define ID2D1PathGeometry_GetFigureCount(this,A) (this)->lpVtbl->GetFigureCount(this,A)
   2073 
   2074 #endif
   2075 
   2076 DEFINE_GUID(IID_ID2D1RadialGradientBrush, 0x2cd906ac,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2077 
   2078 #ifndef D2D_USE_C_DEFINITIONS
   2079 
   2080 interface ID2D1RadialGradientBrush : public ID2D1Brush {
   2081     STDMETHOD_(void, SetCenter)(D2D1_POINT_2F center) PURE;
   2082     STDMETHOD_(void, SetGradientOriginOffset)(D2D1_POINT_2F gradientOriginOffset) PURE;
   2083     STDMETHOD_(void, SetRadiusX)(FLOAT radiusX) PURE;
   2084     STDMETHOD_(void, SetRadiusY)(FLOAT radiusY) PURE;
   2085     STDMETHOD_(D2D1_POINT_2F, GetCenter)(void) const PURE;
   2086     STDMETHOD_(D2D1_POINT_2F, GetGradientOriginOffset)(void) const PURE;
   2087     STDMETHOD_(FLOAT, GetRadiusX)(void) const PURE;
   2088     STDMETHOD_(FLOAT, GetRadiusY)(void) const PURE;
   2089     STDMETHOD_(void, GetGradientStopCollection)(ID2D1GradientStopCollection **gradientStopCollection) const PURE;
   2090 };
   2091 
   2092 #else
   2093 
   2094 typedef struct ID2D1RadialGradientBrushVtbl {
   2095     ID2D1BrushVtbl Base;
   2096 
   2097     STDMETHOD_(void, SetCenter)(ID2D1RadialGradientBrush *This, D2D1_POINT_2F center) PURE;
   2098     STDMETHOD_(void, SetGradientOriginOffset)(ID2D1RadialGradientBrush *This, D2D1_POINT_2F gradientOriginOffset) PURE;
   2099     STDMETHOD_(void, SetRadiusX)(ID2D1RadialGradientBrush *This, FLOAT radiusX) PURE;
   2100     STDMETHOD_(void, SetRadiusY)(ID2D1RadialGradientBrush *This, FLOAT radiusY) PURE;
   2101     STDMETHOD_(D2D1_POINT_2F, GetCenter)(ID2D1RadialGradientBrush *This) PURE;
   2102     STDMETHOD_(D2D1_POINT_2F, GetGradientOriginOffset)(ID2D1RadialGradientBrush *This) PURE;
   2103     STDMETHOD_(FLOAT, GetRadiusX)(ID2D1RadialGradientBrush *This) PURE;
   2104     STDMETHOD_(FLOAT, GetRadiusY)(ID2D1RadialGradientBrush *This) PURE;
   2105     STDMETHOD_(void, GetGradientStopCollection)(ID2D1RadialGradientBrush *This, ID2D1GradientStopCollection **gradientStopCollection) PURE;
   2106 } ID2D1RadialGradientBrushVtbl;
   2107 
   2108 interface ID2D1RadialGradientBrush {
   2109     const ID2D1RadialGradientBrushVtbl *lpVtbl;
   2110 };
   2111 
   2112 #define ID2D1RadialGradientBrush_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2113 #define ID2D1RadialGradientBrush_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2114 #define ID2D1RadialGradientBrush_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2115 #define ID2D1RadialGradientBrush_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2116 #define ID2D1RadialGradientBrush_SetOpacity(this,A) (this)->lpVtbl->Base.SetOpacity(this,A)
   2117 #define ID2D1RadialGradientBrush_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   2118 #define ID2D1RadialGradientBrush_GetOpacity(this) (this)->lpVtbl->Base.GetOpacity(this)
   2119 #define ID2D1RadialGradientBrush_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   2120 #define ID2D1RadialGradientBrush_GetCenter(this) (this)->lpVtbl->GetCenter(this)
   2121 #define ID2D1RadialGradientBrush_GetGradientOriginOffset(this) (this)->lpVtbl->GetGradientOriginOffset(this)
   2122 #define ID2D1RadialGradientBrush_GetGradientStopCollection(this,A) (this)->lpVtbl->GetGradientStopCollection(this,A)
   2123 #define ID2D1RadialGradientBrush_GetRadiusX(this) (this)->lpVtbl->GetRadiusX(this)
   2124 #define ID2D1RadialGradientBrush_GetRadiusY(this) (this)->lpVtbl->GetRadiusY(this)
   2125 #define ID2D1RadialGradientBrush_SetCenter(this,A) (this)->lpVtbl->SetCenter(this,A)
   2126 #define ID2D1RadialGradientBrush_SetGradientOriginOffset(this,A) (this)->lpVtbl->SetGradientOriginOffset(this,A)
   2127 #define ID2D1RadialGradientBrush_SetRadiusX(this,A) (this)->lpVtbl->SetRadiusX(this,A)
   2128 #define ID2D1RadialGradientBrush_SetRadiusY(this,A) (this)->lpVtbl->SetRadiusY(this,A)
   2129 
   2130 #endif
   2131 
   2132 DEFINE_GUID(IID_ID2D1RectangleGeometry, 0x2cd906a2,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2133 
   2134 #ifndef D2D_USE_C_DEFINITIONS
   2135 
   2136 interface ID2D1RectangleGeometry : public ID2D1Geometry {
   2137     STDMETHOD_(void, GetRect)(D2D1_RECT_F *rect) const PURE;
   2138 };
   2139 
   2140 #else
   2141 
   2142 typedef struct ID2D1RectangleGeometryVtbl {
   2143     ID2D1GeometryVtbl Base;
   2144 
   2145     STDMETHOD_(void, GetRect)(ID2D1RectangleGeometry *This, D2D1_RECT_F *rect) PURE;
   2146 } ID2D1RectangleGeometryVtbl;
   2147 
   2148 interface ID2D1RectangleGeometry {
   2149     const ID2D1RectangleGeometryVtbl *lpVtbl;
   2150 };
   2151 
   2152 #define ID2D1RectangleGeometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2153 #define ID2D1RectangleGeometry_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2154 #define ID2D1RectangleGeometry_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2155 #define ID2D1RectangleGeometry_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2156 #define ID2D1RectangleGeometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   2157 #define ID2D1RectangleGeometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   2158 #define ID2D1RectangleGeometry_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   2159 #define ID2D1RectangleGeometry_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   2160 #define ID2D1RectangleGeometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   2161 #define ID2D1RectangleGeometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   2162 #define ID2D1RectangleGeometry_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   2163 #define ID2D1RectangleGeometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   2164 #define ID2D1RectangleGeometry_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   2165 #define ID2D1RectangleGeometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   2166 #define ID2D1RectangleGeometry_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   2167 #define ID2D1RectangleGeometry_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   2168 #define ID2D1RectangleGeometry_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   2169 #define ID2D1RectangleGeometry_GetRect(this,A) (this)->lpVtbl->GetRect(this,A)
   2170 
   2171 #endif
   2172 
   2173 DEFINE_GUID(IID_ID2D1RoundedRectangleGeometry, 0x2cd906a3,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2174 
   2175 #ifndef D2D_USE_C_DEFINITIONS
   2176 
   2177 interface ID2D1RoundedRectangleGeometry : public ID2D1Geometry {
   2178     STDMETHOD_(void, GetRoundedRect)(D2D1_ROUNDED_RECT *roundedRect) const PURE;
   2179 };
   2180 
   2181 #else
   2182 
   2183 typedef struct ID2D1RoundedRectangleGeometryVtbl {
   2184     ID2D1GeometryVtbl Base;
   2185 
   2186     STDMETHOD_(void, GetRoundedRect)(ID2D1RoundedRectangleGeometry *This, D2D1_ROUNDED_RECT *roundedRect) PURE;
   2187 } ID2D1RoundedRectangleGeometryVtbl;
   2188 
   2189 interface ID2D1RoundedRectangleGeometry {
   2190     const struct ID2D1RoundedRectangleGeometryVtbl *lpVtbl;
   2191 };
   2192 
   2193 #define ID2D1RoundedRectangleGeometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2194 #define ID2D1RoundedRectangleGeometry_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2195 #define ID2D1RoundedRectangleGeometry_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2196 #define ID2D1RoundedRectangleGeometry_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2197 #define ID2D1RoundedRectangleGeometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   2198 #define ID2D1RoundedRectangleGeometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   2199 #define ID2D1RoundedRectangleGeometry_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   2200 #define ID2D1RoundedRectangleGeometry_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   2201 #define ID2D1RoundedRectangleGeometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   2202 #define ID2D1RoundedRectangleGeometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   2203 #define ID2D1RoundedRectangleGeometry_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   2204 #define ID2D1RoundedRectangleGeometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   2205 #define ID2D1RoundedRectangleGeometry_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   2206 #define ID2D1RoundedRectangleGeometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   2207 #define ID2D1RoundedRectangleGeometry_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   2208 #define ID2D1RoundedRectangleGeometry_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   2209 #define ID2D1RoundedRectangleGeometry_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   2210 #define ID2D1RoundedRectangleGeometry_GetRoundedRect(this,A) (this)->lpVtbl->GetRoundedRect(this,A)
   2211 
   2212 #endif
   2213 
   2214 DEFINE_GUID(IID_ID2D1SolidColorBrush, 0x2cd906a9,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2215 
   2216 #ifndef D2D_USE_C_DEFINITIONS
   2217 
   2218 interface ID2D1SolidColorBrush : public ID2D1Brush {
   2219     STDMETHOD_(void, SetColor)(const D2D1_COLOR_F *color) PURE;
   2220     STDMETHOD_(D2D1_COLOR_F, GetColor)(void) const PURE;
   2221 
   2222     void SetColor(const D2D1_COLOR_F &color) {
   2223         SetColor(&color);
   2224     }
   2225 };
   2226 
   2227 #else
   2228 
   2229 typedef struct ID2D1SolidColorBrushVtbl {
   2230     ID2D1BrushVtbl Base;
   2231 
   2232     STDMETHOD_(void, SetColor)(ID2D1SolidColorBrush *This, const D2D1_COLOR_F *color) PURE;
   2233     STDMETHOD_(D2D1_COLOR_F, GetColor)(ID2D1SolidColorBrush *This) PURE;
   2234 } ID2D1SolidColorBrushVtbl;
   2235 
   2236 interface ID2D1SolidColorBrush {
   2237     const ID2D1SolidColorBrushVtbl *lpVtbl;
   2238 };
   2239 
   2240 #define ID2D1SolidColorBrush_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2241 #define ID2D1SolidColorBrush_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2242 #define ID2D1SolidColorBrush_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2243 #define ID2D1SolidColorBrush_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2244 #define ID2D1SolidColorBrush_SetOpacity(this,A) (this)->lpVtbl->Base.SetOpacity(this,A)
   2245 #define ID2D1SolidColorBrush_SetTransform(this,A) (this)->lpVtbl->Base.SetTransform(this,A)
   2246 #define ID2D1SolidColorBrush_GetOpacity(this) (this)->lpVtbl->Base.GetOpacity(this)
   2247 #define ID2D1SolidColorBrush_GetTransform(this,A) (this)->lpVtbl->Base.GetTransform(this,A)
   2248 #define ID2D1SolidColorBrush_GetColor(this) (this)->lpVtbl->GetColor(this)
   2249 #define ID2D1SolidColorBrush_SetColor(this,A) (this)->lpVtbl->SetColor(this,A)
   2250 
   2251 #endif
   2252 
   2253 DEFINE_GUID(IID_ID2D1StrokeStyle, 0x2cd9069d,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2254 
   2255 #ifndef D2D_USE_C_DEFINITIONS
   2256 
   2257 interface ID2D1StrokeStyle : public ID2D1Resource {
   2258     STDMETHOD_(D2D1_CAP_STYLE, GetStartCap)(void) const PURE;
   2259     STDMETHOD_(D2D1_CAP_STYLE, GetEndCap)(void) const PURE;
   2260     STDMETHOD_(D2D1_CAP_STYLE, GetDashCap)(void) const PURE;
   2261     STDMETHOD_(FLOAT, GetMiterLimit)(void) const PURE;
   2262     STDMETHOD_(D2D1_LINE_JOIN, GetLineJoin)(void) const PURE;
   2263     STDMETHOD_(FLOAT, GetDashOffset)(void) const PURE;
   2264     STDMETHOD_(D2D1_DASH_STYLE, GetDashStyle)(void) const PURE;
   2265     STDMETHOD_(UINT32, GetDashesCount)(void) const PURE;
   2266     STDMETHOD_(void, GetDashes)(FLOAT *dashes, UINT dashesCount) const PURE;
   2267 };
   2268 
   2269 #else
   2270 
   2271 typedef struct ID2D1StrokeStyleVtbl {
   2272     ID2D1ResourceVtbl Base;
   2273 
   2274     STDMETHOD_(D2D1_CAP_STYLE, GetStartCap)(ID2D1StrokeStyle *This) PURE;
   2275     STDMETHOD_(D2D1_CAP_STYLE, GetEndCap)(ID2D1StrokeStyle *This) PURE;
   2276     STDMETHOD_(D2D1_CAP_STYLE, GetDashCap)(ID2D1StrokeStyle *This) PURE;
   2277     STDMETHOD_(FLOAT, GetMiterLimit)(ID2D1StrokeStyle *This) PURE;
   2278     STDMETHOD_(D2D1_LINE_JOIN, GetLineJoin)(ID2D1StrokeStyle *This) PURE;
   2279     STDMETHOD_(FLOAT, GetDashOffset)(ID2D1StrokeStyle *This) PURE;
   2280     STDMETHOD_(D2D1_DASH_STYLE, GetDashStyle)(ID2D1StrokeStyle *This) PURE;
   2281     STDMETHOD_(UINT32, GetDashesCount)(ID2D1StrokeStyle *This) PURE;
   2282     STDMETHOD_(void, GetDashes)(ID2D1StrokeStyle *This, FLOAT *dashes, UINT dashesCount) PURE;
   2283 } ID2D1StrokeStyleVtbl;
   2284 
   2285 interface ID2D1StrokeStyle {
   2286     const ID2D1StrokeStyleVtbl *lpVtbl;
   2287 };
   2288 
   2289 #define ID2D1StrokeStyle_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.QueryInterface((IUnknown*)this,A,B)
   2290 #define ID2D1StrokeStyle_AddRef(this) (this)->lpVtbl->Base.Base.AddRef((IUnknown*)this)
   2291 #define ID2D1StrokeStyle_Release(this) (this)->lpVtbl->Base.Base.Release((IUnknown*)this)
   2292 #define ID2D1StrokeStyle_GetFactory(this,A) (this)->lpVtbl->Base.GetFactory((ID2D1Resource*)this,A)
   2293 #define ID2D1StrokeStyle_GetDashCap(this) (this)->lpVtbl->GetDashCap(this)
   2294 #define ID2D1StrokeStyle_GetDashes(this,A,B) (this)->lpVtbl->GetDashes(this,A,B)
   2295 #define ID2D1StrokeStyle_GetDashesCount(this) (this)->lpVtbl->GetDashesCount(this)
   2296 #define ID2D1StrokeStyle_GetDashOffset(this) (this)->lpVtbl->GetDashOffset(this)
   2297 #define ID2D1StrokeStyle_GetDashStyle(this) (this)->lpVtbl->GetDashStyle(this)
   2298 #define ID2D1StrokeStyle_GetEndCap(this) (this)->lpVtbl->GetEndCap(this)
   2299 #define ID2D1StrokeStyle_GetLineJoin(this) (this)->lpVtbl->GetLineJoin(this)
   2300 #define ID2D1StrokeStyle_GetMiterLimit(this) (this)->lpVtbl->GetMiterLimit(this)
   2301 #define ID2D1StrokeStyle_GetStartCap(this) (this)->lpVtbl->GetStartCap(this)
   2302 
   2303 #endif
   2304 
   2305 DEFINE_GUID(IID_ID2D1TessellationSink, 0x2cd906c1,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2306 
   2307 #ifndef D2D_USE_C_DEFINITIONS
   2308 
   2309 interface ID2D1TessellationSink : public IUnknown {
   2310     STDMETHOD_(void, AddTriangles)(const D2D1_TRIANGLE *triangles, UINT trianglesCount) PURE;
   2311     STDMETHOD(Close)() PURE;
   2312 };
   2313 
   2314 #else
   2315 
   2316 typedef struct ID2D1TessellationSinkVtbl {
   2317     IUnknownVtbl Base;
   2318 
   2319     STDMETHOD_(void, AddTriangles)(ID2D1TessellationSink *This, const D2D1_TRIANGLE *triangles, UINT trianglesCount) PURE;
   2320     STDMETHOD(Close)(ID2D1TessellationSink *This) PURE;
   2321 } ID2D1TessellationSinkVtbl;
   2322 
   2323 interface ID2D1TessellationSink {
   2324     const struct ID2D1TessellationSinkVtbl *lpVtbl;
   2325 };
   2326 
   2327 #define ID2D1TessellationSink_QueryInterface(this,A,B) (this)->lpVtbl->Base.QueryInterface((IUnknown*)this,A,B)
   2328 #define ID2D1TessellationSink_AddRef(this) (this)->lpVtbl->Base.AddRef((IUnknown*)this)
   2329 #define ID2D1TessellationSink_Release(this) (this)->lpVtbl->Base.Release((IUnknown*)this)
   2330 #define ID2D1TessellationSink_AddTriangles(this,A,B) (this)->lpVtbl->AddTriangles(this,A,B)
   2331 #define ID2D1TessellationSink_Close(this) (this)->lpVtbl->Close(this)
   2332 
   2333 #endif
   2334 
   2335 DEFINE_GUID(IID_ID2D1TransformedGeometry, 0x2cd906bb,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2336 
   2337 #ifndef D2D_USE_C_DEFINITIONS
   2338 
   2339 interface ID2D1TransformedGeometry : public ID2D1Geometry {
   2340     STDMETHOD_(void, GetSourceGeometry)(ID2D1Geometry **sourceGeometry) const PURE;
   2341     STDMETHOD_(void, GetTransform)(D2D1_MATRIX_3X2_F *transform) const PURE;
   2342 };
   2343 
   2344 #else
   2345 
   2346 typedef struct ID2D1TransformedGeometryVtbl {
   2347     ID2D1GeometryVtbl Base;
   2348 
   2349     STDMETHOD_(void, GetSourceGeometry)(ID2D1TransformedGeometry *This, ID2D1Geometry **sourceGeometry) PURE;
   2350     STDMETHOD_(void, GetTransform)(ID2D1TransformedGeometry *This, D2D1_MATRIX_3X2_F *transform) PURE;
   2351 } ID2D1TransformedGeometryVtbl;
   2352 
   2353 interface ID2D1TransformedGeometry {
   2354     const ID2D1TransformedGeometryVtbl *lpVtbl;
   2355 };
   2356 
   2357 #define ID2D1TransformedGeometry_QueryInterface(this,A,B) (this)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown*)this,A,B)
   2358 #define ID2D1TransformedGeometry_AddRef(this) (this)->lpVtbl->Base.Base.Base.AddRef((IUnknown*)this)
   2359 #define ID2D1TransformedGeometry_Release(this) (this)->lpVtbl->Base.Base.Base.Release((IUnknown*)this)
   2360 #define ID2D1TransformedGeometry_GetFactory(this,A) (this)->lpVtbl->Base.Base.GetFactory((ID2D1Resource*)this,A)
   2361 #define ID2D1TransformedGeometry_CombineWithGeometry(this,A,B,C,D) (this)->lpVtbl->Base.CombineWithGeometry(this,A,B,C,D)
   2362 #define ID2D1TransformedGeometry_CompareWithGeometry(this,A,B,C) (this)->lpVtbl->Base.CompareWithGeometry(this,A,B,C)
   2363 #define ID2D1TransformedGeometry_ComputeArea(this,A,B) (this)->lpVtbl->Base.ComputeArea(this,A,B)
   2364 #define ID2D1TransformedGeometry_ComputeLength(this,A,B) (this)->lpVtbl->Base.ComputeLength(this,A,B)
   2365 #define ID2D1TransformedGeometry_ComputePointAtLength(this,A,B,C,D) (this)->lpVtbl->Base.ComputePointAtLength(this,A,B,C,D)
   2366 #define ID2D1TransformedGeometry_FillContainsPoint(this,A,B,C) (this)->lpVtbl->Base.FillContainsPoint(this,A,B,C)
   2367 #define ID2D1TransformedGeometry_GetBounds(this,A,B) (this)->lpVtbl->Base.GetBounds(this,A,B)
   2368 #define ID2D1TransformedGeometry_GetWidenedBounds(this,A,B,C,D) (this)->lpVtbl->Base.GetWidenedBounds(this,A,B,C,D)
   2369 #define ID2D1TransformedGeometry_Outline(this,A,B) (this)->lpVtbl->Base.Outline(this,A,B)
   2370 #define ID2D1TransformedGeometry_StrokeContainsPoint(this,A,B,C,D,E) (this)->lpVtbl->Base.StrokeContainsPoint(this,A,B,C,D,E)
   2371 #define ID2D1TransformedGeometry_Simplify(this,A,B,C) (this)->lpVtbl->Base.Simplify(this,A,B,C)
   2372 #define ID2D1TransformedGeometry_Tessellate(this,A,B) (this)->lpVtbl->Base.Tessellate(this,A,B)
   2373 #define ID2D1TransformedGeometry_Widen(this,A,B,C,D) (this)->lpVtbl->Base.Widen(this,A,B,C,D)
   2374 #define ID2D1TransformedGeometry_GetSourceGeometry(this,A) (this)->lpVtbl->GetSourceGeometry(this,A)
   2375 #define ID2D1TransformedGeometry_GetTransform(this,A) (this)->lpVtbl->GetTransform(this,A)
   2376 
   2377 #endif
   2378 
   2379 __CRT_UUID_DECL(ID2D1Resource, 0x2cd90691,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2380 __CRT_UUID_DECL(ID2D1Brush, 0x2cd906a8,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2381 __CRT_UUID_DECL(ID2D1Bitmap, 0xa2296057,0xea42,0x4099,0x98,0x3b,0x53,0x9f,0xb6,0x50,0x54,0x26)
   2382 __CRT_UUID_DECL(ID2D1BitmapBrush, 0x2cd906aa,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2383 __CRT_UUID_DECL(ID2D1RenderTarget, 0x2cd90694,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2384 __CRT_UUID_DECL(ID2D1Geometry, 0x2cd906a1,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2385 __CRT_UUID_DECL(ID2D1BitmapRenderTarget, 0x2cd90695,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2386 __CRT_UUID_DECL(ID2D1DCRenderTarget, 0x1c51bc64,0xde61,0x46fd,0x98,0x99,0x63,0xa5,0xd8,0xf0,0x39,0x50)
   2387 __CRT_UUID_DECL(ID2D1SimplifiedGeometrySink, 0x2cd9069e,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2388 __CRT_UUID_DECL(ID2D1Factory, 0x06152247,0x6f50,0x465a,0x92,0x45,0x11,0x8b,0xfd,0x3b,0x60,0x07)
   2389 __CRT_UUID_DECL(ID2D1GdiInteropRenderTarget, 0xe0db51c3,0x6f77,0x4bae,0xb3,0xd5,0xe4,0x75,0x09,0xb3,0x58,0x38)
   2390 __CRT_UUID_DECL(ID2D1GeometrySink, 0x2cd9069f,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2391 __CRT_UUID_DECL(ID2D1GradientStopCollection, 0x2cd906a7,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2392 __CRT_UUID_DECL(ID2D1Layer, 0x2cd9069b,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2393 __CRT_UUID_DECL(ID2D1LinearGradientBrush, 0x2cd906ab,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2394 __CRT_UUID_DECL(ID2D1PathGeometry, 0x2cd906a5,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2395 __CRT_UUID_DECL(ID2D1RadialGradientBrush, 0x2cd906ac,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2396 __CRT_UUID_DECL(ID2D1RectangleGeometry, 0x2cd906a2,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2397 __CRT_UUID_DECL(ID2D1SolidColorBrush, 0x2cd906a9,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2398 __CRT_UUID_DECL(ID2D1StrokeStyle, 0x2cd9069d,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2399 __CRT_UUID_DECL(ID2D1TransformedGeometry, 0x2cd906bb,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9)
   2400 __CRT_UUID_DECL(ID2D1Mesh,0x2cd906c2,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2401 __CRT_UUID_DECL(ID2D1DrawingStateBlock, 0x28506e39,0xebf6,0x46a1,0xbb,0x47,0xfd,0x85,0x56,0x5a,0xb9,0x57);
   2402 __CRT_UUID_DECL(ID2D1EllipseGeometry, 0x2cd906a4,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2403 __CRT_UUID_DECL(ID2D1GeometryGroup, 0x2cd906a6,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2404 __CRT_UUID_DECL(ID2D1RoundedRectangleGeometry, 0x2cd906a3,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2405 __CRT_UUID_DECL(ID2D1TessellationSink, 0x2cd906c1,0x12e2,0x11dc,0x9f,0xed,0x00,0x11,0x43,0xa0,0x55,0xf9);
   2406 
   2407 #ifdef __cplusplus
   2408 extern "C" {
   2409 #endif
   2410 
   2411 HRESULT WINAPI D2D1CreateFactory(
   2412   D2D1_FACTORY_TYPE factoryType,
   2413   REFIID riid,
   2414   const D2D1_FACTORY_OPTIONS *pFactoryOptions,
   2415   void **ppIFactory
   2416 );
   2417 
   2418 WINBOOL WINAPI D2D1InvertMatrix(
   2419   D2D1_MATRIX_3X2_F *matrix
   2420 );
   2421 
   2422 WINBOOL WINAPI D2D1IsMatrixInvertible(
   2423   const D2D1_MATRIX_3X2_F *matrix
   2424 );
   2425 
   2426 void WINAPI D2D1MakeRotateMatrix(
   2427   FLOAT angle,
   2428   D2D1_POINT_2F center,
   2429   D2D1_MATRIX_3X2_F *matrix
   2430 );
   2431 
   2432 void WINAPI D2D1MakeSkewMatrix(
   2433   FLOAT angleX,
   2434   FLOAT angleY,
   2435   D2D1_POINT_2F center,
   2436   D2D1_MATRIX_3X2_F *matrix
   2437 );
   2438 #ifdef __cplusplus
   2439 }
   2440 #endif
   2441 
   2442 #ifndef D2D1FORCEINLINE
   2443 #define D2D1FORCEINLINE FORCEINLINE
   2444 #endif
   2445 
   2446 #include <d2d1helper.h>
   2447 
   2448 #ifndef D2D_USE_C_DEFINITIONS
   2449 
   2450 inline HRESULT D2D1CreateFactory(D2D1_FACTORY_TYPE factoryType, REFIID riid, void **ppv) {
   2451     return D2D1CreateFactory(factoryType, riid, NULL, ppv);
   2452 }
   2453 
   2454 template<class Factory>
   2455 HRESULT D2D1CreateFactory(D2D1_FACTORY_TYPE factoryType, Factory **factory) {
   2456     return D2D1CreateFactory(factoryType, __uuidof(Factory), reinterpret_cast<void**>(factory));
   2457 }
   2458 
   2459 template<class Factory>
   2460 HRESULT D2D1CreateFactory(D2D1_FACTORY_TYPE factoryType, const D2D1_FACTORY_OPTIONS &factoryOptions, Factory **factory) {
   2461     return D2D1CreateFactory(factoryType, __uuidof(Factory), &factoryOptions, reinterpret_cast<void **>(factory));
   2462 }
   2463 
   2464 #endif
   2465 
   2466 #endif /* _D2D1_H */
   2467