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