zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

d2d1.h (152087B) - Raw


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