Subversion Repositories Games.Chess Giants

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. //---------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation.  All rights reserved.
  3. //
  4. // This file is automatically generated.  Please do not edit it directly.
  5. //
  6. // File name: D2D1.h
  7. //---------------------------------------------------------------------------
  8. #pragma once
  9.  
  10.  
  11. #ifndef _D2D1_H_
  12. #define _D2D1_H_
  13.  
  14. #ifndef COM_NO_WINDOWS_H
  15. #include <windows.h>
  16. #endif // #ifndef COM_NO_WINDOWS_H
  17. #include <unknwn.h>
  18. #include <dcommon.h>
  19. #include <D2DErr.h>
  20. #include <D2DBaseTypes.h>
  21. #include <dxgiformat.h>
  22. #ifndef D2D_NO_INCLUDE_D3D10
  23. #include <d3d10_1.h>
  24. #endif // #ifndef D2D_NO_INCLUDE_D3D10
  25.  
  26. #ifndef D2D_USE_C_DEFINITIONS
  27.  
  28. //
  29. // We use the 'C' definitions if C++ is not defined
  30. //
  31. #ifndef __cplusplus
  32. #define D2D_USE_C_DEFINITIONS
  33. #endif
  34.  
  35. #endif // #ifndef D2D_USE_C_DEFINITIONS
  36.  
  37. #ifndef D2D1_DECLARE_INTERFACE
  38. #define D2D1_DECLARE_INTERFACE(X) DECLSPEC_UUID(X) DECLSPEC_NOVTABLE
  39. #endif
  40.  
  41. //
  42. // Forward declarations here
  43. //
  44.  
  45. typedef interface IDWriteTextFormat IDWriteTextFormat;
  46. typedef interface IDWriteTextLayout IDWriteTextLayout;
  47. typedef interface IDWriteRenderingParams IDWriteRenderingParams;
  48. typedef interface IDXGISurface IDXGISurface;
  49. typedef interface IWICBitmap IWICBitmap;
  50. typedef interface IWICBitmapSource IWICBitmapSource;
  51.  
  52. typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
  53.  
  54. #ifndef D2D_USE_C_DEFINITIONS
  55.  
  56. interface ID2D1Factory;
  57. interface ID2D1RenderTarget;
  58. interface ID2D1BitmapRenderTarget;
  59. interface ID2D1SimplifiedGeometrySink;
  60. interface ID2D1TessellationSink;
  61. interface ID2D1Geometry;
  62. interface ID2D1Brush;
  63.  
  64. #else
  65.  
  66. typedef interface ID2D1Factory ID2D1Factory;
  67. typedef interface ID2D1RenderTarget ID2D1RenderTarget;
  68. typedef interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget;
  69. typedef interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink;;
  70. typedef interface ID2D1TessellationSink ID2D1TessellationSink;
  71. typedef interface ID2D1Geometry ID2D1Geometry;
  72. typedef interface ID2D1Brush ID2D1Brush;
  73.  
  74. #endif
  75.        
  76. #define D2D1_INVALID_TAG ULONGLONG_MAX
  77. #define D2D1_DEFAULT_FLATTENING_TOLERANCE (0.25f)
  78.  
  79. //+-----------------------------------------------------------------------------
  80. //
  81. //  Enum:
  82. //      D2D1_ALPHA_MODE
  83. //
  84. //  Synopsis:
  85. //      Qualifies how alpha is to be treated in a bitmap or render target containing
  86. //      alpha.
  87. //
  88. //------------------------------------------------------------------------------
  89. typedef enum D2D1_ALPHA_MODE
  90. {
  91.        
  92.         //
  93.         // Alpha mode should be determined implicitly. Some target surfaces do not supply
  94.         // or imply this information in which case alpha must be specified.
  95.         //
  96.         D2D1_ALPHA_MODE_UNKNOWN = 0,
  97.        
  98.         //
  99.         // Treat the alpha as premultipled.
  100.         //
  101.         D2D1_ALPHA_MODE_PREMULTIPLIED = 1,
  102.        
  103.         //
  104.         // Opacity is in the 'A' component only.
  105.         //
  106.         D2D1_ALPHA_MODE_STRAIGHT = 2,
  107.        
  108.         //
  109.         // Ignore any alpha channel information.
  110.         //
  111.         D2D1_ALPHA_MODE_IGNORE = 3,
  112.         D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff
  113.  
  114. } D2D1_ALPHA_MODE;
  115.  
  116.  
  117. //+-----------------------------------------------------------------------------
  118. //
  119. //  Enum:
  120. //      D2D1_GAMMA
  121. //
  122. //  Synopsis:
  123. //      This determines what gamma is used for interpolation/blending.
  124. //
  125. //------------------------------------------------------------------------------
  126. typedef enum D2D1_GAMMA
  127. {
  128.        
  129.         //
  130.         // Colors are manipulated in 2.2 gamma color space.
  131.         //
  132.         D2D1_GAMMA_2_2 = 0,
  133.        
  134.         //
  135.         // Colors are manipulated in 1.0 gamma color space.
  136.         //
  137.         D2D1_GAMMA_1_0 = 1,
  138.         D2D1_GAMMA_FORCE_DWORD = 0xffffffff
  139.  
  140. } D2D1_GAMMA;
  141.  
  142.  
  143. //+-----------------------------------------------------------------------------
  144. //
  145. //  Enum:
  146. //      D2D1_OPACITY_MASK_CONTENT
  147. //
  148. //  Synopsis:
  149. //      Specifies what the contents are of an opacity mask.
  150. //
  151. //------------------------------------------------------------------------------
  152. typedef enum D2D1_OPACITY_MASK_CONTENT
  153. {
  154.        
  155.         //
  156.         // The mask contains geometries or bitmaps.
  157.         //
  158.         D2D1_OPACITY_MASK_CONTENT_GRAPHICS = 0,
  159.        
  160.         //
  161.         // The mask contains text rendered using one of the natural text modes.
  162.         //
  163.         D2D1_OPACITY_MASK_CONTENT_TEXT_NATURAL = 1,
  164.        
  165.         //
  166.         // The mask contains text rendered using one of the GDI compatible text modes.
  167.         //
  168.         D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE = 2,
  169.         D2D1_OPACITY_MASK_CONTENT_FORCE_DWORD = 0xffffffff
  170.  
  171. } D2D1_OPACITY_MASK_CONTENT;
  172.  
  173.  
  174. //+-----------------------------------------------------------------------------
  175. //
  176. //  Enum:
  177. //      D2D1_EXTEND_MODE
  178. //
  179. //  Synopsis:
  180. //      Enum which descibes how to sample from a source outside it's base tile.
  181. //
  182. //------------------------------------------------------------------------------
  183. typedef enum D2D1_EXTEND_MODE
  184. {
  185.        
  186.         //
  187.         // Extend the edges of the source out by clamping sample points outside the source
  188.         // to the edges.
  189.         //
  190.         D2D1_EXTEND_MODE_CLAMP = 0,
  191.        
  192.         //
  193.         // The base tile is drawn untransformed and the remainder are filled by repeating
  194.         // the base tile.
  195.         //
  196.         D2D1_EXTEND_MODE_WRAP = 1,
  197.        
  198.         //
  199.         // The same as wrap, but alternate tiles are flipped  The base tile is drawn
  200.         // untransformed.
  201.         //
  202.         D2D1_EXTEND_MODE_MIRROR = 2,
  203.         D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff
  204.  
  205. } D2D1_EXTEND_MODE;
  206.  
  207.  
  208. //+-----------------------------------------------------------------------------
  209. //
  210. //  Enum:
  211. //      D2D1_ANTIALIAS_MODE
  212. //
  213. //  Synopsis:
  214. //      Enum which descibes the manner in which we render edges of non-text primitives.
  215. //
  216. //------------------------------------------------------------------------------
  217. typedef enum D2D1_ANTIALIAS_MODE
  218. {
  219.        
  220.         //
  221.         // The edges of each primitive are antialiased sequentially.
  222.         //
  223.         D2D1_ANTIALIAS_MODE_PER_PRIMITIVE = 0,
  224.        
  225.         //
  226.         // Each pixel is rendered if its pixel center is contained by the geometry.
  227.         //
  228.         D2D1_ANTIALIAS_MODE_ALIASED = 1,
  229.         D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
  230.  
  231. } D2D1_ANTIALIAS_MODE;
  232.  
  233.  
  234. //+-----------------------------------------------------------------------------
  235. //
  236. //  Enum:
  237. //      D2D1_TEXT_ANTIALIAS_MODE
  238. //
  239. //------------------------------------------------------------------------------
  240. typedef enum D2D1_TEXT_ANTIALIAS_MODE
  241. {
  242.        
  243.         //
  244.         // Render text using the current system setting.
  245.         //
  246.         D2D1_TEXT_ANTIALIAS_MODE_DEFAULT = 0,
  247.        
  248.         //
  249.         // Render text using ClearType.
  250.         //
  251.         D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE = 1,
  252.        
  253.         //
  254.         // Render text using gray-scale.
  255.         //
  256.         D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE = 2,
  257.        
  258.         //
  259.         // Render text aliased.
  260.         //
  261.         D2D1_TEXT_ANTIALIAS_MODE_ALIASED = 3,
  262.         D2D1_TEXT_ANTIALIAS_MODE_FORCE_DWORD = 0xffffffff
  263.  
  264. } D2D1_TEXT_ANTIALIAS_MODE;
  265.  
  266.  
  267. //+-----------------------------------------------------------------------------
  268. //
  269. //  Enum:
  270. //      D2D1_BITMAP_INTERPOLATION_MODE
  271. //
  272. //------------------------------------------------------------------------------
  273. typedef enum D2D1_BITMAP_INTERPOLATION_MODE
  274. {
  275.        
  276.         //
  277.         // Nearest Neighbor filtering. Also known as nearest pixel or nearest point
  278.         // sampling.
  279.         //
  280.         D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0,
  281.        
  282.         //
  283.         // Linear filtering.
  284.         //
  285.         D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1,
  286.         D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD = 0xffffffff
  287.  
  288. } D2D1_BITMAP_INTERPOLATION_MODE;
  289.  
  290.  
  291. //+-----------------------------------------------------------------------------
  292. //
  293. //  Flag:
  294. //      D2D1_DRAW_TEXT_OPTIONS
  295. //
  296. //  Synopsis:
  297. //      Modifications made to the draw text call that influence how the text is
  298. //      rendered.
  299. //
  300. //------------------------------------------------------------------------------
  301. typedef enum D2D1_DRAW_TEXT_OPTIONS
  302. {
  303.        
  304.         //
  305.         // Do not snap the baseline of the text vertically.
  306.         //
  307.         D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x00000001,
  308.        
  309.         //
  310.         // Clip the text to the content bounds.
  311.         //
  312.         D2D1_DRAW_TEXT_OPTIONS_CLIP = 0x00000002,
  313.         D2D1_DRAW_TEXT_OPTIONS_NONE = 0x00000000,
  314.         D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0xffffffff
  315.  
  316. } D2D1_DRAW_TEXT_OPTIONS;
  317.  
  318. DEFINE_ENUM_FLAG_OPERATORS(D2D1_DRAW_TEXT_OPTIONS);
  319.  
  320.  
  321. //+-----------------------------------------------------------------------------
  322. //
  323. //  Struct:
  324. //      D2D1_PIXEL_FORMAT
  325. //
  326. //------------------------------------------------------------------------------
  327. typedef struct D2D1_PIXEL_FORMAT
  328. {
  329.     DXGI_FORMAT format;
  330.     D2D1_ALPHA_MODE alphaMode;
  331.  
  332. } D2D1_PIXEL_FORMAT;
  333.  
  334. typedef D2D_POINT_2U D2D1_POINT_2U;
  335. typedef D2D_POINT_2F D2D1_POINT_2F;
  336. typedef D2D_RECT_F D2D1_RECT_F;
  337. typedef D2D_RECT_U D2D1_RECT_U;
  338. typedef D2D_SIZE_F D2D1_SIZE_F;
  339. typedef D2D_SIZE_U D2D1_SIZE_U;
  340. typedef D2D_COLOR_F D2D1_COLOR_F;
  341. typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
  342. typedef UINT64 D2D1_TAG;
  343.  
  344. //+-----------------------------------------------------------------------------
  345. //
  346. //  Struct:
  347. //      D2D1_BITMAP_PROPERTIES
  348. //
  349. //------------------------------------------------------------------------------
  350. typedef struct D2D1_BITMAP_PROPERTIES
  351. {
  352.     D2D1_PIXEL_FORMAT pixelFormat;
  353.     FLOAT dpiX;
  354.     FLOAT dpiY;
  355.  
  356. } D2D1_BITMAP_PROPERTIES;
  357.  
  358.  
  359. //+-----------------------------------------------------------------------------
  360. //
  361. //  Struct:
  362. //      D2D1_GRADIENT_STOP
  363. //
  364. //------------------------------------------------------------------------------
  365. typedef struct D2D1_GRADIENT_STOP
  366. {
  367.     FLOAT position;
  368.     D2D1_COLOR_F color;
  369.  
  370. } D2D1_GRADIENT_STOP;
  371.  
  372.  
  373. //+-----------------------------------------------------------------------------
  374. //
  375. //  Struct:
  376. //      D2D1_BRUSH_PROPERTIES
  377. //
  378. //------------------------------------------------------------------------------
  379. typedef struct D2D1_BRUSH_PROPERTIES
  380. {
  381.     FLOAT opacity;
  382.     D2D1_MATRIX_3X2_F transform;
  383.  
  384. } D2D1_BRUSH_PROPERTIES;
  385.  
  386.  
  387. //+-----------------------------------------------------------------------------
  388. //
  389. //  Struct:
  390. //      D2D1_BITMAP_BRUSH_PROPERTIES
  391. //
  392. //------------------------------------------------------------------------------
  393. typedef struct D2D1_BITMAP_BRUSH_PROPERTIES
  394. {
  395.     D2D1_EXTEND_MODE extendModeX;
  396.     D2D1_EXTEND_MODE extendModeY;
  397.     D2D1_BITMAP_INTERPOLATION_MODE interpolationMode;
  398.  
  399. } D2D1_BITMAP_BRUSH_PROPERTIES;
  400.  
  401.  
  402. //+-----------------------------------------------------------------------------
  403. //
  404. //  Struct:
  405. //      D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
  406. //
  407. //------------------------------------------------------------------------------
  408. typedef struct D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES
  409. {
  410.     D2D1_POINT_2F startPoint;
  411.     D2D1_POINT_2F endPoint;
  412.  
  413. } D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES;
  414.  
  415.  
  416. //+-----------------------------------------------------------------------------
  417. //
  418. //  Struct:
  419. //      D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
  420. //
  421. //------------------------------------------------------------------------------
  422. typedef struct D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES
  423. {
  424.     D2D1_POINT_2F center;
  425.     D2D1_POINT_2F gradientOriginOffset;
  426.     FLOAT radiusX;
  427.     FLOAT radiusY;
  428.  
  429. } D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES;
  430.  
  431.  
  432. //+-----------------------------------------------------------------------------
  433. //
  434. //  Enum:
  435. //      D2D1_ARC_SIZE
  436. //
  437. //  Synopsis:
  438. //      Differentiates which of the two possible arcs could match the given arc
  439. //      parameters.
  440. //
  441. //------------------------------------------------------------------------------
  442. typedef enum D2D1_ARC_SIZE
  443. {
  444.         D2D1_ARC_SIZE_SMALL = 0,
  445.         D2D1_ARC_SIZE_LARGE = 1,
  446.         D2D1_ARC_SIZE_FORCE_DWORD = 0xffffffff
  447.  
  448. } D2D1_ARC_SIZE;
  449.  
  450.  
  451. //+-----------------------------------------------------------------------------
  452. //
  453. //  Enum:
  454. //      D2D1_CAP_STYLE
  455. //
  456. //  Synopsis:
  457. //      Enum which descibes the drawing of the ends of a line.
  458. //
  459. //------------------------------------------------------------------------------
  460. typedef enum D2D1_CAP_STYLE
  461. {
  462.        
  463.         //
  464.         // Flat line cap.
  465.         //
  466.         D2D1_CAP_STYLE_FLAT = 0,
  467.        
  468.         //
  469.         // Square line cap.
  470.         //
  471.         D2D1_CAP_STYLE_SQUARE = 1,
  472.        
  473.         //
  474.         // Round line cap.
  475.         //
  476.         D2D1_CAP_STYLE_ROUND = 2,
  477.        
  478.         //
  479.         // Triangle line cap.
  480.         //
  481.         D2D1_CAP_STYLE_TRIANGLE = 3,
  482.         D2D1_CAP_STYLE_FORCE_DWORD = 0xffffffff
  483.  
  484. } D2D1_CAP_STYLE;
  485.  
  486.  
  487. //+-----------------------------------------------------------------------------
  488. //
  489. //  Enum:
  490. //      D2D1_DASH_STYLE
  491. //
  492. //------------------------------------------------------------------------------
  493. typedef enum D2D1_DASH_STYLE
  494. {
  495.         D2D1_DASH_STYLE_SOLID = 0,
  496.         D2D1_DASH_STYLE_DASH = 1,
  497.         D2D1_DASH_STYLE_DOT = 2,
  498.         D2D1_DASH_STYLE_DASH_DOT = 3,
  499.         D2D1_DASH_STYLE_DASH_DOT_DOT = 4,
  500.         D2D1_DASH_STYLE_CUSTOM = 5,
  501.         D2D1_DASH_STYLE_FORCE_DWORD = 0xffffffff
  502.  
  503. } D2D1_DASH_STYLE;
  504.  
  505.  
  506. //+-----------------------------------------------------------------------------
  507. //
  508. //  Enum:
  509. //      D2D1_LINE_JOIN
  510. //
  511. //  Synopsis:
  512. //      Enum which descibes the drawing of the corners on the line.
  513. //
  514. //------------------------------------------------------------------------------
  515. typedef enum D2D1_LINE_JOIN
  516. {
  517.        
  518.         //
  519.         // Miter join.
  520.         //
  521.         D2D1_LINE_JOIN_MITER = 0,
  522.        
  523.         //
  524.         // Bevel join.
  525.         //
  526.         D2D1_LINE_JOIN_BEVEL = 1,
  527.        
  528.         //
  529.         // Round join.
  530.         //
  531.         D2D1_LINE_JOIN_ROUND = 2,
  532.        
  533.         //
  534.         // Miter/Bevel join.
  535.         //
  536.         D2D1_LINE_JOIN_MITER_OR_BEVEL = 3,
  537.         D2D1_LINE_JOIN_FORCE_DWORD = 0xffffffff
  538.  
  539. } D2D1_LINE_JOIN;
  540.  
  541.  
  542. //+-----------------------------------------------------------------------------
  543. //
  544. //  Enum:
  545. //      D2D1_COMBINE_MODE
  546. //
  547. //  Synopsis:
  548. //      This enumeration describes the type of combine operation to be performed.
  549. //
  550. //------------------------------------------------------------------------------
  551. typedef enum D2D1_COMBINE_MODE
  552. {
  553.        
  554.         //
  555.         // Produce a geometry representing the set of points contained in either
  556.         // the first or the second geometry.
  557.         //
  558.         D2D1_COMBINE_MODE_UNION = 0,
  559.        
  560.         //
  561.         // Produce a geometry representing the set of points common to the first
  562.         // and the second geometries.
  563.         //
  564.         D2D1_COMBINE_MODE_INTERSECT = 1,
  565.        
  566.         //
  567.         // Produce a geometry representing the set of points contained in the
  568.         // first geometry or the second geometry, but not both.
  569.         //
  570.         D2D1_COMBINE_MODE_XOR = 2,
  571.        
  572.         //
  573.         // Produce a geometry representing the set of points contained in the
  574.         // first geometry but not the second geometry.
  575.         //
  576.         D2D1_COMBINE_MODE_EXCLUDE = 3,
  577.         D2D1_COMBINE_MODE_FORCE_DWORD = 0xffffffff
  578.  
  579. } D2D1_COMBINE_MODE;
  580.  
  581.  
  582. //+-----------------------------------------------------------------------------
  583. //
  584. //  Enum:
  585. //      D2D1_GEOMETRY_RELATION
  586. //
  587. //------------------------------------------------------------------------------
  588. typedef enum D2D1_GEOMETRY_RELATION
  589. {
  590.        
  591.         //
  592.         // The relation between the geometries couldn't be determined. This value is never
  593.         // returned by any D2D method.
  594.         //
  595.         D2D1_GEOMETRY_RELATION_UNKNOWN = 0,
  596.        
  597.         //
  598.         // The two geometries do not intersect at all.
  599.         //
  600.         D2D1_GEOMETRY_RELATION_DISJOINT = 1,
  601.        
  602.         //
  603.         // The passed in geometry is entirely contained by the object.
  604.         //
  605.         D2D1_GEOMETRY_RELATION_IS_CONTAINED = 2,
  606.        
  607.         //
  608.         // The object entirely contains the passed in geometry.
  609.         //
  610.         D2D1_GEOMETRY_RELATION_CONTAINS = 3,
  611.        
  612.         //
  613.         // The two geometries overlap but neither completely contains the other.
  614.         //
  615.         D2D1_GEOMETRY_RELATION_OVERLAP = 4,
  616.         D2D1_GEOMETRY_RELATION_FORCE_DWORD = 0xffffffff
  617.  
  618. } D2D1_GEOMETRY_RELATION;
  619.  
  620.  
  621. //+-----------------------------------------------------------------------------
  622. //
  623. //  Enum:
  624. //      D2D1_GEOMETRY_SIMPLIFICATION_OPTION
  625. //
  626. //  Synopsis:
  627. //      Specifies how simple the output of a simplified geometry sink should be.
  628. //
  629. //------------------------------------------------------------------------------
  630. typedef enum D2D1_GEOMETRY_SIMPLIFICATION_OPTION
  631. {
  632.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES = 0,
  633.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES = 1,
  634.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION_FORCE_DWORD = 0xffffffff
  635.  
  636. } D2D1_GEOMETRY_SIMPLIFICATION_OPTION;
  637.  
  638.  
  639. //+-----------------------------------------------------------------------------
  640. //
  641. //  Enum:
  642. //      D2D1_FIGURE_BEGIN
  643. //
  644. //  Synopsis:
  645. //      Indicates whether the given figure is filled or hollow.
  646. //
  647. //------------------------------------------------------------------------------
  648. typedef enum D2D1_FIGURE_BEGIN
  649. {
  650.         D2D1_FIGURE_BEGIN_FILLED = 0,
  651.         D2D1_FIGURE_BEGIN_HOLLOW = 1,
  652.         D2D1_FIGURE_BEGIN_FORCE_DWORD = 0xffffffff
  653.  
  654. } D2D1_FIGURE_BEGIN;
  655.  
  656.  
  657. //+-----------------------------------------------------------------------------
  658. //
  659. //  Enum:
  660. //      D2D1_FIGURE_END
  661. //
  662. //  Synopsis:
  663. //      Indicates whether the figure ir open or closed on its end point.
  664. //
  665. //------------------------------------------------------------------------------
  666. typedef enum D2D1_FIGURE_END
  667. {
  668.         D2D1_FIGURE_END_OPEN = 0,
  669.         D2D1_FIGURE_END_CLOSED = 1,
  670.         D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff
  671.  
  672. } D2D1_FIGURE_END;
  673.  
  674.  
  675. //+-----------------------------------------------------------------------------
  676. //
  677. //  Struct:
  678. //      D2D1_BEZIER_SEGMENT
  679. //
  680. //  Synopsis:
  681. //      Describes a cubic bezier in a path.
  682. //
  683. //------------------------------------------------------------------------------
  684. typedef struct D2D1_BEZIER_SEGMENT
  685. {
  686.     D2D1_POINT_2F point1;
  687.     D2D1_POINT_2F point2;
  688.     D2D1_POINT_2F point3;
  689.  
  690. } D2D1_BEZIER_SEGMENT;
  691.  
  692.  
  693. //+-----------------------------------------------------------------------------
  694. //
  695. //  Struct:
  696. //      D2D1_TRIANGLE
  697. //
  698. //  Synopsis:
  699. //      Describes a triangle.
  700. //
  701. //------------------------------------------------------------------------------
  702. typedef struct D2D1_TRIANGLE
  703. {
  704.     D2D1_POINT_2F point1;
  705.     D2D1_POINT_2F point2;
  706.     D2D1_POINT_2F point3;
  707.  
  708. } D2D1_TRIANGLE;
  709.  
  710.  
  711. //+-----------------------------------------------------------------------------
  712. //
  713. //  Flag:
  714. //      D2D1_PATH_SEGMENT
  715. //
  716. //  Synopsis:
  717. //      Indicates whether the given segment should be stroked, or, if the join between
  718. //      this segment and the previous one should be smooth.
  719. //
  720. //------------------------------------------------------------------------------
  721. typedef enum D2D1_PATH_SEGMENT
  722. {
  723.         D2D1_PATH_SEGMENT_NONE = 0x00000000,
  724.         D2D1_PATH_SEGMENT_FORCE_UNSTROKED = 0x00000001,
  725.         D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN = 0x00000002,
  726.         D2D1_PATH_SEGMENT_FORCE_DWORD = 0xffffffff
  727.  
  728. } D2D1_PATH_SEGMENT;
  729.  
  730. DEFINE_ENUM_FLAG_OPERATORS(D2D1_PATH_SEGMENT);
  731.  
  732.  
  733. //+-----------------------------------------------------------------------------
  734. //
  735. //  Enum:
  736. //      D2D1_SWEEP_DIRECTION
  737. //
  738. //------------------------------------------------------------------------------
  739. typedef enum D2D1_SWEEP_DIRECTION
  740. {
  741.         D2D1_SWEEP_DIRECTION_COUNTER_CLOCKWISE = 0,
  742.         D2D1_SWEEP_DIRECTION_CLOCKWISE = 1,
  743.         D2D1_SWEEP_DIRECTION_FORCE_DWORD = 0xffffffff
  744.  
  745. } D2D1_SWEEP_DIRECTION;
  746.  
  747.  
  748. //+-----------------------------------------------------------------------------
  749. //
  750. //  Enum:
  751. //      D2D1_FILL_MODE
  752. //
  753. //------------------------------------------------------------------------------
  754. typedef enum D2D1_FILL_MODE
  755. {
  756.         D2D1_FILL_MODE_ALTERNATE = 0,
  757.         D2D1_FILL_MODE_WINDING = 1,
  758.         D2D1_FILL_MODE_FORCE_DWORD = 0xffffffff
  759.  
  760. } D2D1_FILL_MODE;
  761.  
  762.  
  763. //+-----------------------------------------------------------------------------
  764. //
  765. //  Struct:
  766. //      D2D1_ARC_SEGMENT
  767. //
  768. //  Synopsis:
  769. //      Describes an arc that is defined as part of a path.
  770. //
  771. //------------------------------------------------------------------------------
  772. typedef struct D2D1_ARC_SEGMENT
  773. {
  774.     D2D1_POINT_2F point;
  775.     D2D1_SIZE_F size;
  776.     FLOAT rotationAngle;
  777.     D2D1_SWEEP_DIRECTION sweepDirection;
  778.     D2D1_ARC_SIZE arcSize;
  779.  
  780. } D2D1_ARC_SEGMENT;
  781.  
  782.  
  783. //+-----------------------------------------------------------------------------
  784. //
  785. //  Struct:
  786. //      D2D1_QUADRATIC_BEZIER_SEGMENT
  787. //
  788. //------------------------------------------------------------------------------
  789. typedef struct D2D1_QUADRATIC_BEZIER_SEGMENT
  790. {
  791.     D2D1_POINT_2F point1;
  792.     D2D1_POINT_2F point2;
  793.  
  794. } D2D1_QUADRATIC_BEZIER_SEGMENT;
  795.  
  796.  
  797. //+-----------------------------------------------------------------------------
  798. //
  799. //  Struct:
  800. //      D2D1_ELLIPSE
  801. //
  802. //------------------------------------------------------------------------------
  803. typedef struct D2D1_ELLIPSE
  804. {
  805.     D2D1_POINT_2F point;
  806.     FLOAT radiusX;
  807.     FLOAT radiusY;
  808.  
  809. } D2D1_ELLIPSE;
  810.  
  811.  
  812. //+-----------------------------------------------------------------------------
  813. //
  814. //  Struct:
  815. //      D2D1_ROUNDED_RECT
  816. //
  817. //------------------------------------------------------------------------------
  818. typedef struct D2D1_ROUNDED_RECT
  819. {
  820.     D2D1_RECT_F rect;
  821.     FLOAT radiusX;
  822.     FLOAT radiusY;
  823.  
  824. } D2D1_ROUNDED_RECT;
  825.  
  826.  
  827. //+-----------------------------------------------------------------------------
  828. //
  829. //  Struct:
  830. //      D2D1_STROKE_STYLE_PROPERTIES
  831. //
  832. //  Synopsis:
  833. //      Properties, aside from the width, that allow geometric penning to be specified.
  834. //
  835. //------------------------------------------------------------------------------
  836. typedef struct D2D1_STROKE_STYLE_PROPERTIES
  837. {
  838.     D2D1_CAP_STYLE startCap;
  839.     D2D1_CAP_STYLE endCap;
  840.     D2D1_CAP_STYLE dashCap;
  841.     D2D1_LINE_JOIN lineJoin;
  842.     FLOAT miterLimit;
  843.     D2D1_DASH_STYLE dashStyle;
  844.     FLOAT dashOffset;
  845.  
  846. } D2D1_STROKE_STYLE_PROPERTIES;
  847.  
  848.  
  849. //+-----------------------------------------------------------------------------
  850. //
  851. //  Flag:
  852. //      D2D1_LAYER_OPTIONS
  853. //
  854. //  Synopsis:
  855. //      Specified options that can be applied when a layer resource is applied to create
  856. //      a layer.
  857. //
  858. //------------------------------------------------------------------------------
  859. typedef enum D2D1_LAYER_OPTIONS
  860. {
  861.         D2D1_LAYER_OPTIONS_NONE = 0x00000000,
  862.        
  863.         //
  864.         // The layer will render correctly for ClearType text. If the render target was set
  865.         // to ClearType previously, the layer will continue to render ClearType. If the
  866.         // render target was set to ClearType and this option is not specified, the render
  867.         // target will be set to render gray-scale until the layer is popped. The caller
  868.         // can override this default by calling SetTextAntialiasMode while within the
  869.         // layer. This flag is slightly slower than the default.
  870.         //
  871.         D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE = 0x00000001,
  872.         D2D1_LAYER_OPTIONS_FORCE_DWORD = 0xffffffff
  873.  
  874. } D2D1_LAYER_OPTIONS;
  875.  
  876. DEFINE_ENUM_FLAG_OPERATORS(D2D1_LAYER_OPTIONS);
  877.  
  878.  
  879. //+-----------------------------------------------------------------------------
  880. //
  881. //  Struct:
  882. //      D2D1_LAYER_PARAMETERS
  883. //
  884. //------------------------------------------------------------------------------
  885. typedef struct D2D1_LAYER_PARAMETERS
  886. {
  887.    
  888.     //
  889.     // The rectangular clip that will be applied to the layer. The clip is affected by
  890.     // the world transform. Content outside of the content bounds will not render.
  891.     //
  892.     D2D1_RECT_F contentBounds;
  893.    
  894.     //
  895.     // A general mask that can be optionally applied to the content. Content not inside
  896.     // the fill of the mask will not be rendered.
  897.     //
  898.     __field_ecount_opt(1) ID2D1Geometry *geometricMask;
  899.    
  900.     //
  901.     // Specifies whether the mask should be aliased or antialiased.
  902.     //
  903.     D2D1_ANTIALIAS_MODE maskAntialiasMode;
  904.    
  905.     //
  906.     // An additional transform that may be applied to the mask in addition to the
  907.     // current world transform.
  908.     //
  909.     D2D1_MATRIX_3X2_F maskTransform;
  910.    
  911.     //
  912.     // The opacity with which all of the content in the layer will be blended back to
  913.     // the target when the layer is popped.
  914.     //
  915.     FLOAT opacity;
  916.    
  917.     //
  918.     // An additional brush that can be applied to the layer. Only the opacity channel
  919.     // is sampled from this brush and multiplied both with the layer content and the
  920.     // over-all layer opacity.
  921.     //
  922.     __field_ecount_opt(1) ID2D1Brush *opacityBrush;
  923.    
  924.     //
  925.     // Specifies if ClearType will be rendered into the layer.
  926.     //
  927.     D2D1_LAYER_OPTIONS layerOptions;
  928.  
  929. } D2D1_LAYER_PARAMETERS;
  930.  
  931.  
  932. //+-----------------------------------------------------------------------------
  933. //
  934. //  Flag:
  935. //      D2D1_WINDOW_STATE
  936. //
  937. //------------------------------------------------------------------------------
  938. typedef enum D2D1_WINDOW_STATE
  939. {
  940.         D2D1_WINDOW_STATE_NONE = 0x0000000,
  941.         D2D1_WINDOW_STATE_OCCLUDED = 0x0000001,
  942.         D2D1_WINDOW_STATE_FORCE_DWORD = 0xffffffff
  943.  
  944. } D2D1_WINDOW_STATE;
  945.  
  946. DEFINE_ENUM_FLAG_OPERATORS(D2D1_WINDOW_STATE);
  947.  
  948.  
  949. //+-----------------------------------------------------------------------------
  950. //
  951. //  Enum:
  952. //      D2D1_RENDER_TARGET_TYPE
  953. //
  954. //------------------------------------------------------------------------------
  955. typedef enum D2D1_RENDER_TARGET_TYPE
  956. {
  957.        
  958.         //
  959.         // D2D is free to choose the render target type for the caller.
  960.         //
  961.         D2D1_RENDER_TARGET_TYPE_DEFAULT = 0,
  962.        
  963.         //
  964.         // The render target will render using the CPU.
  965.         //
  966.         D2D1_RENDER_TARGET_TYPE_SOFTWARE = 1,
  967.        
  968.         //
  969.         // The render target will render using the GPU.
  970.         //
  971.         D2D1_RENDER_TARGET_TYPE_HARDWARE = 2,
  972.         D2D1_RENDER_TARGET_TYPE_FORCE_DWORD = 0xffffffff
  973.  
  974. } D2D1_RENDER_TARGET_TYPE;
  975.  
  976.  
  977. //+-----------------------------------------------------------------------------
  978. //
  979. //  Enum:
  980. //      D2D1_FEATURE_LEVEL
  981. //
  982. //------------------------------------------------------------------------------
  983. typedef enum D2D1_FEATURE_LEVEL
  984. {
  985.        
  986.         //
  987.         // The caller does not require a particular underlying D3D device level.
  988.         //
  989.         D2D1_FEATURE_LEVEL_DEFAULT = 0,
  990.        
  991.         //
  992.         // The D3D device level is DX9 compatible.
  993.         //
  994.         D2D1_FEATURE_LEVEL_9 = D3D10_FEATURE_LEVEL_9_1,
  995.        
  996.         //
  997.         // The D3D device level is DX10 compatible.
  998.         //
  999.         D2D1_FEATURE_LEVEL_10 = D3D10_FEATURE_LEVEL_10_0,
  1000.         D2D1_FEATURE_LEVEL_FORCE_DWORD = 0xffffffff
  1001.  
  1002. } D2D1_FEATURE_LEVEL;
  1003.  
  1004.  
  1005. //+-----------------------------------------------------------------------------
  1006. //
  1007. //  Flag:
  1008. //      D2D1_RENDER_TARGET_USAGE
  1009. //
  1010. //------------------------------------------------------------------------------
  1011. typedef enum D2D1_RENDER_TARGET_USAGE
  1012. {
  1013.         D2D1_RENDER_TARGET_USAGE_NONE = 0x00000000,
  1014.        
  1015.         //
  1016.         // Rendering will occur locally, if a terminal-services session is established, the
  1017.         // bitmap updates will be sent to the terminal services client.
  1018.         //
  1019.         D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING = 0x00000001,
  1020.        
  1021.         //
  1022.         // The render target will allow a call to GetDC on the IGdiInteropRenderTarget
  1023.         // interface. Rendering will also occur locally.
  1024.         //
  1025.         D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE = 0x00000002,
  1026.         D2D1_RENDER_TARGET_USAGE_FORCE_DWORD = 0xffffffff
  1027.  
  1028. } D2D1_RENDER_TARGET_USAGE;
  1029.  
  1030. DEFINE_ENUM_FLAG_OPERATORS(D2D1_RENDER_TARGET_USAGE);
  1031.  
  1032.  
  1033. //+-----------------------------------------------------------------------------
  1034. //
  1035. //  Flag:
  1036. //      D2D1_PRESENT_OPTIONS
  1037. //
  1038. //  Synopsis:
  1039. //      Describes how present should behave.
  1040. //
  1041. //------------------------------------------------------------------------------
  1042. typedef enum D2D1_PRESENT_OPTIONS
  1043. {
  1044.         D2D1_PRESENT_OPTIONS_NONE = 0x00000000,
  1045.        
  1046.         //
  1047.         // Keep the target contents intact through present.
  1048.         //
  1049.         D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS = 0x00000001,
  1050.        
  1051.         //
  1052.         // Do not wait for display refresh to commit changes to display.
  1053.         //
  1054.         D2D1_PRESENT_OPTIONS_IMMEDIATELY = 0x00000002,
  1055.         D2D1_PRESENT_OPTIONS_FORCE_DWORD = 0xffffffff
  1056.  
  1057. } D2D1_PRESENT_OPTIONS;
  1058.  
  1059. DEFINE_ENUM_FLAG_OPERATORS(D2D1_PRESENT_OPTIONS);
  1060.  
  1061.  
  1062. //+-----------------------------------------------------------------------------
  1063. //
  1064. //  Struct:
  1065. //      D2D1_RENDER_TARGET_PROPERTIES
  1066. //
  1067. //------------------------------------------------------------------------------
  1068. typedef struct D2D1_RENDER_TARGET_PROPERTIES
  1069. {
  1070.     D2D1_RENDER_TARGET_TYPE type;
  1071.     D2D1_PIXEL_FORMAT pixelFormat;
  1072.     FLOAT dpiX;
  1073.     FLOAT dpiY;
  1074.     D2D1_RENDER_TARGET_USAGE usage;
  1075.     D2D1_FEATURE_LEVEL minLevel;
  1076.  
  1077. } D2D1_RENDER_TARGET_PROPERTIES;
  1078.  
  1079.  
  1080. //+-----------------------------------------------------------------------------
  1081. //
  1082. //  Struct:
  1083. //      D2D1_HWND_RENDER_TARGET_PROPERTIES
  1084. //
  1085. //------------------------------------------------------------------------------
  1086. typedef struct D2D1_HWND_RENDER_TARGET_PROPERTIES
  1087. {
  1088.     HWND hwnd;
  1089.     D2D1_SIZE_U pixelSize;
  1090.     D2D1_PRESENT_OPTIONS presentOptions;
  1091.  
  1092. } D2D1_HWND_RENDER_TARGET_PROPERTIES;
  1093.  
  1094.  
  1095. //+-----------------------------------------------------------------------------
  1096. //
  1097. //  Flag:
  1098. //      D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
  1099. //
  1100. //------------------------------------------------------------------------------
  1101. typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS
  1102. {
  1103.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x00000000,
  1104.        
  1105.         //
  1106.         // The compatible render target will allow a call to GetDC on the
  1107.         // IGdiInteropRenderTarget interface. This can be specified even if the parent
  1108.         // render target is not GDI compatible.
  1109.         //
  1110.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE = 0x00000001,
  1111.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD = 0xffffffff
  1112.  
  1113. } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
  1114.  
  1115. DEFINE_ENUM_FLAG_OPERATORS(D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS);
  1116.  
  1117.  
  1118. //+-----------------------------------------------------------------------------
  1119. //
  1120. //  Struct:
  1121. //      D2D1_DRAWING_STATE_DESCRIPTION
  1122. //
  1123. //  Synopsis:
  1124. //      Allows the drawing state to be atomically created. This also specifies the
  1125. //      drawing state that is saved into an IDrawingStateBlock object.
  1126. //
  1127. //------------------------------------------------------------------------------
  1128. typedef struct D2D1_DRAWING_STATE_DESCRIPTION
  1129. {
  1130.     D2D1_ANTIALIAS_MODE antialiasMode;
  1131.     D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode;
  1132.     D2D1_TAG tag1;
  1133.     D2D1_TAG tag2;
  1134.     D2D1_MATRIX_3X2_F transform;
  1135.  
  1136. } D2D1_DRAWING_STATE_DESCRIPTION;
  1137.  
  1138.  
  1139. //+-----------------------------------------------------------------------------
  1140. //
  1141. //  Enum:
  1142. //      D2D1_DC_INITIALIZE_MODE
  1143. //
  1144. //------------------------------------------------------------------------------
  1145. typedef enum D2D1_DC_INITIALIZE_MODE
  1146. {
  1147.        
  1148.         //
  1149.         // The contents of the D2D render target will be copied to the DC.
  1150.         //
  1151.         D2D1_DC_INITIALIZE_MODE_COPY = 0,
  1152.        
  1153.         //
  1154.         // The contents of the DC will be cleared.
  1155.         //
  1156.         D2D1_DC_INITIALIZE_MODE_CLEAR = 1,
  1157.         D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0xffffffff
  1158.  
  1159. } D2D1_DC_INITIALIZE_MODE;
  1160.  
  1161.  
  1162. //+-----------------------------------------------------------------------------
  1163. //
  1164. //  Enum:
  1165. //      D2D1_DEBUG_LEVEL
  1166. //
  1167. //  Synopsis:
  1168. //      Indicates the debug level to be outputed by the debug layer.
  1169. //
  1170. //------------------------------------------------------------------------------
  1171. typedef enum D2D1_DEBUG_LEVEL
  1172. {
  1173.         D2D1_DEBUG_LEVEL_NONE = 0,
  1174.         D2D1_DEBUG_LEVEL_ERROR = 1,
  1175.         D2D1_DEBUG_LEVEL_WARNING = 2,
  1176.         D2D1_DEBUG_LEVEL_INFORMATION = 3,
  1177.         D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff
  1178.  
  1179. } D2D1_DEBUG_LEVEL;
  1180.  
  1181.  
  1182. //+-----------------------------------------------------------------------------
  1183. //
  1184. //  Enum:
  1185. //      D2D1_FACTORY_TYPE
  1186. //
  1187. //  Synopsis:
  1188. //      Specifies the threading model of the created factory and all of its derived
  1189. //      resources.
  1190. //
  1191. //------------------------------------------------------------------------------
  1192. typedef enum D2D1_FACTORY_TYPE
  1193. {
  1194.        
  1195.         //
  1196.         // The resulting factory and derived resources may only be invoked serially.
  1197.         // Reference counts on resources are interlocked, however, resource and render
  1198.         // target state is not protected from multi-threaded access.
  1199.         //
  1200.         D2D1_FACTORY_TYPE_SINGLE_THREADED = 0,
  1201.        
  1202.         //
  1203.         // The resulting factory may be invoked from multiple threads. Returned resources
  1204.         // use interlocked reference counting and their state is protected.
  1205.         //
  1206.         D2D1_FACTORY_TYPE_MULTI_THREADED = 1,
  1207.         D2D1_FACTORY_TYPE_FORCE_DWORD = 0xffffffff
  1208.  
  1209. } D2D1_FACTORY_TYPE;
  1210.  
  1211.  
  1212. //+-----------------------------------------------------------------------------
  1213. //
  1214. //  Struct:
  1215. //      D2D1_FACTORY_OPTIONS
  1216. //
  1217. //  Synopsis:
  1218. //      Allows additional parameters for factory creation.
  1219. //
  1220. //------------------------------------------------------------------------------
  1221. typedef struct D2D1_FACTORY_OPTIONS
  1222. {
  1223.    
  1224.     //
  1225.     // Requests a certain level of debugging information from the debug layer. This
  1226.     // parameter is ignored if the debug layer DLL is not present.
  1227.     //
  1228.     D2D1_DEBUG_LEVEL debugLevel;
  1229.  
  1230. } D2D1_FACTORY_OPTIONS;
  1231.  
  1232.  
  1233. #ifndef D2D_USE_C_DEFINITIONS
  1234.  
  1235.  
  1236.  
  1237. //+-----------------------------------------------------------------------------
  1238. //
  1239. //  Interface:
  1240. //      ID2D1Resource
  1241. //
  1242. //  Synopsis:
  1243. //      The root interface for all resources in D2D.
  1244. //
  1245. //------------------------------------------------------------------------------
  1246. interface D2D1_DECLARE_INTERFACE("2cd90691-12e2-11dc-9fed-001143a055f9") ID2D1Resource  : public IUnknown
  1247. {
  1248.    
  1249.    
  1250.     //
  1251.     // Retrieve the factory associated with this resource.
  1252.     //
  1253.     STDMETHOD_(void, GetFactory)(
  1254.         __deref_out ID2D1Factory **factory
  1255.         ) CONST PURE;
  1256. }; // interface ID2D1Resource
  1257.  
  1258.  
  1259.  
  1260. //+-----------------------------------------------------------------------------
  1261. //
  1262. //  Interface:
  1263. //      ID2D1Bitmap
  1264. //
  1265. //  Synopsis:
  1266. //      Root bitmap resource, linearly scaled on a draw call.
  1267. //
  1268. //------------------------------------------------------------------------------
  1269. interface D2D1_DECLARE_INTERFACE("a2296057-ea42-4099-983b-539fb6505426") ID2D1Bitmap  : public ID2D1Resource
  1270. {
  1271.    
  1272.    
  1273.     //
  1274.     // Returns the size of the bitmap in resolution independent units.
  1275.     //
  1276.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  1277.         ) CONST PURE;
  1278.    
  1279.    
  1280.     //
  1281.     // Returns the size of the bitmap in resolution dependent units, (pixels).
  1282.     //
  1283.     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(
  1284.         ) CONST PURE;
  1285.    
  1286.    
  1287.     //
  1288.     // Retrieve the format of the bitmap.
  1289.     //
  1290.     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(
  1291.         ) CONST PURE;
  1292.    
  1293.    
  1294.     //
  1295.     // Return the DPI of the bitmap.
  1296.     //
  1297.     STDMETHOD_(void, GetDpi)(
  1298.         __out FLOAT *dpiX,
  1299.         __out FLOAT *dpiY
  1300.         ) CONST PURE;
  1301.    
  1302.     STDMETHOD(CopyFromBitmap)(
  1303.         __in_opt CONST D2D1_POINT_2U *destPoint,
  1304.         __in ID2D1Bitmap *bitmap,
  1305.         __in_opt CONST D2D1_RECT_U *srcRect
  1306.         ) PURE;
  1307.    
  1308.     STDMETHOD(CopyFromRenderTarget)(
  1309.         __in_opt CONST D2D1_POINT_2U *destPoint,
  1310.         __in ID2D1RenderTarget *renderTarget,
  1311.         __in_opt CONST D2D1_RECT_U *srcRect
  1312.         ) PURE;
  1313.    
  1314.     STDMETHOD(CopyFromMemory)(
  1315.         __in_opt CONST D2D1_RECT_U *dstRect,
  1316.         __in CONST void *srcData,
  1317.         UINT32 pitch
  1318.         ) PURE;
  1319. }; // interface ID2D1Bitmap
  1320.  
  1321.  
  1322.  
  1323. //+-----------------------------------------------------------------------------
  1324. //
  1325. //  Interface:
  1326. //      ID2D1GradientStopCollection
  1327. //
  1328. //  Synopsis:
  1329. //      Represents an collection of gradient stops that can then be the source resource
  1330. //      for either a linear or radial gradient brush.
  1331. //
  1332. //------------------------------------------------------------------------------
  1333. interface D2D1_DECLARE_INTERFACE("2cd906a7-12e2-11dc-9fed-001143a055f9") ID2D1GradientStopCollection  : public ID2D1Resource
  1334. {
  1335.    
  1336.    
  1337.     //
  1338.     // Returns the number of stops in the gradient.
  1339.     //
  1340.     STDMETHOD_(UINT32, GetGradientStopCount)(
  1341.         ) CONST PURE;
  1342.    
  1343.    
  1344.     //
  1345.     // Copies the gradient stops from the collection into the caller's interface.
  1346.     //
  1347.     STDMETHOD_(void, GetGradientStops)(
  1348.         __out_ecount(gradientStopsCount) D2D1_GRADIENT_STOP *gradientStops,
  1349.         UINT gradientStopsCount
  1350.         ) CONST PURE;
  1351.    
  1352.    
  1353.     //
  1354.     // Returns whether the interpolation occurs with 1.0 or 2.2 gamma.
  1355.     //
  1356.     STDMETHOD_(D2D1_GAMMA, GetColorInterpolationGamma)(
  1357.         ) CONST PURE;
  1358.    
  1359.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendMode)(
  1360.         ) CONST PURE;
  1361. }; // interface ID2D1GradientStopCollection
  1362.  
  1363.  
  1364.  
  1365. //+-----------------------------------------------------------------------------
  1366. //
  1367. //  Interface:
  1368. //      ID2D1Brush
  1369. //
  1370. //  Synopsis:
  1371. //      The root brush interface. All brushes can be used to fill or pen a geometry.
  1372. //
  1373. //------------------------------------------------------------------------------
  1374. interface D2D1_DECLARE_INTERFACE("2cd906a8-12e2-11dc-9fed-001143a055f9") ID2D1Brush  : public ID2D1Resource
  1375. {
  1376.    
  1377.    
  1378.     //
  1379.     // Sets the opacity for when the brush is drawn over the entire fill of the brush.
  1380.     //
  1381.     STDMETHOD_(void, SetOpacity)(
  1382.         FLOAT opacity
  1383.         ) PURE;
  1384.    
  1385.    
  1386.     //
  1387.     // Sets the transform that applies to everything drawn by the brush.
  1388.     //
  1389.     STDMETHOD_(void, SetTransform)(
  1390.         __in CONST D2D1_MATRIX_3X2_F *transform
  1391.         ) PURE;
  1392.    
  1393.     STDMETHOD_(FLOAT, GetOpacity)(
  1394.         ) CONST PURE;
  1395.    
  1396.     STDMETHOD_(void, GetTransform)(
  1397.         __out D2D1_MATRIX_3X2_F *transform
  1398.         ) CONST PURE;
  1399.    
  1400.     void
  1401.     SetTransform(
  1402.         CONST D2D1_MATRIX_3X2_F &transform
  1403.         )
  1404.     {
  1405.         SetTransform(&transform);
  1406.     }
  1407. }; // interface ID2D1Brush
  1408.  
  1409.  
  1410.  
  1411. //+-----------------------------------------------------------------------------
  1412. //
  1413. //  Interface:
  1414. //      ID2D1BitmapBrush
  1415. //
  1416. //  Synopsis:
  1417. //      A bitmap brush allows a bitmap to be used to fill a geometry.
  1418. //
  1419. //------------------------------------------------------------------------------
  1420. interface D2D1_DECLARE_INTERFACE("2cd906aa-12e2-11dc-9fed-001143a055f9") ID2D1BitmapBrush  : public ID2D1Brush
  1421. {
  1422.    
  1423.    
  1424.     //
  1425.     // Sets how the bitmap is to be treated outside of its natural extent on the X
  1426.     // axis.
  1427.     //
  1428.     STDMETHOD_(void, SetExtendModeX)(
  1429.         D2D1_EXTEND_MODE extendModeX
  1430.         ) PURE;
  1431.    
  1432.    
  1433.     //
  1434.     // Sets how the bitmap is to be treated outside of its natural extent on the X
  1435.     // axis.
  1436.     //
  1437.     STDMETHOD_(void, SetExtendModeY)(
  1438.         D2D1_EXTEND_MODE extendModeY
  1439.         ) PURE;
  1440.    
  1441.    
  1442.     //
  1443.     // Sets the interpolation mode used when this brush is used.
  1444.     //
  1445.     STDMETHOD_(void, SetInterpolationMode)(
  1446.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode
  1447.         ) PURE;
  1448.    
  1449.    
  1450.     //
  1451.     // Sets the bitmap associated as the source of this brush.
  1452.     //
  1453.     STDMETHOD_(void, SetBitmap)(
  1454.         __in ID2D1Bitmap *bitmap
  1455.         ) PURE;
  1456.    
  1457.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)(
  1458.         ) CONST PURE;
  1459.    
  1460.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)(
  1461.         ) CONST PURE;
  1462.    
  1463.     STDMETHOD_(D2D1_BITMAP_INTERPOLATION_MODE, GetInterpolationMode)(
  1464.         ) CONST PURE;
  1465.    
  1466.     STDMETHOD_(void, GetBitmap)(
  1467.         __deref_out ID2D1Bitmap **bitmap
  1468.         ) CONST PURE;
  1469. }; // interface ID2D1BitmapBrush
  1470.  
  1471.  
  1472.  
  1473. //+-----------------------------------------------------------------------------
  1474. //
  1475. //  Interface:
  1476. //      ID2D1SolidColorBrush
  1477. //
  1478. //------------------------------------------------------------------------------
  1479. interface D2D1_DECLARE_INTERFACE("2cd906a9-12e2-11dc-9fed-001143a055f9") ID2D1SolidColorBrush  : public ID2D1Brush
  1480. {
  1481.    
  1482.     STDMETHOD_(void, SetColor)(
  1483.         __in CONST D2D1_COLOR_F *color
  1484.         ) PURE;
  1485.    
  1486.     STDMETHOD_(D2D1_COLOR_F, GetColor)(
  1487.         ) CONST PURE;
  1488.    
  1489.     void
  1490.     SetColor(
  1491.         CONST D2D1_COLOR_F &color
  1492.         )
  1493.     {
  1494.         SetColor(&color);
  1495.     }
  1496. }; // interface ID2D1SolidColorBrush
  1497.  
  1498.  
  1499.  
  1500. //+-----------------------------------------------------------------------------
  1501. //
  1502. //  Interface:
  1503. //      ID2D1LinearGradientBrush
  1504. //
  1505. //------------------------------------------------------------------------------
  1506. interface D2D1_DECLARE_INTERFACE("2cd906ab-12e2-11dc-9fed-001143a055f9") ID2D1LinearGradientBrush  : public ID2D1Brush
  1507. {
  1508.    
  1509.     STDMETHOD_(void, SetStartPoint)(
  1510.         D2D1_POINT_2F startPoint
  1511.         ) PURE;
  1512.    
  1513.    
  1514.     //
  1515.     // Sets the end point of the gradient in local coordinate space. This is not
  1516.     // influenced by the geometry being filled.
  1517.     //
  1518.     STDMETHOD_(void, SetEndPoint)(
  1519.         D2D1_POINT_2F endPoint
  1520.         ) PURE;
  1521.    
  1522.     STDMETHOD_(D2D1_POINT_2F, GetStartPoint)(
  1523.         ) CONST PURE;
  1524.    
  1525.     STDMETHOD_(D2D1_POINT_2F, GetEndPoint)(
  1526.         ) CONST PURE;
  1527.    
  1528.     STDMETHOD_(void, GetGradientStopCollection)(
  1529.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  1530.         ) CONST PURE;
  1531. }; // interface ID2D1LinearGradientBrush
  1532.  
  1533.  
  1534.  
  1535. //+-----------------------------------------------------------------------------
  1536. //
  1537. //  Interface:
  1538. //      ID2D1RadialGradientBrush
  1539. //
  1540. //------------------------------------------------------------------------------
  1541. interface D2D1_DECLARE_INTERFACE("2cd906ac-12e2-11dc-9fed-001143a055f9") ID2D1RadialGradientBrush  : public ID2D1Brush
  1542. {
  1543.    
  1544.    
  1545.     //
  1546.     // Sets the center of the radial gradient. This will be in local coordinates and
  1547.     // will not depend on the geometry being filled.
  1548.     //
  1549.     STDMETHOD_(void, SetCenter)(
  1550.         D2D1_POINT_2F center
  1551.         ) PURE;
  1552.    
  1553.    
  1554.     //
  1555.     // Sets offset of the origin relative to the radial gradient center.
  1556.     //
  1557.     STDMETHOD_(void, SetGradientOriginOffset)(
  1558.         D2D1_POINT_2F gradientOriginOffset
  1559.         ) PURE;
  1560.    
  1561.     STDMETHOD_(void, SetRadiusX)(
  1562.         FLOAT radiusX
  1563.         ) PURE;
  1564.    
  1565.     STDMETHOD_(void, SetRadiusY)(
  1566.         FLOAT radiusY
  1567.         ) PURE;
  1568.    
  1569.     STDMETHOD_(D2D1_POINT_2F, GetCenter)(
  1570.         ) CONST PURE;
  1571.    
  1572.     STDMETHOD_(D2D1_POINT_2F, GetGradientOriginOffset)(
  1573.         ) CONST PURE;
  1574.    
  1575.     STDMETHOD_(FLOAT, GetRadiusX)(
  1576.         ) CONST PURE;
  1577.    
  1578.     STDMETHOD_(FLOAT, GetRadiusY)(
  1579.         ) CONST PURE;
  1580.    
  1581.     STDMETHOD_(void, GetGradientStopCollection)(
  1582.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  1583.         ) CONST PURE;
  1584. }; // interface ID2D1RadialGradientBrush
  1585.  
  1586.  
  1587.  
  1588. //+-----------------------------------------------------------------------------
  1589. //
  1590. //  Interface:
  1591. //      ID2D1StrokeStyle
  1592. //
  1593. //  Synopsis:
  1594. //      Resource interface that holds pen style properties.
  1595. //
  1596. //------------------------------------------------------------------------------
  1597. interface D2D1_DECLARE_INTERFACE("2cd9069d-12e2-11dc-9fed-001143a055f9") ID2D1StrokeStyle  : public ID2D1Resource
  1598. {
  1599.    
  1600.     STDMETHOD_(D2D1_CAP_STYLE, GetStartCap)(
  1601.         ) CONST PURE;
  1602.    
  1603.     STDMETHOD_(D2D1_CAP_STYLE, GetEndCap)(
  1604.         ) CONST PURE;
  1605.    
  1606.     STDMETHOD_(D2D1_CAP_STYLE, GetDashCap)(
  1607.         ) CONST PURE;
  1608.    
  1609.     STDMETHOD_(FLOAT, GetMiterLimit)(
  1610.         ) CONST PURE;
  1611.    
  1612.     STDMETHOD_(D2D1_LINE_JOIN, GetLineJoin)(
  1613.         ) CONST PURE;
  1614.    
  1615.     STDMETHOD_(FLOAT, GetDashOffset)(
  1616.         ) CONST PURE;
  1617.    
  1618.     STDMETHOD_(D2D1_DASH_STYLE, GetDashStyle)(
  1619.         ) CONST PURE;
  1620.    
  1621.     STDMETHOD_(UINT32, GetDashesCount)(
  1622.         ) CONST PURE;
  1623.    
  1624.    
  1625.     //
  1626.     // Returns the dashes from the object into a user allocated array. The user must
  1627.     // call GetDashesCount to retrieve the required size.
  1628.     //
  1629.     STDMETHOD_(void, GetDashes)(
  1630.         __out_ecount(dashesCount) FLOAT *dashes,
  1631.         UINT dashesCount
  1632.         ) CONST PURE;
  1633. }; // interface ID2D1StrokeStyle
  1634.  
  1635.  
  1636.  
  1637. //+-----------------------------------------------------------------------------
  1638. //
  1639. //  Interface:
  1640. //      ID2D1Geometry
  1641. //
  1642. //------------------------------------------------------------------------------
  1643. interface D2D1_DECLARE_INTERFACE("2cd906a1-12e2-11dc-9fed-001143a055f9") ID2D1Geometry  : public ID2D1Resource
  1644. {
  1645.    
  1646.    
  1647.     //
  1648.     // Retrieve the bounds of the geometry, with an optional applied transform.
  1649.     //
  1650.     STDMETHOD(GetBounds)(
  1651.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1652.         __out D2D1_RECT_F *bounds
  1653.         ) CONST PURE;
  1654.    
  1655.    
  1656.     //
  1657.     // Get the bounds of the corresponding geometry after it has been widened or have
  1658.     // an optional pen style applied.
  1659.     //
  1660.     STDMETHOD(GetWidenedBounds)(
  1661.         FLOAT strokeWidth,
  1662.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1663.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1664.         FLOAT flatteningTolerance,
  1665.         __out D2D1_RECT_F *bounds
  1666.         ) CONST PURE;
  1667.    
  1668.    
  1669.     //
  1670.     // Checks to see whether the corresponding penned and widened geometry contains the
  1671.     // given point.
  1672.     //
  1673.     STDMETHOD(StrokeContainsPoint)(
  1674.         D2D1_POINT_2F point,
  1675.         FLOAT strokeWidth,
  1676.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1677.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1678.         FLOAT flatteningTolerance,
  1679.         __out BOOL *contains
  1680.         ) CONST PURE;
  1681.    
  1682.    
  1683.     //
  1684.     // Test whether the given fill of this geometry would contain this point.
  1685.     //
  1686.     STDMETHOD(FillContainsPoint)(
  1687.         D2D1_POINT_2F point,
  1688.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1689.         FLOAT flatteningTolerance,
  1690.         __out BOOL *contains
  1691.         ) CONST PURE;
  1692.    
  1693.    
  1694.     //
  1695.     // Compare how one geometry intersects or contains another geometry.
  1696.     //
  1697.     STDMETHOD(CompareWithGeometry)(
  1698.         __in ID2D1Geometry *inputGeometry,
  1699.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  1700.         FLOAT flatteningTolerance,
  1701.         __out D2D1_GEOMETRY_RELATION *relation
  1702.         ) CONST PURE;
  1703.    
  1704.    
  1705.     //
  1706.     // Converts a geometry to a simplified geometry that has arcs and quadratic beziers
  1707.     // removed.
  1708.     //
  1709.     STDMETHOD(Simplify)(
  1710.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
  1711.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1712.         FLOAT flatteningTolerance,
  1713.         __in ID2D1SimplifiedGeometrySink *geometrySink
  1714.         ) CONST PURE;
  1715.    
  1716.    
  1717.     //
  1718.     // Tessellates a geometry into triangles.
  1719.     //
  1720.     STDMETHOD(Tessellate)(
  1721.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1722.         FLOAT flatteningTolerance,
  1723.         __in ID2D1TessellationSink *tessellationSink
  1724.         ) CONST PURE;
  1725.    
  1726.    
  1727.     //
  1728.     // Performs a combine operation between the two geometries to produce a resulting
  1729.     // geometry.
  1730.     //
  1731.     STDMETHOD(CombineWithGeometry)(
  1732.         __in ID2D1Geometry *inputGeometry,
  1733.         D2D1_COMBINE_MODE combineMode,
  1734.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  1735.         FLOAT flatteningTolerance,
  1736.         __in ID2D1SimplifiedGeometrySink *geometrySink
  1737.         ) CONST PURE;
  1738.    
  1739.    
  1740.     //
  1741.     // Computes the outline of the geometry. The result is written back into a
  1742.     // simplified geometry sink.
  1743.     //
  1744.     STDMETHOD(Outline)(
  1745.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1746.         FLOAT flatteningTolerance,
  1747.         __in ID2D1SimplifiedGeometrySink *geometrySink
  1748.         ) CONST PURE;
  1749.    
  1750.    
  1751.     //
  1752.     // Computes the area of the geometry.
  1753.     //
  1754.     STDMETHOD(ComputeArea)(
  1755.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1756.         FLOAT flatteningTolerance,
  1757.         __out FLOAT *area
  1758.         ) CONST PURE;
  1759.    
  1760.    
  1761.     //
  1762.     // Computes the length of the geometry.
  1763.     //
  1764.     STDMETHOD(ComputeLength)(
  1765.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1766.         FLOAT flatteningTolerance,
  1767.         __out FLOAT *length
  1768.         ) CONST PURE;
  1769.    
  1770.    
  1771.     //
  1772.     // Computes the point and tangent a given distance along the path.
  1773.     //
  1774.     STDMETHOD(ComputePointAtLength)(
  1775.         FLOAT length,
  1776.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1777.         FLOAT flatteningTolerance,
  1778.         __out_opt D2D1_POINT_2F *point,
  1779.         __out_opt D2D1_POINT_2F *unitTangentVector
  1780.         ) CONST PURE;
  1781.    
  1782.    
  1783.     //
  1784.     // Get the geometry and widen it as well as apply an optional pen style.
  1785.     //
  1786.     STDMETHOD(Widen)(
  1787.         FLOAT strokeWidth,
  1788.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1789.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1790.         FLOAT flatteningTolerance,
  1791.         __in ID2D1SimplifiedGeometrySink *geometrySink
  1792.         ) CONST PURE;
  1793.    
  1794.    
  1795.     //
  1796.     // Retrieve the bounds of the geometry, with an optional applied transform.
  1797.     //
  1798.     HRESULT
  1799.     GetBounds(
  1800.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1801.         __out D2D1_RECT_F *bounds
  1802.         ) CONST
  1803.     {
  1804.         return GetBounds(&worldTransform, bounds);
  1805.     }
  1806.    
  1807.    
  1808.     //
  1809.     // Get the bounds of the corresponding geometry after it has been widened or have
  1810.     // an optional pen style applied.
  1811.     //
  1812.     HRESULT
  1813.     GetWidenedBounds(
  1814.         FLOAT strokeWidth,
  1815.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1816.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1817.         FLOAT flatteningTolerance,
  1818.         __out D2D1_RECT_F *bounds
  1819.         ) CONST
  1820.     {
  1821.         return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, bounds);
  1822.     }
  1823.    
  1824.    
  1825.     //
  1826.     // Get the bounds of the corresponding geometry after it has been widened or have
  1827.     // an optional pen style applied.
  1828.     //
  1829.     HRESULT
  1830.     GetWidenedBounds(
  1831.         FLOAT strokeWidth,
  1832.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1833.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1834.         __out D2D1_RECT_F *bounds
  1835.         ) CONST
  1836.     {
  1837.         return GetWidenedBounds(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds);
  1838.     }
  1839.    
  1840.    
  1841.     //
  1842.     // Get the bounds of the corresponding geometry after it has been widened or have
  1843.     // an optional pen style applied.
  1844.     //
  1845.     HRESULT
  1846.     GetWidenedBounds(
  1847.         FLOAT strokeWidth,
  1848.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1849.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1850.         __out D2D1_RECT_F *bounds
  1851.         ) CONST
  1852.     {
  1853.         return GetWidenedBounds(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, bounds);
  1854.     }
  1855.    
  1856.     HRESULT
  1857.     StrokeContainsPoint(
  1858.         D2D1_POINT_2F point,
  1859.         FLOAT strokeWidth,
  1860.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1861.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1862.         FLOAT flatteningTolerance,
  1863.         __out BOOL *contains
  1864.         ) CONST
  1865.     {
  1866.         return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, contains);
  1867.     }
  1868.    
  1869.    
  1870.     //
  1871.     // Checks to see whether the corresponding penned and widened geometry contains the
  1872.     // given point.
  1873.     //
  1874.     HRESULT
  1875.     StrokeContainsPoint(
  1876.         D2D1_POINT_2F point,
  1877.         FLOAT strokeWidth,
  1878.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1879.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1880.         __out BOOL *contains
  1881.         ) CONST
  1882.     {
  1883.         return StrokeContainsPoint(point, strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
  1884.     }
  1885.    
  1886.     HRESULT
  1887.     StrokeContainsPoint(
  1888.         D2D1_POINT_2F point,
  1889.         FLOAT strokeWidth,
  1890.         __in_opt ID2D1StrokeStyle *strokeStyle,
  1891.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1892.         __out BOOL *contains
  1893.         ) CONST
  1894.     {
  1895.         return StrokeContainsPoint(point, strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
  1896.     }
  1897.    
  1898.     HRESULT
  1899.     FillContainsPoint(
  1900.         D2D1_POINT_2F point,
  1901.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1902.         FLOAT flatteningTolerance,
  1903.         __out BOOL *contains
  1904.         ) CONST
  1905.     {
  1906.         return FillContainsPoint(point, &worldTransform, flatteningTolerance, contains);
  1907.     }
  1908.    
  1909.    
  1910.     //
  1911.     // Test whether the given fill of this geometry would contain this point.
  1912.     //
  1913.     HRESULT
  1914.     FillContainsPoint(
  1915.         D2D1_POINT_2F point,
  1916.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  1917.         __out BOOL *contains
  1918.         ) CONST
  1919.     {
  1920.         return FillContainsPoint(point, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
  1921.     }
  1922.    
  1923.     HRESULT
  1924.     FillContainsPoint(
  1925.         D2D1_POINT_2F point,
  1926.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1927.         __out BOOL *contains
  1928.         ) CONST
  1929.     {
  1930.         return FillContainsPoint(point, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, contains);
  1931.     }
  1932.    
  1933.    
  1934.     //
  1935.     // Compare how one geometry intersects or contains another geometry.
  1936.     //
  1937.     HRESULT
  1938.     CompareWithGeometry(
  1939.         __in ID2D1Geometry *inputGeometry,
  1940.         CONST D2D1_MATRIX_3X2_F &inputGeometryTransform,
  1941.         FLOAT flatteningTolerance,
  1942.         __out D2D1_GEOMETRY_RELATION *relation
  1943.         ) CONST
  1944.     {
  1945.         return CompareWithGeometry(inputGeometry, &inputGeometryTransform, flatteningTolerance, relation);
  1946.     }
  1947.    
  1948.    
  1949.     //
  1950.     // Compare how one geometry intersects or contains another geometry.
  1951.     //
  1952.     HRESULT
  1953.     CompareWithGeometry(
  1954.         __in ID2D1Geometry *inputGeometry,
  1955.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  1956.         __out D2D1_GEOMETRY_RELATION *relation
  1957.         ) CONST
  1958.     {
  1959.         return CompareWithGeometry(inputGeometry, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation);
  1960.     }
  1961.    
  1962.    
  1963.     //
  1964.     // Compare how one geometry intersects or contains another geometry.
  1965.     //
  1966.     HRESULT
  1967.     CompareWithGeometry(
  1968.         __in ID2D1Geometry *inputGeometry,
  1969.         CONST D2D1_MATRIX_3X2_F &inputGeometryTransform,
  1970.         __out D2D1_GEOMETRY_RELATION *relation
  1971.         ) CONST
  1972.     {
  1973.         return CompareWithGeometry(inputGeometry, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, relation);
  1974.     }
  1975.    
  1976.    
  1977.     //
  1978.     // Converts a geometry to a simplified geometry that has arcs and quadratic beziers
  1979.     // removed.
  1980.     //
  1981.     HRESULT
  1982.     Simplify(
  1983.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
  1984.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  1985.         FLOAT flatteningTolerance,
  1986.         __in ID2D1SimplifiedGeometrySink *geometrySink
  1987.         ) CONST
  1988.     {
  1989.         return Simplify(simplificationOption, &worldTransform, flatteningTolerance, geometrySink);
  1990.     }
  1991.    
  1992.    
  1993.     //
  1994.     // Converts a geometry to a simplified geometry that has arcs and quadratic beziers
  1995.     // removed.
  1996.     //
  1997.     HRESULT
  1998.     Simplify(
  1999.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
  2000.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2001.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2002.         ) CONST
  2003.     {
  2004.         return Simplify(simplificationOption, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2005.     }
  2006.    
  2007.    
  2008.     //
  2009.     // Converts a geometry to a simplified geometry that has arcs and quadratic beziers
  2010.     // removed.
  2011.     //
  2012.     HRESULT
  2013.     Simplify(
  2014.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
  2015.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2016.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2017.         ) CONST
  2018.     {
  2019.         return Simplify(simplificationOption, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2020.     }
  2021.    
  2022.    
  2023.     //
  2024.     // Tessellates a geometry into triangles.
  2025.     //
  2026.     HRESULT
  2027.     Tessellate(
  2028.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2029.         FLOAT flatteningTolerance,
  2030.         __in ID2D1TessellationSink *tessellationSink
  2031.         ) CONST
  2032.     {
  2033.         return Tessellate(&worldTransform, flatteningTolerance, tessellationSink);
  2034.     }
  2035.    
  2036.    
  2037.     //
  2038.     // Tessellates a geometry into triangles.
  2039.     //
  2040.     HRESULT
  2041.     Tessellate(
  2042.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2043.         __in ID2D1TessellationSink *tessellationSink
  2044.         ) CONST
  2045.     {
  2046.         return Tessellate(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink);
  2047.     }
  2048.    
  2049.    
  2050.     //
  2051.     // Tessellates a geometry into triangles.
  2052.     //
  2053.     HRESULT
  2054.     Tessellate(
  2055.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2056.         __in ID2D1TessellationSink *tessellationSink
  2057.         ) CONST
  2058.     {
  2059.         return Tessellate(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, tessellationSink);
  2060.     }
  2061.    
  2062.    
  2063.     //
  2064.     // Performs a combine operation between the two geometries to produce a resulting
  2065.     // geometry.
  2066.     //
  2067.     HRESULT
  2068.     CombineWithGeometry(
  2069.         __in ID2D1Geometry *inputGeometry,
  2070.         D2D1_COMBINE_MODE combineMode,
  2071.         CONST D2D1_MATRIX_3X2_F &inputGeometryTransform,
  2072.         FLOAT flatteningTolerance,
  2073.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2074.         ) CONST
  2075.     {
  2076.         return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, flatteningTolerance, geometrySink);
  2077.     }
  2078.    
  2079.    
  2080.     //
  2081.     // Performs a combine operation between the two geometries to produce a resulting
  2082.     // geometry.
  2083.     //
  2084.     HRESULT
  2085.     CombineWithGeometry(
  2086.         __in ID2D1Geometry *inputGeometry,
  2087.         D2D1_COMBINE_MODE combineMode,
  2088.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  2089.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2090.         ) CONST
  2091.     {
  2092.         return CombineWithGeometry(inputGeometry, combineMode, inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2093.     }
  2094.    
  2095.    
  2096.     //
  2097.     // Performs a combine operation between the two geometries to produce a resulting
  2098.     // geometry.
  2099.     //
  2100.     HRESULT
  2101.     CombineWithGeometry(
  2102.         __in ID2D1Geometry *inputGeometry,
  2103.         D2D1_COMBINE_MODE combineMode,
  2104.         CONST D2D1_MATRIX_3X2_F &inputGeometryTransform,
  2105.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2106.         ) CONST
  2107.     {
  2108.         return CombineWithGeometry(inputGeometry, combineMode, &inputGeometryTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2109.     }
  2110.    
  2111.    
  2112.     //
  2113.     // Computes the outline of the geometry. The result is written back into a
  2114.     // simplified geometry sink.
  2115.     //
  2116.     HRESULT
  2117.     Outline(
  2118.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2119.         FLOAT flatteningTolerance,
  2120.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2121.         ) CONST
  2122.     {
  2123.         return Outline(&worldTransform, flatteningTolerance, geometrySink);
  2124.     }
  2125.    
  2126.    
  2127.     //
  2128.     // Computes the outline of the geometry. The result is written back into a
  2129.     // simplified geometry sink.
  2130.     //
  2131.     HRESULT
  2132.     Outline(
  2133.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2134.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2135.         ) CONST
  2136.     {
  2137.         return Outline(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2138.     }
  2139.    
  2140.    
  2141.     //
  2142.     // Computes the outline of the geometry. The result is written back into a
  2143.     // simplified geometry sink.
  2144.     //
  2145.     HRESULT
  2146.     Outline(
  2147.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2148.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2149.         ) CONST
  2150.     {
  2151.         return Outline(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2152.     }
  2153.    
  2154.    
  2155.     //
  2156.     // Computes the area of the geometry.
  2157.     //
  2158.     HRESULT
  2159.     ComputeArea(
  2160.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2161.         FLOAT flatteningTolerance,
  2162.         __out FLOAT *area
  2163.         ) CONST
  2164.     {
  2165.         return ComputeArea(&worldTransform, flatteningTolerance, area);
  2166.     }
  2167.    
  2168.    
  2169.     //
  2170.     // Computes the area of the geometry.
  2171.     //
  2172.     HRESULT
  2173.     ComputeArea(
  2174.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2175.         __out FLOAT *area
  2176.         ) CONST
  2177.     {
  2178.         return ComputeArea(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area);
  2179.     }
  2180.    
  2181.    
  2182.     //
  2183.     // Computes the area of the geometry.
  2184.     //
  2185.     HRESULT
  2186.     ComputeArea(
  2187.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2188.         __out FLOAT *area
  2189.         ) CONST
  2190.     {
  2191.         return ComputeArea(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, area);
  2192.     }
  2193.    
  2194.    
  2195.     //
  2196.     // Computes the length of the geometry.
  2197.     //
  2198.     HRESULT
  2199.     ComputeLength(
  2200.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2201.         FLOAT flatteningTolerance,
  2202.         __out FLOAT *length
  2203.         ) CONST
  2204.     {
  2205.         return ComputeLength(&worldTransform, flatteningTolerance, length);
  2206.     }
  2207.    
  2208.    
  2209.     //
  2210.     // Computes the length of the geometry.
  2211.     //
  2212.     HRESULT
  2213.     ComputeLength(
  2214.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2215.         __out FLOAT *length
  2216.         ) CONST
  2217.     {
  2218.         return ComputeLength(worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length);
  2219.     }
  2220.    
  2221.    
  2222.     //
  2223.     // Computes the length of the geometry.
  2224.     //
  2225.     HRESULT
  2226.     ComputeLength(
  2227.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2228.         __out FLOAT *length
  2229.         ) CONST
  2230.     {
  2231.         return ComputeLength(&worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, length);
  2232.     }
  2233.    
  2234.    
  2235.     //
  2236.     // Computes the point and tangent a given distance along the path.
  2237.     //
  2238.     HRESULT
  2239.     ComputePointAtLength(
  2240.         FLOAT length,
  2241.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2242.         FLOAT flatteningTolerance,
  2243.         __out_opt D2D1_POINT_2F *point,
  2244.         __out_opt D2D1_POINT_2F *unitTangentVector
  2245.         ) CONST
  2246.     {
  2247.         return ComputePointAtLength(length, &worldTransform, flatteningTolerance, point, unitTangentVector);
  2248.     }
  2249.    
  2250.    
  2251.     //
  2252.     // Computes the point and tangent a given distance along the path.
  2253.     //
  2254.     HRESULT
  2255.     ComputePointAtLength(
  2256.         FLOAT length,
  2257.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2258.         __out_opt D2D1_POINT_2F *point,
  2259.         __out_opt D2D1_POINT_2F *unitTangentVector
  2260.         ) CONST
  2261.     {
  2262.         return ComputePointAtLength(length, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector);
  2263.     }
  2264.    
  2265.    
  2266.     //
  2267.     // Computes the point and tangent a given distance along the path.
  2268.     //
  2269.     HRESULT
  2270.     ComputePointAtLength(
  2271.         FLOAT length,
  2272.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2273.         __out_opt D2D1_POINT_2F *point,
  2274.         __out_opt D2D1_POINT_2F *unitTangentVector
  2275.         ) CONST
  2276.     {
  2277.         return ComputePointAtLength(length, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, point, unitTangentVector);
  2278.     }
  2279.    
  2280.    
  2281.     //
  2282.     // Get the geometry and widen it as well as apply an optional pen style.
  2283.     //
  2284.     HRESULT
  2285.     Widen(
  2286.         FLOAT strokeWidth,
  2287.         __in_opt ID2D1StrokeStyle *strokeStyle,
  2288.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2289.         FLOAT flatteningTolerance,
  2290.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2291.         ) CONST
  2292.     {
  2293.         return Widen(strokeWidth, strokeStyle, &worldTransform, flatteningTolerance, geometrySink);
  2294.     }
  2295.    
  2296.    
  2297.     //
  2298.     // Get the geometry and widen it as well as apply an optional pen style.
  2299.     //
  2300.     HRESULT
  2301.     Widen(
  2302.         FLOAT strokeWidth,
  2303.         __in_opt ID2D1StrokeStyle *strokeStyle,
  2304.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  2305.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2306.         ) CONST
  2307.     {
  2308.         return Widen(strokeWidth, strokeStyle, worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2309.     }
  2310.    
  2311.    
  2312.     //
  2313.     // Get the geometry and widen it as well as apply an optional pen style.
  2314.     //
  2315.     HRESULT
  2316.     Widen(
  2317.         FLOAT strokeWidth,
  2318.         __in_opt ID2D1StrokeStyle *strokeStyle,
  2319.         CONST D2D1_MATRIX_3X2_F &worldTransform,
  2320.         __in ID2D1SimplifiedGeometrySink *geometrySink
  2321.         ) CONST
  2322.     {
  2323.         return Widen(strokeWidth, strokeStyle, &worldTransform, D2D1_DEFAULT_FLATTENING_TOLERANCE, geometrySink);
  2324.     }
  2325. }; // interface ID2D1Geometry
  2326.  
  2327.  
  2328.  
  2329. //+-----------------------------------------------------------------------------
  2330. //
  2331. //  Interface:
  2332. //      ID2D1RectangleGeometry
  2333. //
  2334. //------------------------------------------------------------------------------
  2335. interface D2D1_DECLARE_INTERFACE("2cd906a2-12e2-11dc-9fed-001143a055f9") ID2D1RectangleGeometry  : public ID2D1Geometry
  2336. {
  2337.    
  2338.     STDMETHOD_(void, GetRect)(
  2339.         __out D2D1_RECT_F *rect
  2340.         ) CONST PURE;
  2341. }; // interface ID2D1RectangleGeometry
  2342.  
  2343.  
  2344.  
  2345. //+-----------------------------------------------------------------------------
  2346. //
  2347. //  Interface:
  2348. //      ID2D1RoundedRectangleGeometry
  2349. //
  2350. //------------------------------------------------------------------------------
  2351. interface D2D1_DECLARE_INTERFACE("2cd906a3-12e2-11dc-9fed-001143a055f9") ID2D1RoundedRectangleGeometry  : public ID2D1Geometry
  2352. {
  2353.    
  2354.     STDMETHOD_(void, GetRoundedRect)(
  2355.         __out D2D1_ROUNDED_RECT *roundedRect
  2356.         ) CONST PURE;
  2357. }; // interface ID2D1RoundedRectangleGeometry
  2358.  
  2359.  
  2360.  
  2361. //+-----------------------------------------------------------------------------
  2362. //
  2363. //  Interface:
  2364. //      ID2D1EllipseGeometry
  2365. //
  2366. //------------------------------------------------------------------------------
  2367. interface D2D1_DECLARE_INTERFACE("2cd906a4-12e2-11dc-9fed-001143a055f9") ID2D1EllipseGeometry  : public ID2D1Geometry
  2368. {
  2369.    
  2370.     STDMETHOD_(void, GetEllipse)(
  2371.         __out D2D1_ELLIPSE *ellipse
  2372.         ) CONST PURE;
  2373. }; // interface ID2D1EllipseGeometry
  2374.  
  2375.  
  2376.  
  2377. //+-----------------------------------------------------------------------------
  2378. //
  2379. //  Interface:
  2380. //      ID2D1GeometryGroup
  2381. //
  2382. //------------------------------------------------------------------------------
  2383. interface D2D1_DECLARE_INTERFACE("2cd906a6-12e2-11dc-9fed-001143a055f9") ID2D1GeometryGroup  : public ID2D1Geometry
  2384. {
  2385.    
  2386.     STDMETHOD_(D2D1_FILL_MODE, GetFillMode)(
  2387.         ) CONST PURE;
  2388.    
  2389.     STDMETHOD_(UINT32, GetSourceGeometryCount)(
  2390.         ) CONST PURE;
  2391.    
  2392.     STDMETHOD_(void, GetSourceGeometries)(
  2393.         __out_ecount(geometriesCount) ID2D1Geometry **geometries,
  2394.         UINT geometriesCount
  2395.         ) CONST PURE;
  2396. }; // interface ID2D1GeometryGroup
  2397.  
  2398.  
  2399.  
  2400. //+-----------------------------------------------------------------------------
  2401. //
  2402. //  Interface:
  2403. //      ID2D1TransformedGeometry
  2404. //
  2405. //------------------------------------------------------------------------------
  2406. interface D2D1_DECLARE_INTERFACE("2cd906bb-12e2-11dc-9fed-001143a055f9") ID2D1TransformedGeometry  : public ID2D1Geometry
  2407. {
  2408.    
  2409.     STDMETHOD_(void, GetSourceGeometry)(
  2410.         __deref_out ID2D1Geometry **sourceGeometry
  2411.         ) CONST PURE;
  2412.    
  2413.     STDMETHOD_(void, GetTransform)(
  2414.         __out D2D1_MATRIX_3X2_F *transform
  2415.         ) CONST PURE;
  2416. }; // interface ID2D1TransformedGeometry
  2417.  
  2418.  
  2419.  
  2420. //+-----------------------------------------------------------------------------
  2421. //
  2422. //  Interface:
  2423. //      ID2D1SimplifiedGeometrySink
  2424. //
  2425. //------------------------------------------------------------------------------
  2426. interface D2D1_DECLARE_INTERFACE("2cd9069e-12e2-11dc-9fed-001143a055f9") ID2D1SimplifiedGeometrySink  : public IUnknown
  2427. {
  2428.    
  2429.     STDMETHOD_(void, SetFillMode)(
  2430.         D2D1_FILL_MODE fillMode
  2431.         ) PURE;
  2432.    
  2433.     STDMETHOD_(void, SetSegmentFlags)(
  2434.         D2D1_PATH_SEGMENT vertexFlags
  2435.         ) PURE;
  2436.    
  2437.     STDMETHOD_(void, BeginFigure)(
  2438.         D2D1_POINT_2F startPoint,
  2439.         D2D1_FIGURE_BEGIN figureBegin
  2440.         ) PURE;
  2441.    
  2442.     STDMETHOD_(void, AddLines)(
  2443.         __in_ecount(pointsCount) CONST D2D1_POINT_2F *points,
  2444.         UINT pointsCount
  2445.         ) PURE;
  2446.    
  2447.     STDMETHOD_(void, AddBeziers)(
  2448.         __in_ecount(beziersCount) CONST D2D1_BEZIER_SEGMENT *beziers,
  2449.         UINT beziersCount
  2450.         ) PURE;
  2451.    
  2452.     STDMETHOD_(void, EndFigure)(
  2453.         D2D1_FIGURE_END figureEnd
  2454.         ) PURE;
  2455.    
  2456.     STDMETHOD(Close)(
  2457.         ) PURE;
  2458. }; // interface ID2D1SimplifiedGeometrySink
  2459.  
  2460.  
  2461.  
  2462. //+-----------------------------------------------------------------------------
  2463. //
  2464. //  Interface:
  2465. //      ID2D1GeometrySink
  2466. //
  2467. //------------------------------------------------------------------------------
  2468. interface D2D1_DECLARE_INTERFACE("2cd9069f-12e2-11dc-9fed-001143a055f9") ID2D1GeometrySink  : public ID2D1SimplifiedGeometrySink
  2469. {
  2470.    
  2471.     STDMETHOD_(void, AddLine)(
  2472.         D2D1_POINT_2F point
  2473.         ) PURE;
  2474.    
  2475.     STDMETHOD_(void, AddBezier)(
  2476.         __in CONST D2D1_BEZIER_SEGMENT *bezier
  2477.         ) PURE;
  2478.    
  2479.     STDMETHOD_(void, AddQuadraticBezier)(
  2480.         __in CONST D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
  2481.         ) PURE;
  2482.    
  2483.     STDMETHOD_(void, AddQuadraticBeziers)(
  2484.         __in_ecount(beziersCount) CONST D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
  2485.         UINT beziersCount
  2486.         ) PURE;
  2487.    
  2488.     STDMETHOD_(void, AddArc)(
  2489.         __in CONST D2D1_ARC_SEGMENT *arc
  2490.         ) PURE;
  2491.    
  2492.     void
  2493.     AddBezier(
  2494.         CONST D2D1_BEZIER_SEGMENT &bezier
  2495.         )
  2496.     {
  2497.         AddBezier(&bezier);
  2498.     }
  2499.    
  2500.     void
  2501.     AddQuadraticBezier(
  2502.         CONST D2D1_QUADRATIC_BEZIER_SEGMENT &bezier
  2503.         )
  2504.     {
  2505.         AddQuadraticBezier(&bezier);
  2506.     }
  2507.    
  2508.     void
  2509.     AddArc(
  2510.         CONST D2D1_ARC_SEGMENT &arc
  2511.         )
  2512.     {
  2513.         AddArc(&arc);
  2514.     }
  2515. }; // interface ID2D1GeometrySink
  2516.  
  2517.  
  2518.  
  2519. //+-----------------------------------------------------------------------------
  2520. //
  2521. //  Interface:
  2522. //      ID2D1TessellationSink
  2523. //
  2524. //------------------------------------------------------------------------------
  2525. interface D2D1_DECLARE_INTERFACE("2cd906c1-12e2-11dc-9fed-001143a055f9") ID2D1TessellationSink  : public IUnknown
  2526. {
  2527.    
  2528.     STDMETHOD_(void, AddTriangles)(
  2529.         __in_ecount(trianglesCount) CONST D2D1_TRIANGLE *triangles,
  2530.         UINT trianglesCount
  2531.         ) PURE;
  2532.    
  2533.     STDMETHOD(Close)(
  2534.         ) PURE;
  2535. }; // interface ID2D1TessellationSink
  2536.  
  2537.  
  2538.  
  2539. //+-----------------------------------------------------------------------------
  2540. //
  2541. //  Interface:
  2542. //      ID2D1PathGeometry
  2543. //
  2544. //------------------------------------------------------------------------------
  2545. interface D2D1_DECLARE_INTERFACE("2cd906a5-12e2-11dc-9fed-001143a055f9") ID2D1PathGeometry  : public ID2D1Geometry
  2546. {
  2547.    
  2548.    
  2549.     //
  2550.     // Opens a geometry sink that will be used to create this path geometry.
  2551.     //
  2552.     STDMETHOD(Open)(
  2553.         __deref_out ID2D1GeometrySink **geometrySink
  2554.         ) PURE;
  2555.    
  2556.    
  2557.     //
  2558.     // Retrieve the contents of this geometry. The caller passes an implementation of a
  2559.     // ID2D1GeometrySink interface to receive the data.
  2560.     //
  2561.     STDMETHOD(Stream)(
  2562.         __in ID2D1GeometrySink *geometrySink
  2563.         ) CONST PURE;
  2564.    
  2565.     STDMETHOD(GetSegmentCount)(
  2566.         __out UINT32 *count
  2567.         ) CONST PURE;
  2568.    
  2569.     STDMETHOD(GetFigureCount)(
  2570.         __out UINT32 *count
  2571.         ) CONST PURE;
  2572. }; // interface ID2D1PathGeometry
  2573.  
  2574.  
  2575.  
  2576. //+-----------------------------------------------------------------------------
  2577. //
  2578. //  Interface:
  2579. //      ID2D1Mesh
  2580. //
  2581. //------------------------------------------------------------------------------
  2582. interface D2D1_DECLARE_INTERFACE("2cd906c2-12e2-11dc-9fed-001143a055f9") ID2D1Mesh  : public ID2D1Resource
  2583. {
  2584.    
  2585.    
  2586.     //
  2587.     // Opens the mesh for population.
  2588.     //
  2589.     STDMETHOD(Open)(
  2590.         __deref_out ID2D1TessellationSink **tessellationSink
  2591.         ) PURE;
  2592. }; // interface ID2D1Mesh
  2593.  
  2594.  
  2595.  
  2596. //+-----------------------------------------------------------------------------
  2597. //
  2598. //  Interface:
  2599. //      ID2D1Layer
  2600. //
  2601. //------------------------------------------------------------------------------
  2602. interface D2D1_DECLARE_INTERFACE("2cd9069b-12e2-11dc-9fed-001143a055f9") ID2D1Layer  : public ID2D1Resource
  2603. {
  2604.    
  2605.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  2606.         ) CONST PURE;
  2607. }; // interface ID2D1Layer
  2608.  
  2609.  
  2610.  
  2611. //+-----------------------------------------------------------------------------
  2612. //
  2613. //  Interface:
  2614. //      ID2D1DrawingStateBlock
  2615. //
  2616. //------------------------------------------------------------------------------
  2617. interface D2D1_DECLARE_INTERFACE("28506e39-ebf6-46a1-bb47-fd85565ab957") ID2D1DrawingStateBlock  : public ID2D1Resource
  2618. {
  2619.    
  2620.    
  2621.     //
  2622.     // Retrieves the state currently contained within this state block resource.
  2623.     //
  2624.     STDMETHOD_(void, GetDescription)(
  2625.         __out D2D1_DRAWING_STATE_DESCRIPTION *stateDescription
  2626.         ) CONST PURE;
  2627.    
  2628.    
  2629.     //
  2630.     // Sets the state description of this state block resource.
  2631.     //
  2632.     STDMETHOD_(void, SetDescription)(
  2633.         __in CONST D2D1_DRAWING_STATE_DESCRIPTION *stateDescription
  2634.         ) PURE;
  2635.    
  2636.    
  2637.     //
  2638.     // Sets the text rendering parameters of this state block resource.
  2639.     //
  2640.     STDMETHOD_(void, SetTextRenderingParams)(
  2641.         __in_opt IDWriteRenderingParams *textRenderingParams = NULL
  2642.         ) PURE;
  2643.    
  2644.    
  2645.     //
  2646.     // Retrieves the text rendering parameters contained within this state block
  2647.     // resource. If a NULL text rendering parameter was specified, NULL will be
  2648.     // returned.
  2649.     //
  2650.     STDMETHOD_(void, GetTextRenderingParams)(
  2651.         __deref_out_opt IDWriteRenderingParams **textRenderingParams
  2652.         ) CONST PURE;
  2653.    
  2654.     void
  2655.     SetDescription(
  2656.         CONST D2D1_DRAWING_STATE_DESCRIPTION &stateDescription
  2657.         )
  2658.     {
  2659.         SetDescription(&stateDescription);
  2660.     }
  2661. }; // interface ID2D1DrawingStateBlock
  2662.  
  2663.  
  2664.  
  2665. //+-----------------------------------------------------------------------------
  2666. //
  2667. //  Interface:
  2668. //      ID2D1RenderTarget
  2669. //
  2670. //------------------------------------------------------------------------------
  2671. interface D2D1_DECLARE_INTERFACE("2cd90694-12e2-11dc-9fed-001143a055f9") ID2D1RenderTarget  : public ID2D1Resource
  2672. {
  2673.    
  2674.    
  2675.     //
  2676.     // Create a D2D bitmap by copying from memory, or create uninitialized.
  2677.     //
  2678.     STDMETHOD(CreateBitmap)(
  2679.         D2D1_SIZE_U size,
  2680.         __in_opt CONST void *srcData,
  2681.         UINT32 pitch,
  2682.         __in CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  2683.         __deref_out ID2D1Bitmap **bitmap
  2684.         ) PURE;
  2685.    
  2686.    
  2687.     //
  2688.     // Create a D2D bitmap by copying a WIC bitmap.
  2689.     //
  2690.     STDMETHOD(CreateBitmapFromWicBitmap)(
  2691.         __in IWICBitmapSource *wicBitmapSource,
  2692.         __in_opt CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  2693.         __deref_out ID2D1Bitmap **bitmap
  2694.         ) PURE;
  2695.    
  2696.    
  2697.     //
  2698.     // Create a D2D bitmap by sharing bits from another resource. The bitmap must be
  2699.     // compatible with the render target for the call to succeed.
  2700.     // For example, an IWICBitmap can be shared with a software target, or a DXGI
  2701.     // surface can be shared with a DXGI render target.
  2702.     //
  2703.     STDMETHOD(CreateSharedBitmap)(
  2704.         __in REFIID riid,
  2705.         __inout void *data,
  2706.         __in_opt CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  2707.         __deref_out ID2D1Bitmap **bitmap
  2708.         ) PURE;
  2709.    
  2710.    
  2711.     //
  2712.     // Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill
  2713.     // or pen a geometry.
  2714.     //
  2715.     STDMETHOD(CreateBitmapBrush)(
  2716.         __in ID2D1Bitmap *bitmap,
  2717.         __in_opt CONST D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties,
  2718.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  2719.         __deref_out ID2D1BitmapBrush **bitmapBrush
  2720.         ) PURE;
  2721.    
  2722.     STDMETHOD(CreateSolidColorBrush)(
  2723.         __in CONST D2D1_COLOR_F *color,
  2724.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  2725.         __deref_out ID2D1SolidColorBrush **solidColorBrush
  2726.         ) PURE;
  2727.    
  2728.    
  2729.     //
  2730.     // A gradient stop collection represents a set of stops in an ideal unit length.
  2731.     // This is the source resource for a linear gradient and radial gradient brush.
  2732.     //
  2733.     STDMETHOD(CreateGradientStopCollection)(
  2734.         __in_ecount(gradientStopsCount) CONST D2D1_GRADIENT_STOP *gradientStops,
  2735.         __range(>=,1) UINT gradientStopsCount,
  2736.        
  2737.         //
  2738.         // Specifies which space the color interpolation occurs in.
  2739.         //
  2740.         D2D1_GAMMA colorInterpolationGamma,
  2741.        
  2742.         //
  2743.         // Specifies how the gradient will be extended outside of the unit length.
  2744.         //
  2745.         D2D1_EXTEND_MODE extendMode,
  2746.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  2747.         ) PURE;
  2748.    
  2749.     STDMETHOD(CreateLinearGradientBrush)(
  2750.         __in CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties,
  2751.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  2752.         __in ID2D1GradientStopCollection *gradientStopCollection,
  2753.         __deref_out ID2D1LinearGradientBrush **linearGradientBrush
  2754.         ) PURE;
  2755.    
  2756.     STDMETHOD(CreateRadialGradientBrush)(
  2757.         __in CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties,
  2758.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  2759.         __in ID2D1GradientStopCollection *gradientStopCollection,
  2760.         __deref_out ID2D1RadialGradientBrush **radialGradientBrush
  2761.         ) PURE;
  2762.    
  2763.    
  2764.     //
  2765.     // Creates a bitmap render target whose bitmap can be used as a source for
  2766.     // rendering in the API.
  2767.     //
  2768.     STDMETHOD(CreateCompatibleRenderTarget)(
  2769.        
  2770.         //
  2771.         // The requested size of the target in DIPs. If the pixel size is not specified,
  2772.         // the DPI is inherited from the parent target. However, the render target will
  2773.         // never contain a fractional number of pixels.
  2774.         //
  2775.         __in_opt CONST D2D1_SIZE_F *desiredSize,
  2776.        
  2777.         //
  2778.         // The requested size of the render target in pixels. If the DIP size is also
  2779.         // specified, the DPI is calculated from these two values. If the desired size is
  2780.         // not specified, the DPI is inherited from the parent render target. If neither
  2781.         // value is specified, the compatible render target will be the same size and have
  2782.         // the same DPI as the parent target.
  2783.         //
  2784.         __in_opt CONST D2D1_SIZE_U *desiredPixelSize,
  2785.        
  2786.         //
  2787.         // The desired pixel format. The format must be compatible with the parent render
  2788.         // target type. If the format is not specified, it will be inherited from the
  2789.         // parent render target.
  2790.         //
  2791.         __in_opt CONST D2D1_PIXEL_FORMAT *desiredFormat,
  2792.        
  2793.         //
  2794.         // Allows the caller to retrieve a GDI compatible render target.
  2795.         //
  2796.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
  2797.        
  2798.         //
  2799.         // The returned bitmap render target.
  2800.         //
  2801.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  2802.         ) PURE;
  2803.    
  2804.    
  2805.     //
  2806.     // Creates a layer resource that can be used on any target and which will resize
  2807.     // under the covers if necessary.
  2808.     //
  2809.     STDMETHOD(CreateLayer)(
  2810.        
  2811.         //
  2812.         // The resolution independent minimum size hint for the layer resource. Specify
  2813.         // this to prevent unwanted reallocation of the layer backing store. The size is in
  2814.         // DIPs, but, it is unaffected by the current world transform. If the size is
  2815.         // unspecified, the returned resource is a placeholder and the backing store will
  2816.         // be allocated to be the minimum size that can hold the content when the layer is
  2817.         // pushed.
  2818.         //
  2819.         __in_opt CONST D2D1_SIZE_F *size,
  2820.         __deref_out ID2D1Layer **layer
  2821.         ) PURE;
  2822.    
  2823.    
  2824.     //
  2825.     // Create a D2D mesh.
  2826.     //
  2827.     STDMETHOD(CreateMesh)(
  2828.         __deref_out ID2D1Mesh **mesh
  2829.         ) PURE;
  2830.    
  2831.     STDMETHOD_(void, DrawLine)(
  2832.         D2D1_POINT_2F point0,
  2833.         D2D1_POINT_2F point1,
  2834.         __in ID2D1Brush *brush,
  2835.         FLOAT strokeWidth = 1.0f,
  2836.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  2837.         ) PURE;
  2838.    
  2839.     STDMETHOD_(void, DrawRectangle)(
  2840.         __in CONST D2D1_RECT_F *rect,
  2841.         __in ID2D1Brush *brush,
  2842.         FLOAT strokeWidth = 1.0f,
  2843.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  2844.         ) PURE;
  2845.    
  2846.     STDMETHOD_(void, FillRectangle)(
  2847.         __in CONST D2D1_RECT_F *rect,
  2848.         __in ID2D1Brush *brush
  2849.         ) PURE;
  2850.    
  2851.     STDMETHOD_(void, DrawRoundedRectangle)(
  2852.         __in CONST D2D1_ROUNDED_RECT *roundedRect,
  2853.         __in ID2D1Brush *brush,
  2854.         FLOAT strokeWidth = 1.0f,
  2855.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  2856.         ) PURE;
  2857.    
  2858.     STDMETHOD_(void, FillRoundedRectangle)(
  2859.         __in CONST D2D1_ROUNDED_RECT *roundedRect,
  2860.         __in ID2D1Brush *brush
  2861.         ) PURE;
  2862.    
  2863.     STDMETHOD_(void, DrawEllipse)(
  2864.         __in CONST D2D1_ELLIPSE *ellipse,
  2865.         __in ID2D1Brush *brush,
  2866.         FLOAT strokeWidth = 1.0f,
  2867.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  2868.         ) PURE;
  2869.    
  2870.     STDMETHOD_(void, FillEllipse)(
  2871.         __in CONST D2D1_ELLIPSE *ellipse,
  2872.         __in ID2D1Brush *brush
  2873.         ) PURE;
  2874.    
  2875.     STDMETHOD_(void, DrawGeometry)(
  2876.         __in ID2D1Geometry *geometry,
  2877.         __in ID2D1Brush *brush,
  2878.         FLOAT strokeWidth = 1.0f,
  2879.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  2880.         ) PURE;
  2881.    
  2882.     STDMETHOD_(void, FillGeometry)(
  2883.         __in ID2D1Geometry *geometry,
  2884.         __in ID2D1Brush *brush,
  2885.        
  2886.         //
  2887.         // An optionally specified opacity brush. Only the alpha channel of the
  2888.         // corresponding brush will be sampled and will be applied to the entire fill of
  2889.         // the geometry. If this brush is specified, the fill brush must be a bitmap brush
  2890.         // with an extend mode of D2D1_EXTEND_MODE_CLAMP.
  2891.         //
  2892.         __in_opt ID2D1Brush *opacityBrush = NULL
  2893.         ) PURE;
  2894.    
  2895.    
  2896.     //
  2897.     // Fill a mesh. Since meshes can only render aliased content, the render target
  2898.     // antialiasing mode must be set to aliased.
  2899.     //
  2900.     STDMETHOD_(void, FillMesh)(
  2901.         __in ID2D1Mesh *mesh,
  2902.         __in ID2D1Brush *brush
  2903.         ) PURE;
  2904.    
  2905.    
  2906.     //
  2907.     // Fill using the opacity channel of the supplied bitmap as a mask. The alpha
  2908.     // channel of the bitmap is used to represent the coverage of the geometry at each
  2909.     // pixel, and this is filled appropriately with the brush. The render target
  2910.     // antialiasing mode must be set to aliased.
  2911.     //
  2912.     STDMETHOD_(void, FillOpacityMask)(
  2913.         __in ID2D1Bitmap *opacityMask,
  2914.         __in ID2D1Brush *brush,
  2915.         D2D1_OPACITY_MASK_CONTENT content,
  2916.         __in_opt CONST D2D1_RECT_F *destinationRectangle = NULL,
  2917.         __in_opt CONST D2D1_RECT_F *sourceRectangle = NULL
  2918.         ) PURE;
  2919.    
  2920.     STDMETHOD_(void, DrawBitmap)(
  2921.         __in ID2D1Bitmap *bitmap,
  2922.         __in_opt CONST D2D1_RECT_F *destinationRectangle = NULL,
  2923.         FLOAT opacity = 1.0f,
  2924.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
  2925.         __in_opt CONST D2D1_RECT_F *sourceRectangle = NULL
  2926.         ) PURE;
  2927.    
  2928.    
  2929.     //
  2930.     // Draws the text within the given layout rectangle and by default also snaps and
  2931.     // clips it to the content bounds.
  2932.     //
  2933.     STDMETHOD_(void, DrawText)(
  2934.         __in_ecount(stringLength) CONST WCHAR *string,
  2935.         UINT stringLength,
  2936.         __in IDWriteTextFormat *textFormat,
  2937.         __in CONST D2D1_RECT_F *layoutRect,
  2938.         __in ID2D1Brush *defaultForegroundBrush,
  2939.         D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE,
  2940.         DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL
  2941.         ) PURE;
  2942.    
  2943.    
  2944.     //
  2945.     // Draw a snapped text layout object. Since the layout is not subsequently changed,
  2946.     // this can be more effecient than DrawText when drawing the same layout
  2947.     // repeatedly.
  2948.     //
  2949.     STDMETHOD_(void, DrawTextLayout)(
  2950.         D2D1_POINT_2F origin,
  2951.         __in IDWriteTextLayout *textLayout,
  2952.         __in ID2D1Brush *defaultForegroundBrush,
  2953.        
  2954.         //
  2955.         // The specified text options. NOTE: By default the text is clipped to the layout
  2956.         // bounds. This is derived from the origin and the layout bounds of the
  2957.         // corresponding IDWriteTextLayout object.
  2958.         //
  2959.         D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE
  2960.         ) PURE;
  2961.    
  2962.     STDMETHOD_(void, DrawGlyphRun)(
  2963.         D2D1_POINT_2F baselineOrigin,
  2964.         __in CONST DWRITE_GLYPH_RUN *glyphRun,
  2965.         __in ID2D1Brush *foregroundBrush,
  2966.         DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL
  2967.         ) PURE;
  2968.    
  2969.     STDMETHOD_(void, SetTransform)(
  2970.         __in CONST D2D1_MATRIX_3X2_F *transform
  2971.         ) PURE;
  2972.    
  2973.     STDMETHOD_(void, GetTransform)(
  2974.         __out D2D1_MATRIX_3X2_F *transform
  2975.         ) CONST PURE;
  2976.    
  2977.     STDMETHOD_(void, SetAntialiasMode)(
  2978.         D2D1_ANTIALIAS_MODE antialiasMode
  2979.         ) PURE;
  2980.    
  2981.     STDMETHOD_(D2D1_ANTIALIAS_MODE, GetAntialiasMode)(
  2982.         ) CONST PURE;
  2983.    
  2984.     STDMETHOD_(void, SetTextAntialiasMode)(
  2985.         D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode
  2986.         ) PURE;
  2987.    
  2988.     STDMETHOD_(D2D1_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)(
  2989.         ) CONST PURE;
  2990.    
  2991.     STDMETHOD_(void, SetTextRenderingParams)(
  2992.         __in_opt IDWriteRenderingParams *textRenderingParams = NULL
  2993.         ) PURE;
  2994.    
  2995.    
  2996.     //
  2997.     // Retrieve the text render parameters. NOTE: If NULL is specified to
  2998.     // SetTextRenderingParameters, NULL will be returned.
  2999.     //
  3000.     STDMETHOD_(void, GetTextRenderingParams)(
  3001.         __deref_out_opt IDWriteRenderingParams **textRenderingParams
  3002.         ) CONST PURE;
  3003.    
  3004.    
  3005.     //
  3006.     // Set a tag to correspond to the succeeding primitives. If an error occurs
  3007.     // rendering a primtive, the tags can be returned from the Flush or EndDraw call.
  3008.     //
  3009.     STDMETHOD_(void, SetTags)(
  3010.         D2D1_TAG tag1,
  3011.         D2D1_TAG tag2
  3012.         ) PURE;
  3013.    
  3014.    
  3015.     //
  3016.     // Retrieves the currently set tags. This does not retrieve the tags corresponding
  3017.     // to any primitive that is in error.
  3018.     //
  3019.     STDMETHOD_(void, GetTags)(
  3020.         __out_opt D2D1_TAG *tag1 = NULL,
  3021.         __out_opt D2D1_TAG *tag2 = NULL
  3022.         ) CONST PURE;
  3023.    
  3024.    
  3025.     //
  3026.     // Start a layer of drawing calls. The way in which the layer must be resolved is
  3027.     // specified first as well as the logical resource that stores the layer
  3028.     // parameters. The supplied layer resource might grow if the specified content
  3029.     // cannot fit inside it. The layer will grow monitonically on each axis.
  3030.     //
  3031.     STDMETHOD_(void, PushLayer)(
  3032.         __in CONST D2D1_LAYER_PARAMETERS *layerParameters,
  3033.         __in ID2D1Layer *layer
  3034.         ) PURE;
  3035.    
  3036.    
  3037.     //
  3038.     // Ends a layer that was defined with particular layer resources.
  3039.     //
  3040.     STDMETHOD_(void, PopLayer)(
  3041.         ) PURE;
  3042.    
  3043.     STDMETHOD(Flush)(
  3044.         __out_opt D2D1_TAG *tag1 = NULL,
  3045.         __out_opt D2D1_TAG *tag2 = NULL
  3046.         ) PURE;
  3047.    
  3048.    
  3049.     //
  3050.     // Gets the current drawing state and saves it into the supplied
  3051.     // IDrawingStatckBlock.
  3052.     //
  3053.     STDMETHOD_(void, SaveDrawingState)(
  3054.         __inout ID2D1DrawingStateBlock *drawingStateBlock
  3055.         ) CONST PURE;
  3056.    
  3057.    
  3058.     //
  3059.     // Copies the state stored in the block interface.
  3060.     //
  3061.     STDMETHOD_(void, RestoreDrawingState)(
  3062.         __in ID2D1DrawingStateBlock *drawingStateBlock
  3063.         ) PURE;
  3064.    
  3065.    
  3066.     //
  3067.     // Pushes a clip. The clip can be antialiased. The clip must be axis aligned. If
  3068.     // the current world transform is not axis preserving, then the bounding box of the
  3069.     // transformed clip rect will be used. The clip will remain in effect until a
  3070.     // PopAxisAligned clip call is made.
  3071.     //
  3072.     STDMETHOD_(void, PushAxisAlignedClip)(
  3073.         __in CONST D2D1_RECT_F *clipRect,
  3074.         D2D1_ANTIALIAS_MODE antialiasMode
  3075.         ) PURE;
  3076.    
  3077.     STDMETHOD_(void, PopAxisAlignedClip)(
  3078.         ) PURE;
  3079.    
  3080.     STDMETHOD_(void, Clear)(
  3081.         __in_opt CONST D2D1_COLOR_F *clearColor = NULL
  3082.         ) PURE;
  3083.    
  3084.    
  3085.     //
  3086.     // Start drawing on this render target. Draw calls can only be issued between a
  3087.     // BeginDraw and EndDraw call.
  3088.     //
  3089.     STDMETHOD_(void, BeginDraw)(
  3090.         ) PURE;
  3091.    
  3092.    
  3093.     //
  3094.     // Ends drawing on the render target, error results can be retrieved at this time,
  3095.     // or when calling flush.
  3096.     //
  3097.     STDMETHOD(EndDraw)(
  3098.         __out_opt D2D1_TAG *tag1 = NULL,
  3099.         __out_opt D2D1_TAG *tag2 = NULL
  3100.         ) PURE;
  3101.    
  3102.     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(
  3103.         ) CONST PURE;
  3104.    
  3105.    
  3106.     //
  3107.     // Sets the DPI on the render target. This results in the render target being
  3108.     // interpretted to a different scale. Neither DPI can be negative. If zero is
  3109.     // specified for both, the system DPI is chosen. If one is zero and the other
  3110.     // unspecified, the DPI is not changed.
  3111.     //
  3112.     STDMETHOD_(void, SetDpi)(
  3113.         FLOAT dpiX,
  3114.         FLOAT dpiY
  3115.         ) PURE;
  3116.    
  3117.    
  3118.     //
  3119.     // Return the current DPI from the target.
  3120.     //
  3121.     STDMETHOD_(void, GetDpi)(
  3122.         __out FLOAT *dpiX,
  3123.         __out FLOAT *dpiY
  3124.         ) CONST PURE;
  3125.    
  3126.    
  3127.     //
  3128.     // Returns the size of the render target in DIPs.
  3129.     //
  3130.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  3131.         ) CONST PURE;
  3132.    
  3133.    
  3134.     //
  3135.     // Returns the size of the render target in pixels.
  3136.     //
  3137.     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(
  3138.         ) CONST PURE;
  3139.    
  3140.    
  3141.     //
  3142.     // Returns the maximum bitmap and render target size that is guaranteed to be
  3143.     // supported by the render target.
  3144.     //
  3145.     STDMETHOD_(UINT32, GetMaximumBitmapSize)(
  3146.         ) CONST PURE;
  3147.    
  3148.    
  3149.     //
  3150.     // Returns true if the given properties are supported by this render target. The
  3151.     // DPI is ignored. NOTE: If the render target type is software, then neither
  3152.     // D2D1_FEATURE_LEVEL_9 nor D2D1_FEATURE_LEVEL_10 will be considered to be
  3153.     // supported.
  3154.     //
  3155.     STDMETHOD_(BOOL, IsSupported)(
  3156.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties
  3157.         ) CONST PURE;
  3158.    
  3159.     HRESULT
  3160.     CreateBitmap(
  3161.         D2D1_SIZE_U size,
  3162.         __in_opt CONST void *srcData,
  3163.         UINT32 pitch,
  3164.         CONST D2D1_BITMAP_PROPERTIES &bitmapProperties,
  3165.         __deref_out ID2D1Bitmap **bitmap
  3166.         )
  3167.     {
  3168.         return CreateBitmap(size, srcData, pitch, &bitmapProperties, bitmap);
  3169.     }
  3170.    
  3171.     HRESULT
  3172.     CreateBitmap(
  3173.         D2D1_SIZE_U size,
  3174.         CONST D2D1_BITMAP_PROPERTIES &bitmapProperties,
  3175.         __deref_out ID2D1Bitmap **bitmap
  3176.         )
  3177.     {
  3178.         return CreateBitmap(size, NULL, 0, &bitmapProperties, bitmap);
  3179.     }
  3180.    
  3181.    
  3182.     //
  3183.     // Create a D2D bitmap by copying a WIC bitmap.
  3184.     //
  3185.     HRESULT
  3186.     CreateBitmapFromWicBitmap(
  3187.         __in IWICBitmapSource *wicBitmapSource,
  3188.         CONST D2D1_BITMAP_PROPERTIES &bitmapProperties,
  3189.         __deref_out ID2D1Bitmap **bitmap
  3190.         )
  3191.     {
  3192.         return CreateBitmapFromWicBitmap(wicBitmapSource, &bitmapProperties, bitmap);
  3193.     }
  3194.    
  3195.    
  3196.     //
  3197.     // Create a D2D bitmap by copying a WIC bitmap.
  3198.     //
  3199.     HRESULT
  3200.     CreateBitmapFromWicBitmap(
  3201.         __in IWICBitmapSource *wicBitmapSource,
  3202.         __deref_out ID2D1Bitmap **bitmap
  3203.         )
  3204.     {
  3205.         return CreateBitmapFromWicBitmap(wicBitmapSource, NULL, bitmap);
  3206.     }
  3207.    
  3208.    
  3209.     //
  3210.     // Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill
  3211.     // or pen a geometry.
  3212.     //
  3213.     HRESULT
  3214.     CreateBitmapBrush(
  3215.         __in ID2D1Bitmap *bitmap,
  3216.         __deref_out ID2D1BitmapBrush **bitmapBrush
  3217.         )
  3218.     {
  3219.         return CreateBitmapBrush(bitmap, NULL, NULL, bitmapBrush);
  3220.     }
  3221.    
  3222.    
  3223.     //
  3224.     // Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill
  3225.     // or pen a geometry.
  3226.     //
  3227.     HRESULT
  3228.     CreateBitmapBrush(
  3229.         __in ID2D1Bitmap *bitmap,
  3230.         CONST D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties,
  3231.         __deref_out ID2D1BitmapBrush **bitmapBrush
  3232.         )
  3233.     {
  3234.         return CreateBitmapBrush(bitmap, &bitmapBrushProperties, NULL, bitmapBrush);
  3235.     }
  3236.    
  3237.    
  3238.     //
  3239.     // Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill
  3240.     // or pen a geometry.
  3241.     //
  3242.     HRESULT
  3243.     CreateBitmapBrush(
  3244.         __in ID2D1Bitmap *bitmap,
  3245.         CONST D2D1_BITMAP_BRUSH_PROPERTIES &bitmapBrushProperties,
  3246.         CONST D2D1_BRUSH_PROPERTIES &brushProperties,
  3247.         __deref_out ID2D1BitmapBrush **bitmapBrush
  3248.         )
  3249.     {
  3250.         return CreateBitmapBrush(bitmap, &bitmapBrushProperties, &brushProperties, bitmapBrush);
  3251.     }
  3252.    
  3253.     HRESULT
  3254.     CreateSolidColorBrush(
  3255.         CONST D2D1_COLOR_F &color,
  3256.         __deref_out ID2D1SolidColorBrush **solidColorBrush
  3257.         )
  3258.     {
  3259.         return CreateSolidColorBrush(&color, NULL, solidColorBrush);
  3260.     }
  3261.    
  3262.     HRESULT
  3263.     CreateSolidColorBrush(
  3264.         CONST D2D1_COLOR_F &color,
  3265.         CONST D2D1_BRUSH_PROPERTIES &brushProperties,
  3266.         __deref_out ID2D1SolidColorBrush **solidColorBrush
  3267.         )
  3268.     {
  3269.         return CreateSolidColorBrush(&color, &brushProperties, solidColorBrush);
  3270.     }
  3271.    
  3272.     HRESULT
  3273.     CreateGradientStopCollection(
  3274.         __in_ecount(gradientStopsCount) CONST D2D1_GRADIENT_STOP *gradientStops,
  3275.         UINT gradientStopsCount,
  3276.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  3277.         )
  3278.     {
  3279.         return CreateGradientStopCollection(gradientStops, gradientStopsCount, D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, gradientStopCollection);
  3280.     }
  3281.    
  3282.     HRESULT
  3283.     CreateLinearGradientBrush(
  3284.         CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties,
  3285.         __in ID2D1GradientStopCollection *gradientStopCollection,
  3286.         __deref_out ID2D1LinearGradientBrush **linearGradientBrush
  3287.         )
  3288.     {
  3289.         return CreateLinearGradientBrush(&linearGradientBrushProperties, NULL, gradientStopCollection, linearGradientBrush);
  3290.     }
  3291.    
  3292.     HRESULT
  3293.     CreateLinearGradientBrush(
  3294.         CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES &linearGradientBrushProperties,
  3295.         CONST D2D1_BRUSH_PROPERTIES &brushProperties,
  3296.         __in ID2D1GradientStopCollection *gradientStopCollection,
  3297.         __deref_out ID2D1LinearGradientBrush **linearGradientBrush
  3298.         )
  3299.     {
  3300.         return CreateLinearGradientBrush(&linearGradientBrushProperties, &brushProperties, gradientStopCollection, linearGradientBrush);
  3301.     }
  3302.    
  3303.     HRESULT
  3304.     CreateRadialGradientBrush(
  3305.         CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties,
  3306.         __in ID2D1GradientStopCollection *gradientStopCollection,
  3307.         __deref_out ID2D1RadialGradientBrush **radialGradientBrush
  3308.         )
  3309.     {
  3310.         return CreateRadialGradientBrush(&radialGradientBrushProperties, NULL, gradientStopCollection, radialGradientBrush);
  3311.     }
  3312.    
  3313.     HRESULT
  3314.     CreateRadialGradientBrush(
  3315.         CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES &radialGradientBrushProperties,
  3316.         CONST D2D1_BRUSH_PROPERTIES &brushProperties,
  3317.         __in ID2D1GradientStopCollection *gradientStopCollection,
  3318.         __deref_out ID2D1RadialGradientBrush **radialGradientBrush
  3319.         )
  3320.     {
  3321.         return CreateRadialGradientBrush(&radialGradientBrushProperties, &brushProperties, gradientStopCollection, radialGradientBrush);
  3322.     }
  3323.    
  3324.     HRESULT
  3325.     CreateCompatibleRenderTarget(
  3326.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  3327.         )
  3328.     {
  3329.         return CreateCompatibleRenderTarget(NULL, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
  3330.     }
  3331.    
  3332.     HRESULT
  3333.     CreateCompatibleRenderTarget(
  3334.         D2D1_SIZE_F desiredSize,
  3335.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  3336.         )
  3337.     {
  3338.         return CreateCompatibleRenderTarget(&desiredSize, NULL, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
  3339.     }
  3340.    
  3341.     HRESULT
  3342.     CreateCompatibleRenderTarget(
  3343.         D2D1_SIZE_F desiredSize,
  3344.         D2D1_SIZE_U desiredPixelSize,
  3345.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  3346.         )
  3347.     {
  3348.         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
  3349.     }
  3350.    
  3351.     HRESULT
  3352.     CreateCompatibleRenderTarget(
  3353.         D2D1_SIZE_F desiredSize,
  3354.         D2D1_SIZE_U desiredPixelSize,
  3355.         D2D1_PIXEL_FORMAT desiredFormat,
  3356.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  3357.         )
  3358.     {
  3359.         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, bitmapRenderTarget);
  3360.     }
  3361.    
  3362.     HRESULT
  3363.     CreateCompatibleRenderTarget(
  3364.         D2D1_SIZE_F desiredSize,
  3365.         D2D1_SIZE_U desiredPixelSize,
  3366.         D2D1_PIXEL_FORMAT desiredFormat,
  3367.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
  3368.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  3369.         )
  3370.     {
  3371.         return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget);
  3372.     }
  3373.    
  3374.     HRESULT
  3375.     CreateLayer(
  3376.         D2D1_SIZE_F size,
  3377.         __deref_out ID2D1Layer **layer
  3378.         )
  3379.     {
  3380.         return CreateLayer(&size, layer);
  3381.     }
  3382.    
  3383.     HRESULT
  3384.     CreateLayer(
  3385.         __deref_out ID2D1Layer **layer
  3386.         )
  3387.     {
  3388.         return CreateLayer(NULL, layer);
  3389.     }
  3390.    
  3391.     void
  3392.     DrawRectangle(
  3393.         CONST D2D1_RECT_F &rect,
  3394.         __in ID2D1Brush *brush,
  3395.         FLOAT strokeWidth = 1.0f,
  3396.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  3397.         )
  3398.     {
  3399.         DrawRectangle(&rect, brush, strokeWidth, strokeStyle);
  3400.     }
  3401.    
  3402.     void
  3403.     FillRectangle(
  3404.         CONST D2D1_RECT_F &rect,
  3405.         __in ID2D1Brush *brush
  3406.         )
  3407.     {
  3408.         FillRectangle(&rect, brush);
  3409.     }
  3410.    
  3411.     void
  3412.     DrawRoundedRectangle(
  3413.         CONST D2D1_ROUNDED_RECT &roundedRect,
  3414.         __in ID2D1Brush *brush,
  3415.         FLOAT strokeWidth = 1.0f,
  3416.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  3417.         )
  3418.     {
  3419.         DrawRoundedRectangle(&roundedRect, brush, strokeWidth, strokeStyle);
  3420.     }
  3421.    
  3422.     void
  3423.     FillRoundedRectangle(
  3424.         CONST D2D1_ROUNDED_RECT &roundedRect,
  3425.         __in ID2D1Brush *brush
  3426.         )
  3427.     {
  3428.         FillRoundedRectangle(&roundedRect, brush);
  3429.     }
  3430.    
  3431.     void
  3432.     DrawEllipse(
  3433.         CONST D2D1_ELLIPSE &ellipse,
  3434.         __in ID2D1Brush *brush,
  3435.         FLOAT strokeWidth = 1.0f,
  3436.         __in_opt ID2D1StrokeStyle *strokeStyle = NULL
  3437.         )
  3438.     {
  3439.         DrawEllipse(&ellipse, brush, strokeWidth, strokeStyle);
  3440.     }
  3441.    
  3442.     void
  3443.     FillEllipse(
  3444.         CONST D2D1_ELLIPSE &ellipse,
  3445.         __in ID2D1Brush *brush
  3446.         )
  3447.     {
  3448.         FillEllipse(&ellipse, brush);
  3449.     }
  3450.    
  3451.     void
  3452.     FillOpacityMask(
  3453.         __in ID2D1Bitmap *opacityMask,
  3454.         __in ID2D1Brush *brush,
  3455.         D2D1_OPACITY_MASK_CONTENT content,
  3456.         CONST D2D1_RECT_F &destinationRectangle,
  3457.         CONST D2D1_RECT_F &sourceRectangle
  3458.         )
  3459.     {
  3460.         FillOpacityMask(opacityMask, brush, content, &destinationRectangle, &sourceRectangle);
  3461.     }
  3462.    
  3463.     void
  3464.     DrawBitmap(
  3465.         __in ID2D1Bitmap *bitmap,
  3466.         CONST D2D1_RECT_F &destinationRectangle,
  3467.         FLOAT opacity = 1.0f,
  3468.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode = D2D1_BITMAP_INTERPOLATION_MODE_LINEAR,
  3469.         __in_opt CONST D2D1_RECT_F *sourceRectangle = NULL
  3470.         )
  3471.     {
  3472.         DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, sourceRectangle);
  3473.     }
  3474.    
  3475.     void
  3476.     DrawBitmap(
  3477.         __in ID2D1Bitmap *bitmap,
  3478.         CONST D2D1_RECT_F &destinationRectangle,
  3479.         FLOAT opacity,
  3480.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,
  3481.         CONST D2D1_RECT_F &sourceRectangle
  3482.         )
  3483.     {
  3484.         DrawBitmap(bitmap, &destinationRectangle, opacity, interpolationMode, &sourceRectangle);
  3485.     }
  3486.    
  3487.     void
  3488.     SetTransform(
  3489.         CONST D2D1_MATRIX_3X2_F &transform
  3490.         )
  3491.     {
  3492.         SetTransform(&transform);
  3493.     }
  3494.    
  3495.     void
  3496.     PushLayer(
  3497.         CONST D2D1_LAYER_PARAMETERS &layerParameters,
  3498.         __in ID2D1Layer *layer
  3499.         )
  3500.     {
  3501.         PushLayer(&layerParameters, layer);
  3502.     }
  3503.    
  3504.     void
  3505.     PushAxisAlignedClip(
  3506.         CONST D2D1_RECT_F &clipRect,
  3507.         D2D1_ANTIALIAS_MODE antialiasMode
  3508.         )
  3509.     {
  3510.         return PushAxisAlignedClip(&clipRect, antialiasMode);
  3511.     }
  3512.    
  3513.     void
  3514.     Clear(
  3515.         CONST D2D1_COLOR_F &clearColor
  3516.         )
  3517.     {
  3518.         return Clear(&clearColor);
  3519.     }
  3520.    
  3521.    
  3522.     //
  3523.     // Draws the text within the given layout rectangle and by default also snaps and
  3524.     // clips it.
  3525.     //
  3526.     void
  3527.     DrawText(
  3528.         __in_ecount(stringLength) CONST WCHAR *string,
  3529.         UINT stringLength,
  3530.         __in IDWriteTextFormat *textFormat,
  3531.         CONST D2D1_RECT_F &layoutRect,
  3532.         __in ID2D1Brush *defaultForegroundBrush,
  3533.         D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE,
  3534.         DWRITE_MEASURING_MODE measuringMode = DWRITE_MEASURING_MODE_NATURAL
  3535.         )
  3536.     {
  3537.         return DrawText(string, stringLength, textFormat, &layoutRect, defaultForegroundBrush, options, measuringMode);
  3538.     }
  3539.    
  3540.     BOOL
  3541.     IsSupported(
  3542.         CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties
  3543.         ) CONST
  3544.     {
  3545.         return IsSupported(&renderTargetProperties);
  3546.     }
  3547. }; // interface ID2D1RenderTarget
  3548.  
  3549.  
  3550.  
  3551. //+-----------------------------------------------------------------------------
  3552. //
  3553. //  Interface:
  3554. //      ID2D1BitmapRenderTarget
  3555. //
  3556. //------------------------------------------------------------------------------
  3557. interface D2D1_DECLARE_INTERFACE("2cd90695-12e2-11dc-9fed-001143a055f9") ID2D1BitmapRenderTarget  : public ID2D1RenderTarget
  3558. {
  3559.    
  3560.     STDMETHOD(GetBitmap)(
  3561.         __deref_out ID2D1Bitmap **bitmap
  3562.         ) PURE;
  3563. }; // interface ID2D1BitmapRenderTarget
  3564.  
  3565.  
  3566.  
  3567. //+-----------------------------------------------------------------------------
  3568. //
  3569. //  Interface:
  3570. //      ID2D1HwndRenderTarget
  3571. //
  3572. //------------------------------------------------------------------------------
  3573. interface D2D1_DECLARE_INTERFACE("2cd90698-12e2-11dc-9fed-001143a055f9") ID2D1HwndRenderTarget  : public ID2D1RenderTarget
  3574. {
  3575.    
  3576.     STDMETHOD_(D2D1_WINDOW_STATE, CheckWindowState)(
  3577.         ) PURE;
  3578.    
  3579.    
  3580.     //
  3581.     // Resize the buffer underlying the render target. This operation might fail if
  3582.     // there is insufficent video memory or system memory, or if the render target is
  3583.     // resized beyond the maximum bitmap size. If the method fails, the render target
  3584.     // will be placed in a zombie state and D2DERR_RECREATE_TARGET will be returned
  3585.     // from it when EndDraw is called. In addition an appropriate failure result will
  3586.     // be returned from Resize.
  3587.     //
  3588.     STDMETHOD(Resize)(
  3589.         __in CONST D2D1_SIZE_U *pixelSize
  3590.         ) PURE;
  3591.    
  3592.     STDMETHOD_(HWND, GetHwnd)(
  3593.         ) CONST PURE;
  3594.    
  3595.     HRESULT
  3596.     Resize(
  3597.         CONST D2D1_SIZE_U &pixelSize
  3598.         )
  3599.     {
  3600.         return Resize(&pixelSize);
  3601.     }
  3602. }; // interface ID2D1HwndRenderTarget
  3603.  
  3604.  
  3605.  
  3606. //+-----------------------------------------------------------------------------
  3607. //
  3608. //  Interface:
  3609. //      ID2D1GdiInteropRenderTarget
  3610. //
  3611. //------------------------------------------------------------------------------
  3612. interface D2D1_DECLARE_INTERFACE("e0db51c3-6f77-4bae-b3d5-e47509b35838") ID2D1GdiInteropRenderTarget  : public IUnknown
  3613. {
  3614.    
  3615.     STDMETHOD(GetDC)(
  3616.         D2D1_DC_INITIALIZE_MODE mode,
  3617.         __out HDC *hdc
  3618.         ) PURE;
  3619.    
  3620.     STDMETHOD(ReleaseDC)(
  3621.         __in_opt CONST RECT *update
  3622.         ) PURE;
  3623. }; // interface ID2D1GdiInteropRenderTarget
  3624.  
  3625.  
  3626.  
  3627. //+-----------------------------------------------------------------------------
  3628. //
  3629. //  Interface:
  3630. //      ID2D1DCRenderTarget
  3631. //
  3632. //------------------------------------------------------------------------------
  3633. interface D2D1_DECLARE_INTERFACE("1c51bc64-de61-46fd-9899-63a5d8f03950") ID2D1DCRenderTarget  : public ID2D1RenderTarget
  3634. {
  3635.    
  3636.     STDMETHOD(BindDC)(
  3637.         __in CONST HDC hDC,
  3638.         __in CONST RECT *pSubRect
  3639.         ) PURE;
  3640. }; // interface ID2D1DCRenderTarget
  3641.  
  3642.  
  3643.  
  3644. //+-----------------------------------------------------------------------------
  3645. //
  3646. //  Interface:
  3647. //      ID2D1Factory
  3648. //
  3649. //  Synopsis:
  3650. //      The root factory interface for all of D2D's objects.
  3651. //
  3652. //------------------------------------------------------------------------------
  3653. interface D2D1_DECLARE_INTERFACE("06152247-6f50-465a-9245-118bfd3b6007") ID2D1Factory  : public IUnknown
  3654. {
  3655.    
  3656.    
  3657.     //
  3658.     // Cause the factory to refresh any system metrics that it might have been snapped
  3659.     // on factory creation.
  3660.     //
  3661.     STDMETHOD(ReloadSystemMetrics)(
  3662.         ) PURE;
  3663.    
  3664.    
  3665.     //
  3666.     // Retrieves the current desktop DPI. To refresh this, call ReloadSystemMetrics.
  3667.     //
  3668.     STDMETHOD_(void, GetDesktopDpi)(
  3669.         __out FLOAT *dpiX,
  3670.         __out FLOAT *dpiY
  3671.         ) PURE;
  3672.    
  3673.     STDMETHOD(CreateRectangleGeometry)(
  3674.         __in CONST D2D1_RECT_F *rectangle,
  3675.         __deref_out ID2D1RectangleGeometry **rectangleGeometry
  3676.         ) PURE;
  3677.    
  3678.     STDMETHOD(CreateRoundedRectangleGeometry)(
  3679.         __in CONST D2D1_ROUNDED_RECT *roundedRectangle,
  3680.         __deref_out ID2D1RoundedRectangleGeometry **roundedRectangleGeometry
  3681.         ) PURE;
  3682.    
  3683.     STDMETHOD(CreateEllipseGeometry)(
  3684.         __in CONST D2D1_ELLIPSE *ellipse,
  3685.         __deref_out ID2D1EllipseGeometry **ellipseGeometry
  3686.         ) PURE;
  3687.    
  3688.    
  3689.     //
  3690.     // Create a geometry which holds other geometries.
  3691.     //
  3692.     STDMETHOD(CreateGeometryGroup)(
  3693.         D2D1_FILL_MODE fillMode,
  3694.         __in_ecount(geometriesCount) ID2D1Geometry **geometries,
  3695.         UINT geometriesCount,
  3696.         __deref_out ID2D1GeometryGroup **geometryGroup
  3697.         ) PURE;
  3698.    
  3699.     STDMETHOD(CreateTransformedGeometry)(
  3700.         __in ID2D1Geometry *sourceGeometry,
  3701.         __in CONST D2D1_MATRIX_3X2_F *transform,
  3702.         __deref_out ID2D1TransformedGeometry **transformedGeometry
  3703.         ) PURE;
  3704.    
  3705.    
  3706.     //
  3707.     // Returns an initially empty path geometry interface. A geometry sink is created
  3708.     // off the interface to populate it.
  3709.     //
  3710.     STDMETHOD(CreatePathGeometry)(
  3711.         __deref_out ID2D1PathGeometry **pathGeometry
  3712.         ) PURE;
  3713.    
  3714.    
  3715.     //
  3716.     // Allows a non-default stroke style to be specified for a given geometry at draw
  3717.     // time.
  3718.     //
  3719.     STDMETHOD(CreateStrokeStyle)(
  3720.         __in CONST D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties,
  3721.         __in_ecount_opt(dashesCount) CONST FLOAT *dashes,
  3722.         UINT dashesCount,
  3723.         __deref_out ID2D1StrokeStyle **strokeStyle
  3724.         ) PURE;
  3725.    
  3726.    
  3727.     //
  3728.     // Creates a new drawing state block, this can be used in subsequent
  3729.     // SaveDrawingState and RestoreDrawingState operations on the render target.
  3730.     //
  3731.     STDMETHOD(CreateDrawingStateBlock)(
  3732.         __in_opt CONST D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription,
  3733.         __in_opt IDWriteRenderingParams *textRenderingParams,
  3734.         __deref_out ID2D1DrawingStateBlock **drawingStateBlock
  3735.         ) PURE;
  3736.    
  3737.    
  3738.     //
  3739.     // Creates a render target which is a source of bitmaps.
  3740.     //
  3741.     STDMETHOD(CreateWicBitmapRenderTarget)(
  3742.         __in IWICBitmap *target,
  3743.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  3744.         __deref_out ID2D1RenderTarget **renderTarget
  3745.         ) PURE;
  3746.    
  3747.    
  3748.     //
  3749.     // Creates a render target that appears on the display.
  3750.     //
  3751.     STDMETHOD(CreateHwndRenderTarget)(
  3752.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  3753.         __in CONST D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties,
  3754.         __deref_out ID2D1HwndRenderTarget **hwndRenderTarget
  3755.         ) PURE;
  3756.    
  3757.    
  3758.     //
  3759.     // Creates a render target that draws to a DXGI Surface. The device that owns the
  3760.     // surface is used for rendering.
  3761.     //
  3762.     STDMETHOD(CreateDxgiSurfaceRenderTarget)(
  3763.         __in IDXGISurface *dxgiSurface,
  3764.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  3765.         __deref_out ID2D1RenderTarget **renderTarget
  3766.         ) PURE;
  3767.    
  3768.    
  3769.     //
  3770.     // Creates a render target that draws to a GDI device context.
  3771.     //
  3772.     STDMETHOD(CreateDCRenderTarget)(
  3773.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  3774.         __deref_out ID2D1DCRenderTarget **dcRenderTarget
  3775.         ) PURE;
  3776.    
  3777.     HRESULT
  3778.     CreateRectangleGeometry(
  3779.         CONST D2D1_RECT_F &rectangle,
  3780.         __deref_out ID2D1RectangleGeometry **rectangleGeometry
  3781.         )
  3782.     {
  3783.         return CreateRectangleGeometry(&rectangle, rectangleGeometry);
  3784.     }
  3785.    
  3786.     HRESULT
  3787.     CreateRoundedRectangleGeometry(
  3788.         CONST D2D1_ROUNDED_RECT &roundedRectangle,
  3789.         __deref_out ID2D1RoundedRectangleGeometry **roundedRectangleGeometry
  3790.         )
  3791.     {
  3792.         return CreateRoundedRectangleGeometry(&roundedRectangle, roundedRectangleGeometry);
  3793.     }
  3794.    
  3795.     HRESULT
  3796.     CreateEllipseGeometry(
  3797.         CONST D2D1_ELLIPSE &ellipse,
  3798.         __deref_out ID2D1EllipseGeometry **ellipseGeometry
  3799.         )
  3800.     {
  3801.         return CreateEllipseGeometry(&ellipse, ellipseGeometry);
  3802.     }
  3803.    
  3804.     HRESULT
  3805.     CreateTransformedGeometry(
  3806.         __in ID2D1Geometry *sourceGeometry,
  3807.         CONST D2D1_MATRIX_3X2_F &transform,
  3808.         __deref_out ID2D1TransformedGeometry **transformedGeometry
  3809.         )
  3810.     {
  3811.         return CreateTransformedGeometry(sourceGeometry, &transform, transformedGeometry);
  3812.     }
  3813.    
  3814.     HRESULT
  3815.     CreateStrokeStyle(
  3816.         CONST D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties,
  3817.         __in_ecount(dashesCount) CONST FLOAT *dashes,
  3818.         UINT dashesCount,
  3819.         __deref_out ID2D1StrokeStyle **strokeStyle
  3820.         )
  3821.     {
  3822.         return CreateStrokeStyle(&strokeStyleProperties, dashes, dashesCount, strokeStyle);
  3823.     }
  3824.    
  3825.     HRESULT
  3826.     CreateDrawingStateBlock(
  3827.         CONST D2D1_DRAWING_STATE_DESCRIPTION &drawingStateDescription,
  3828.         __deref_out ID2D1DrawingStateBlock **drawingStateBlock
  3829.         )
  3830.     {
  3831.         return CreateDrawingStateBlock(&drawingStateDescription, NULL, drawingStateBlock);
  3832.     }
  3833.    
  3834.     HRESULT
  3835.     CreateDrawingStateBlock(
  3836.         __deref_out ID2D1DrawingStateBlock **drawingStateBlock
  3837.         )
  3838.     {
  3839.         return CreateDrawingStateBlock(NULL, NULL, drawingStateBlock);
  3840.     }
  3841.    
  3842.     HRESULT
  3843.     CreateWicBitmapRenderTarget(
  3844.         __in IWICBitmap *target,
  3845.         CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties,
  3846.         __deref_out ID2D1RenderTarget **renderTarget
  3847.         )
  3848.     {
  3849.         return CreateWicBitmapRenderTarget(target, &renderTargetProperties, renderTarget);
  3850.     }
  3851.    
  3852.     HRESULT
  3853.     CreateHwndRenderTarget(
  3854.         CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties,
  3855.         CONST D2D1_HWND_RENDER_TARGET_PROPERTIES &hwndRenderTargetProperties,
  3856.         __deref_out ID2D1HwndRenderTarget **hwndRenderTarget
  3857.         )
  3858.     {
  3859.         return CreateHwndRenderTarget(&renderTargetProperties, &hwndRenderTargetProperties, hwndRenderTarget);
  3860.     }
  3861.    
  3862.     HRESULT
  3863.     CreateDxgiSurfaceRenderTarget(
  3864.         __in IDXGISurface *dxgiSurface,
  3865.         CONST D2D1_RENDER_TARGET_PROPERTIES &renderTargetProperties,
  3866.         __deref_out ID2D1RenderTarget **renderTarget
  3867.         )
  3868.     {
  3869.         return CreateDxgiSurfaceRenderTarget(dxgiSurface, &renderTargetProperties, renderTarget);
  3870.     }
  3871. }; // interface ID2D1Factory
  3872.  
  3873.  
  3874.  
  3875. #endif
  3876.  
  3877.  
  3878. EXTERN_C CONST IID IID_ID2D1Resource;
  3879. EXTERN_C CONST IID IID_ID2D1Bitmap;
  3880. EXTERN_C CONST IID IID_ID2D1GradientStopCollection;
  3881. EXTERN_C CONST IID IID_ID2D1Brush;
  3882. EXTERN_C CONST IID IID_ID2D1BitmapBrush;
  3883. EXTERN_C CONST IID IID_ID2D1SolidColorBrush;
  3884. EXTERN_C CONST IID IID_ID2D1LinearGradientBrush;
  3885. EXTERN_C CONST IID IID_ID2D1RadialGradientBrush;
  3886. EXTERN_C CONST IID IID_ID2D1StrokeStyle;
  3887. EXTERN_C CONST IID IID_ID2D1Geometry;
  3888. EXTERN_C CONST IID IID_ID2D1RectangleGeometry;
  3889. EXTERN_C CONST IID IID_ID2D1RoundedRectangleGeometry;
  3890. EXTERN_C CONST IID IID_ID2D1EllipseGeometry;
  3891. EXTERN_C CONST IID IID_ID2D1GeometryGroup;
  3892. EXTERN_C CONST IID IID_ID2D1TransformedGeometry;
  3893. EXTERN_C CONST IID IID_ID2D1SimplifiedGeometrySink;
  3894. EXTERN_C CONST IID IID_ID2D1GeometrySink;
  3895. EXTERN_C CONST IID IID_ID2D1TessellationSink;
  3896. EXTERN_C CONST IID IID_ID2D1PathGeometry;
  3897. EXTERN_C CONST IID IID_ID2D1Mesh;
  3898. EXTERN_C CONST IID IID_ID2D1Layer;
  3899. EXTERN_C CONST IID IID_ID2D1DrawingStateBlock;
  3900. EXTERN_C CONST IID IID_ID2D1RenderTarget;
  3901. EXTERN_C CONST IID IID_ID2D1BitmapRenderTarget;
  3902. EXTERN_C CONST IID IID_ID2D1HwndRenderTarget;
  3903. EXTERN_C CONST IID IID_ID2D1GdiInteropRenderTarget;
  3904. EXTERN_C CONST IID IID_ID2D1DCRenderTarget;
  3905. EXTERN_C CONST IID IID_ID2D1Factory;
  3906.  
  3907.  
  3908. #ifdef D2D_USE_C_DEFINITIONS
  3909.  
  3910.  
  3911. typedef interface ID2D1Resource ID2D1Resource;
  3912.  
  3913. typedef struct ID2D1ResourceVtbl
  3914. {
  3915.    
  3916.     IUnknownVtbl Base;
  3917.    
  3918.    
  3919.     STDMETHOD_(void, GetFactory)(
  3920.         ID2D1Resource *This,
  3921.         __deref_out ID2D1Factory **factory
  3922.         ) PURE;
  3923. } ID2D1ResourceVtbl;
  3924.  
  3925. interface ID2D1Resource
  3926. {
  3927.     CONST struct ID2D1ResourceVtbl *lpVtbl;
  3928. };
  3929.  
  3930.  
  3931. #define ID2D1Resource_QueryInterface(This, riid, ppv) \
  3932.     ((This)->lpVtbl->Base.QueryInterface((IUnknown *)This, riid, ppv))
  3933.  
  3934. #define ID2D1Resource_AddRef(This) \
  3935.     ((This)->lpVtbl->Base.AddRef((IUnknown *)This))
  3936.  
  3937. #define ID2D1Resource_Release(This) \
  3938.     ((This)->lpVtbl->Base.Release((IUnknown *)This))
  3939.  
  3940. #define ID2D1Resource_GetFactory(This, factory) \
  3941.     ((This)->lpVtbl->GetFactory(This, factory))
  3942.  
  3943. typedef interface ID2D1Bitmap ID2D1Bitmap;
  3944.  
  3945. typedef struct ID2D1BitmapVtbl
  3946. {
  3947.    
  3948.     ID2D1ResourceVtbl Base;
  3949.    
  3950.    
  3951.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  3952.         ID2D1Bitmap *This
  3953.         ) PURE;
  3954.    
  3955.     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(
  3956.         ID2D1Bitmap *This
  3957.         ) PURE;
  3958.    
  3959.     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(
  3960.         ID2D1Bitmap *This
  3961.         ) PURE;
  3962.    
  3963.     STDMETHOD_(void, GetDpi)(
  3964.         ID2D1Bitmap *This,
  3965.         __out FLOAT *dpiX,
  3966.         __out FLOAT *dpiY
  3967.         ) PURE;
  3968.    
  3969.     STDMETHOD(CopyFromBitmap)(
  3970.         ID2D1Bitmap *This,
  3971.         __in_opt CONST D2D1_POINT_2U *destPoint,
  3972.         __in ID2D1Bitmap *bitmap,
  3973.         __in_opt CONST D2D1_RECT_U *srcRect
  3974.         ) PURE;
  3975.    
  3976.     STDMETHOD(CopyFromRenderTarget)(
  3977.         ID2D1Bitmap *This,
  3978.         __in_opt CONST D2D1_POINT_2U *destPoint,
  3979.         __in ID2D1RenderTarget *renderTarget,
  3980.         __in_opt CONST D2D1_RECT_U *srcRect
  3981.         ) PURE;
  3982.    
  3983.     STDMETHOD(CopyFromMemory)(
  3984.         ID2D1Bitmap *This,
  3985.         __in_opt CONST D2D1_RECT_U *dstRect,
  3986.         __in CONST void *srcData,
  3987.         UINT32 pitch
  3988.         ) PURE;
  3989. } ID2D1BitmapVtbl;
  3990.  
  3991. interface ID2D1Bitmap
  3992. {
  3993.     CONST struct ID2D1BitmapVtbl *lpVtbl;
  3994. };
  3995.  
  3996.  
  3997. #define ID2D1Bitmap_QueryInterface(This, riid, ppv) \
  3998.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  3999.  
  4000. #define ID2D1Bitmap_AddRef(This) \
  4001.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  4002.  
  4003. #define ID2D1Bitmap_Release(This) \
  4004.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  4005.  
  4006. #define ID2D1Bitmap_GetFactory(This, factory) \
  4007.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  4008.  
  4009. #define ID2D1Bitmap_GetSize(This) \
  4010.     ((This)->lpVtbl->GetSize(This))
  4011.  
  4012. #define ID2D1Bitmap_GetPixelSize(This) \
  4013.     ((This)->lpVtbl->GetPixelSize(This))
  4014.  
  4015. #define ID2D1Bitmap_GetPixelFormat(This) \
  4016.     ((This)->lpVtbl->GetPixelFormat(This))
  4017.  
  4018. #define ID2D1Bitmap_GetDpi(This, dpiX, dpiY) \
  4019.     ((This)->lpVtbl->GetDpi(This, dpiX, dpiY))
  4020.  
  4021. #define ID2D1Bitmap_CopyFromBitmap(This, destPoint, bitmap, srcRect) \
  4022.     ((This)->lpVtbl->CopyFromBitmap(This, destPoint, bitmap, srcRect))
  4023.  
  4024. #define ID2D1Bitmap_CopyFromRenderTarget(This, destPoint, renderTarget, srcRect) \
  4025.     ((This)->lpVtbl->CopyFromRenderTarget(This, destPoint, renderTarget, srcRect))
  4026.  
  4027. #define ID2D1Bitmap_CopyFromMemory(This, dstRect, srcData, pitch) \
  4028.     ((This)->lpVtbl->CopyFromMemory(This, dstRect, srcData, pitch))
  4029.  
  4030. typedef interface ID2D1GradientStopCollection ID2D1GradientStopCollection;
  4031.  
  4032. typedef struct ID2D1GradientStopCollectionVtbl
  4033. {
  4034.    
  4035.     ID2D1ResourceVtbl Base;
  4036.    
  4037.    
  4038.     STDMETHOD_(UINT32, GetGradientStopCount)(
  4039.         ID2D1GradientStopCollection *This
  4040.         ) PURE;
  4041.    
  4042.     STDMETHOD_(void, GetGradientStops)(
  4043.         ID2D1GradientStopCollection *This,
  4044.         __out_ecount(gradientStopsCount) D2D1_GRADIENT_STOP *gradientStops,
  4045.         UINT gradientStopsCount
  4046.         ) PURE;
  4047.    
  4048.     STDMETHOD_(D2D1_GAMMA, GetColorInterpolationGamma)(
  4049.         ID2D1GradientStopCollection *This
  4050.         ) PURE;
  4051.    
  4052.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendMode)(
  4053.         ID2D1GradientStopCollection *This
  4054.         ) PURE;
  4055. } ID2D1GradientStopCollectionVtbl;
  4056.  
  4057. interface ID2D1GradientStopCollection
  4058. {
  4059.     CONST struct ID2D1GradientStopCollectionVtbl *lpVtbl;
  4060. };
  4061.  
  4062.  
  4063. #define ID2D1GradientStopCollection_QueryInterface(This, riid, ppv) \
  4064.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4065.  
  4066. #define ID2D1GradientStopCollection_AddRef(This) \
  4067.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  4068.  
  4069. #define ID2D1GradientStopCollection_Release(This) \
  4070.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  4071.  
  4072. #define ID2D1GradientStopCollection_GetFactory(This, factory) \
  4073.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  4074.  
  4075. #define ID2D1GradientStopCollection_GetGradientStopCount(This) \
  4076.     ((This)->lpVtbl->GetGradientStopCount(This))
  4077.  
  4078. #define ID2D1GradientStopCollection_GetGradientStops(This, gradientStops, gradientStopsCount) \
  4079.     ((This)->lpVtbl->GetGradientStops(This, gradientStops, gradientStopsCount))
  4080.  
  4081. #define ID2D1GradientStopCollection_GetColorInterpolationGamma(This) \
  4082.     ((This)->lpVtbl->GetColorInterpolationGamma(This))
  4083.  
  4084. #define ID2D1GradientStopCollection_GetExtendMode(This) \
  4085.     ((This)->lpVtbl->GetExtendMode(This))
  4086.  
  4087. typedef interface ID2D1Brush ID2D1Brush;
  4088.  
  4089. typedef struct ID2D1BrushVtbl
  4090. {
  4091.    
  4092.     ID2D1ResourceVtbl Base;
  4093.    
  4094.    
  4095.     STDMETHOD_(void, SetOpacity)(
  4096.         ID2D1Brush *This,
  4097.         FLOAT opacity
  4098.         ) PURE;
  4099.    
  4100.     STDMETHOD_(void, SetTransform)(
  4101.         ID2D1Brush *This,
  4102.         __in CONST D2D1_MATRIX_3X2_F *transform
  4103.         ) PURE;
  4104.    
  4105.     STDMETHOD_(FLOAT, GetOpacity)(
  4106.         ID2D1Brush *This
  4107.         ) PURE;
  4108.    
  4109.     STDMETHOD_(void, GetTransform)(
  4110.         ID2D1Brush *This,
  4111.         __out D2D1_MATRIX_3X2_F *transform
  4112.         ) PURE;
  4113. } ID2D1BrushVtbl;
  4114.  
  4115. interface ID2D1Brush
  4116. {
  4117.     CONST struct ID2D1BrushVtbl *lpVtbl;
  4118. };
  4119.  
  4120.  
  4121. #define ID2D1Brush_QueryInterface(This, riid, ppv) \
  4122.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4123.  
  4124. #define ID2D1Brush_AddRef(This) \
  4125.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  4126.  
  4127. #define ID2D1Brush_Release(This) \
  4128.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  4129.  
  4130. #define ID2D1Brush_GetFactory(This, factory) \
  4131.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  4132.  
  4133. #define ID2D1Brush_SetOpacity(This, opacity) \
  4134.     ((This)->lpVtbl->SetOpacity(This, opacity))
  4135.  
  4136. #define ID2D1Brush_SetTransform(This, transform) \
  4137.     ((This)->lpVtbl->SetTransform(This, transform))
  4138.  
  4139. #define ID2D1Brush_GetOpacity(This) \
  4140.     ((This)->lpVtbl->GetOpacity(This))
  4141.  
  4142. #define ID2D1Brush_GetTransform(This, transform) \
  4143.     ((This)->lpVtbl->GetTransform(This, transform))
  4144.  
  4145. typedef interface ID2D1BitmapBrush ID2D1BitmapBrush;
  4146.  
  4147. typedef struct ID2D1BitmapBrushVtbl
  4148. {
  4149.    
  4150.     ID2D1BrushVtbl Base;
  4151.    
  4152.    
  4153.     STDMETHOD_(void, SetExtendModeX)(
  4154.         ID2D1BitmapBrush *This,
  4155.         D2D1_EXTEND_MODE extendModeX
  4156.         ) PURE;
  4157.    
  4158.     STDMETHOD_(void, SetExtendModeY)(
  4159.         ID2D1BitmapBrush *This,
  4160.         D2D1_EXTEND_MODE extendModeY
  4161.         ) PURE;
  4162.    
  4163.     STDMETHOD_(void, SetInterpolationMode)(
  4164.         ID2D1BitmapBrush *This,
  4165.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode
  4166.         ) PURE;
  4167.    
  4168.     STDMETHOD_(void, SetBitmap)(
  4169.         ID2D1BitmapBrush *This,
  4170.         __in ID2D1Bitmap *bitmap
  4171.         ) PURE;
  4172.    
  4173.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeX)(
  4174.         ID2D1BitmapBrush *This
  4175.         ) PURE;
  4176.    
  4177.     STDMETHOD_(D2D1_EXTEND_MODE, GetExtendModeY)(
  4178.         ID2D1BitmapBrush *This
  4179.         ) PURE;
  4180.    
  4181.     STDMETHOD_(D2D1_BITMAP_INTERPOLATION_MODE, GetInterpolationMode)(
  4182.         ID2D1BitmapBrush *This
  4183.         ) PURE;
  4184.    
  4185.     STDMETHOD_(void, GetBitmap)(
  4186.         ID2D1BitmapBrush *This,
  4187.         __deref_out ID2D1Bitmap **bitmap
  4188.         ) PURE;
  4189. } ID2D1BitmapBrushVtbl;
  4190.  
  4191. interface ID2D1BitmapBrush
  4192. {
  4193.     CONST struct ID2D1BitmapBrushVtbl *lpVtbl;
  4194. };
  4195.  
  4196.  
  4197. #define ID2D1BitmapBrush_QueryInterface(This, riid, ppv) \
  4198.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4199.  
  4200. #define ID2D1BitmapBrush_AddRef(This) \
  4201.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4202.  
  4203. #define ID2D1BitmapBrush_Release(This) \
  4204.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4205.  
  4206. #define ID2D1BitmapBrush_GetFactory(This, factory) \
  4207.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4208.  
  4209. #define ID2D1BitmapBrush_SetOpacity(This, opacity) \
  4210.     ((This)->lpVtbl->Base.SetOpacity((ID2D1Brush *)This, opacity))
  4211.  
  4212. #define ID2D1BitmapBrush_SetTransform(This, transform) \
  4213.     ((This)->lpVtbl->Base.SetTransform((ID2D1Brush *)This, transform))
  4214.  
  4215. #define ID2D1BitmapBrush_GetOpacity(This) \
  4216.     ((This)->lpVtbl->Base.GetOpacity((ID2D1Brush *)This))
  4217.  
  4218. #define ID2D1BitmapBrush_GetTransform(This, transform) \
  4219.     ((This)->lpVtbl->Base.GetTransform((ID2D1Brush *)This, transform))
  4220.  
  4221. #define ID2D1BitmapBrush_SetExtendModeX(This, extendModeX) \
  4222.     ((This)->lpVtbl->SetExtendModeX(This, extendModeX))
  4223.  
  4224. #define ID2D1BitmapBrush_SetExtendModeY(This, extendModeY) \
  4225.     ((This)->lpVtbl->SetExtendModeY(This, extendModeY))
  4226.  
  4227. #define ID2D1BitmapBrush_SetInterpolationMode(This, interpolationMode) \
  4228.     ((This)->lpVtbl->SetInterpolationMode(This, interpolationMode))
  4229.  
  4230. #define ID2D1BitmapBrush_SetBitmap(This, bitmap) \
  4231.     ((This)->lpVtbl->SetBitmap(This, bitmap))
  4232.  
  4233. #define ID2D1BitmapBrush_GetExtendModeX(This) \
  4234.     ((This)->lpVtbl->GetExtendModeX(This))
  4235.  
  4236. #define ID2D1BitmapBrush_GetExtendModeY(This) \
  4237.     ((This)->lpVtbl->GetExtendModeY(This))
  4238.  
  4239. #define ID2D1BitmapBrush_GetInterpolationMode(This) \
  4240.     ((This)->lpVtbl->GetInterpolationMode(This))
  4241.  
  4242. #define ID2D1BitmapBrush_GetBitmap(This, bitmap) \
  4243.     ((This)->lpVtbl->GetBitmap(This, bitmap))
  4244.  
  4245. typedef interface ID2D1SolidColorBrush ID2D1SolidColorBrush;
  4246.  
  4247. typedef struct ID2D1SolidColorBrushVtbl
  4248. {
  4249.    
  4250.     ID2D1BrushVtbl Base;
  4251.    
  4252.    
  4253.     STDMETHOD_(void, SetColor)(
  4254.         ID2D1SolidColorBrush *This,
  4255.         __in CONST D2D1_COLOR_F *color
  4256.         ) PURE;
  4257.    
  4258.     STDMETHOD_(D2D1_COLOR_F, GetColor)(
  4259.         ID2D1SolidColorBrush *This
  4260.         ) PURE;
  4261. } ID2D1SolidColorBrushVtbl;
  4262.  
  4263. interface ID2D1SolidColorBrush
  4264. {
  4265.     CONST struct ID2D1SolidColorBrushVtbl *lpVtbl;
  4266. };
  4267.  
  4268.  
  4269. #define ID2D1SolidColorBrush_QueryInterface(This, riid, ppv) \
  4270.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4271.  
  4272. #define ID2D1SolidColorBrush_AddRef(This) \
  4273.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4274.  
  4275. #define ID2D1SolidColorBrush_Release(This) \
  4276.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4277.  
  4278. #define ID2D1SolidColorBrush_GetFactory(This, factory) \
  4279.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4280.  
  4281. #define ID2D1SolidColorBrush_SetOpacity(This, opacity) \
  4282.     ((This)->lpVtbl->Base.SetOpacity((ID2D1Brush *)This, opacity))
  4283.  
  4284. #define ID2D1SolidColorBrush_SetTransform(This, transform) \
  4285.     ((This)->lpVtbl->Base.SetTransform((ID2D1Brush *)This, transform))
  4286.  
  4287. #define ID2D1SolidColorBrush_GetOpacity(This) \
  4288.     ((This)->lpVtbl->Base.GetOpacity((ID2D1Brush *)This))
  4289.  
  4290. #define ID2D1SolidColorBrush_GetTransform(This, transform) \
  4291.     ((This)->lpVtbl->Base.GetTransform((ID2D1Brush *)This, transform))
  4292.  
  4293. #define ID2D1SolidColorBrush_SetColor(This, color) \
  4294.     ((This)->lpVtbl->SetColor(This, color))
  4295.  
  4296. #define ID2D1SolidColorBrush_GetColor(This) \
  4297.     ((This)->lpVtbl->GetColor(This))
  4298.  
  4299. typedef interface ID2D1LinearGradientBrush ID2D1LinearGradientBrush;
  4300.  
  4301. typedef struct ID2D1LinearGradientBrushVtbl
  4302. {
  4303.    
  4304.     ID2D1BrushVtbl Base;
  4305.    
  4306.    
  4307.     STDMETHOD_(void, SetStartPoint)(
  4308.         ID2D1LinearGradientBrush *This,
  4309.         D2D1_POINT_2F startPoint
  4310.         ) PURE;
  4311.    
  4312.     STDMETHOD_(void, SetEndPoint)(
  4313.         ID2D1LinearGradientBrush *This,
  4314.         D2D1_POINT_2F endPoint
  4315.         ) PURE;
  4316.    
  4317.     STDMETHOD_(D2D1_POINT_2F, GetStartPoint)(
  4318.         ID2D1LinearGradientBrush *This
  4319.         ) PURE;
  4320.    
  4321.     STDMETHOD_(D2D1_POINT_2F, GetEndPoint)(
  4322.         ID2D1LinearGradientBrush *This
  4323.         ) PURE;
  4324.    
  4325.     STDMETHOD_(void, GetGradientStopCollection)(
  4326.         ID2D1LinearGradientBrush *This,
  4327.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  4328.         ) PURE;
  4329. } ID2D1LinearGradientBrushVtbl;
  4330.  
  4331. interface ID2D1LinearGradientBrush
  4332. {
  4333.     CONST struct ID2D1LinearGradientBrushVtbl *lpVtbl;
  4334. };
  4335.  
  4336.  
  4337. #define ID2D1LinearGradientBrush_QueryInterface(This, riid, ppv) \
  4338.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4339.  
  4340. #define ID2D1LinearGradientBrush_AddRef(This) \
  4341.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4342.  
  4343. #define ID2D1LinearGradientBrush_Release(This) \
  4344.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4345.  
  4346. #define ID2D1LinearGradientBrush_GetFactory(This, factory) \
  4347.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4348.  
  4349. #define ID2D1LinearGradientBrush_SetOpacity(This, opacity) \
  4350.     ((This)->lpVtbl->Base.SetOpacity((ID2D1Brush *)This, opacity))
  4351.  
  4352. #define ID2D1LinearGradientBrush_SetTransform(This, transform) \
  4353.     ((This)->lpVtbl->Base.SetTransform((ID2D1Brush *)This, transform))
  4354.  
  4355. #define ID2D1LinearGradientBrush_GetOpacity(This) \
  4356.     ((This)->lpVtbl->Base.GetOpacity((ID2D1Brush *)This))
  4357.  
  4358. #define ID2D1LinearGradientBrush_GetTransform(This, transform) \
  4359.     ((This)->lpVtbl->Base.GetTransform((ID2D1Brush *)This, transform))
  4360.  
  4361. #define ID2D1LinearGradientBrush_SetStartPoint(This, startPoint) \
  4362.     ((This)->lpVtbl->SetStartPoint(This, startPoint))
  4363.  
  4364. #define ID2D1LinearGradientBrush_SetEndPoint(This, endPoint) \
  4365.     ((This)->lpVtbl->SetEndPoint(This, endPoint))
  4366.  
  4367. #define ID2D1LinearGradientBrush_GetStartPoint(This) \
  4368.     ((This)->lpVtbl->GetStartPoint(This))
  4369.  
  4370. #define ID2D1LinearGradientBrush_GetEndPoint(This) \
  4371.     ((This)->lpVtbl->GetEndPoint(This))
  4372.  
  4373. #define ID2D1LinearGradientBrush_GetGradientStopCollection(This, gradientStopCollection) \
  4374.     ((This)->lpVtbl->GetGradientStopCollection(This, gradientStopCollection))
  4375.  
  4376. typedef interface ID2D1RadialGradientBrush ID2D1RadialGradientBrush;
  4377.  
  4378. typedef struct ID2D1RadialGradientBrushVtbl
  4379. {
  4380.    
  4381.     ID2D1BrushVtbl Base;
  4382.    
  4383.    
  4384.     STDMETHOD_(void, SetCenter)(
  4385.         ID2D1RadialGradientBrush *This,
  4386.         D2D1_POINT_2F center
  4387.         ) PURE;
  4388.    
  4389.     STDMETHOD_(void, SetGradientOriginOffset)(
  4390.         ID2D1RadialGradientBrush *This,
  4391.         D2D1_POINT_2F gradientOriginOffset
  4392.         ) PURE;
  4393.    
  4394.     STDMETHOD_(void, SetRadiusX)(
  4395.         ID2D1RadialGradientBrush *This,
  4396.         FLOAT radiusX
  4397.         ) PURE;
  4398.    
  4399.     STDMETHOD_(void, SetRadiusY)(
  4400.         ID2D1RadialGradientBrush *This,
  4401.         FLOAT radiusY
  4402.         ) PURE;
  4403.    
  4404.     STDMETHOD_(D2D1_POINT_2F, GetCenter)(
  4405.         ID2D1RadialGradientBrush *This
  4406.         ) PURE;
  4407.    
  4408.     STDMETHOD_(D2D1_POINT_2F, GetGradientOriginOffset)(
  4409.         ID2D1RadialGradientBrush *This
  4410.         ) PURE;
  4411.    
  4412.     STDMETHOD_(FLOAT, GetRadiusX)(
  4413.         ID2D1RadialGradientBrush *This
  4414.         ) PURE;
  4415.    
  4416.     STDMETHOD_(FLOAT, GetRadiusY)(
  4417.         ID2D1RadialGradientBrush *This
  4418.         ) PURE;
  4419.    
  4420.     STDMETHOD_(void, GetGradientStopCollection)(
  4421.         ID2D1RadialGradientBrush *This,
  4422.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  4423.         ) PURE;
  4424. } ID2D1RadialGradientBrushVtbl;
  4425.  
  4426. interface ID2D1RadialGradientBrush
  4427. {
  4428.     CONST struct ID2D1RadialGradientBrushVtbl *lpVtbl;
  4429. };
  4430.  
  4431.  
  4432. #define ID2D1RadialGradientBrush_QueryInterface(This, riid, ppv) \
  4433.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4434.  
  4435. #define ID2D1RadialGradientBrush_AddRef(This) \
  4436.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4437.  
  4438. #define ID2D1RadialGradientBrush_Release(This) \
  4439.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4440.  
  4441. #define ID2D1RadialGradientBrush_GetFactory(This, factory) \
  4442.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4443.  
  4444. #define ID2D1RadialGradientBrush_SetOpacity(This, opacity) \
  4445.     ((This)->lpVtbl->Base.SetOpacity((ID2D1Brush *)This, opacity))
  4446.  
  4447. #define ID2D1RadialGradientBrush_SetTransform(This, transform) \
  4448.     ((This)->lpVtbl->Base.SetTransform((ID2D1Brush *)This, transform))
  4449.  
  4450. #define ID2D1RadialGradientBrush_GetOpacity(This) \
  4451.     ((This)->lpVtbl->Base.GetOpacity((ID2D1Brush *)This))
  4452.  
  4453. #define ID2D1RadialGradientBrush_GetTransform(This, transform) \
  4454.     ((This)->lpVtbl->Base.GetTransform((ID2D1Brush *)This, transform))
  4455.  
  4456. #define ID2D1RadialGradientBrush_SetCenter(This, center) \
  4457.     ((This)->lpVtbl->SetCenter(This, center))
  4458.  
  4459. #define ID2D1RadialGradientBrush_SetGradientOriginOffset(This, gradientOriginOffset) \
  4460.     ((This)->lpVtbl->SetGradientOriginOffset(This, gradientOriginOffset))
  4461.  
  4462. #define ID2D1RadialGradientBrush_SetRadiusX(This, radiusX) \
  4463.     ((This)->lpVtbl->SetRadiusX(This, radiusX))
  4464.  
  4465. #define ID2D1RadialGradientBrush_SetRadiusY(This, radiusY) \
  4466.     ((This)->lpVtbl->SetRadiusY(This, radiusY))
  4467.  
  4468. #define ID2D1RadialGradientBrush_GetCenter(This) \
  4469.     ((This)->lpVtbl->GetCenter(This))
  4470.  
  4471. #define ID2D1RadialGradientBrush_GetGradientOriginOffset(This) \
  4472.     ((This)->lpVtbl->GetGradientOriginOffset(This))
  4473.  
  4474. #define ID2D1RadialGradientBrush_GetRadiusX(This) \
  4475.     ((This)->lpVtbl->GetRadiusX(This))
  4476.  
  4477. #define ID2D1RadialGradientBrush_GetRadiusY(This) \
  4478.     ((This)->lpVtbl->GetRadiusY(This))
  4479.  
  4480. #define ID2D1RadialGradientBrush_GetGradientStopCollection(This, gradientStopCollection) \
  4481.     ((This)->lpVtbl->GetGradientStopCollection(This, gradientStopCollection))
  4482.  
  4483. typedef interface ID2D1StrokeStyle ID2D1StrokeStyle;
  4484.  
  4485. typedef struct ID2D1StrokeStyleVtbl
  4486. {
  4487.    
  4488.     ID2D1ResourceVtbl Base;
  4489.    
  4490.    
  4491.     STDMETHOD_(D2D1_CAP_STYLE, GetStartCap)(
  4492.         ID2D1StrokeStyle *This
  4493.         ) PURE;
  4494.    
  4495.     STDMETHOD_(D2D1_CAP_STYLE, GetEndCap)(
  4496.         ID2D1StrokeStyle *This
  4497.         ) PURE;
  4498.    
  4499.     STDMETHOD_(D2D1_CAP_STYLE, GetDashCap)(
  4500.         ID2D1StrokeStyle *This
  4501.         ) PURE;
  4502.    
  4503.     STDMETHOD_(FLOAT, GetMiterLimit)(
  4504.         ID2D1StrokeStyle *This
  4505.         ) PURE;
  4506.    
  4507.     STDMETHOD_(D2D1_LINE_JOIN, GetLineJoin)(
  4508.         ID2D1StrokeStyle *This
  4509.         ) PURE;
  4510.    
  4511.     STDMETHOD_(FLOAT, GetDashOffset)(
  4512.         ID2D1StrokeStyle *This
  4513.         ) PURE;
  4514.    
  4515.     STDMETHOD_(D2D1_DASH_STYLE, GetDashStyle)(
  4516.         ID2D1StrokeStyle *This
  4517.         ) PURE;
  4518.    
  4519.     STDMETHOD_(UINT32, GetDashesCount)(
  4520.         ID2D1StrokeStyle *This
  4521.         ) PURE;
  4522.    
  4523.     STDMETHOD_(void, GetDashes)(
  4524.         ID2D1StrokeStyle *This,
  4525.         __out_ecount(dashesCount) FLOAT *dashes,
  4526.         UINT dashesCount
  4527.         ) PURE;
  4528. } ID2D1StrokeStyleVtbl;
  4529.  
  4530. interface ID2D1StrokeStyle
  4531. {
  4532.     CONST struct ID2D1StrokeStyleVtbl *lpVtbl;
  4533. };
  4534.  
  4535.  
  4536. #define ID2D1StrokeStyle_QueryInterface(This, riid, ppv) \
  4537.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4538.  
  4539. #define ID2D1StrokeStyle_AddRef(This) \
  4540.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  4541.  
  4542. #define ID2D1StrokeStyle_Release(This) \
  4543.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  4544.  
  4545. #define ID2D1StrokeStyle_GetFactory(This, factory) \
  4546.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  4547.  
  4548. #define ID2D1StrokeStyle_GetStartCap(This) \
  4549.     ((This)->lpVtbl->GetStartCap(This))
  4550.  
  4551. #define ID2D1StrokeStyle_GetEndCap(This) \
  4552.     ((This)->lpVtbl->GetEndCap(This))
  4553.  
  4554. #define ID2D1StrokeStyle_GetDashCap(This) \
  4555.     ((This)->lpVtbl->GetDashCap(This))
  4556.  
  4557. #define ID2D1StrokeStyle_GetMiterLimit(This) \
  4558.     ((This)->lpVtbl->GetMiterLimit(This))
  4559.  
  4560. #define ID2D1StrokeStyle_GetLineJoin(This) \
  4561.     ((This)->lpVtbl->GetLineJoin(This))
  4562.  
  4563. #define ID2D1StrokeStyle_GetDashOffset(This) \
  4564.     ((This)->lpVtbl->GetDashOffset(This))
  4565.  
  4566. #define ID2D1StrokeStyle_GetDashStyle(This) \
  4567.     ((This)->lpVtbl->GetDashStyle(This))
  4568.  
  4569. #define ID2D1StrokeStyle_GetDashesCount(This) \
  4570.     ((This)->lpVtbl->GetDashesCount(This))
  4571.  
  4572. #define ID2D1StrokeStyle_GetDashes(This, dashes, dashesCount) \
  4573.     ((This)->lpVtbl->GetDashes(This, dashes, dashesCount))
  4574.  
  4575. typedef interface ID2D1Geometry ID2D1Geometry;
  4576.  
  4577. typedef struct ID2D1GeometryVtbl
  4578. {
  4579.    
  4580.     ID2D1ResourceVtbl Base;
  4581.    
  4582.    
  4583.     STDMETHOD(GetBounds)(
  4584.         ID2D1Geometry *This,
  4585.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4586.         __out D2D1_RECT_F *bounds
  4587.         ) PURE;
  4588.    
  4589.     STDMETHOD(GetWidenedBounds)(
  4590.         ID2D1Geometry *This,
  4591.         FLOAT strokeWidth,
  4592.         __in_opt ID2D1StrokeStyle *strokeStyle,
  4593.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4594.         FLOAT flatteningTolerance,
  4595.         __out D2D1_RECT_F *bounds
  4596.         ) PURE;
  4597.    
  4598.     STDMETHOD(StrokeContainsPoint)(
  4599.         ID2D1Geometry *This,
  4600.         D2D1_POINT_2F point,
  4601.         FLOAT strokeWidth,
  4602.         __in_opt ID2D1StrokeStyle *strokeStyle,
  4603.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4604.         FLOAT flatteningTolerance,
  4605.         __out BOOL *contains
  4606.         ) PURE;
  4607.    
  4608.     STDMETHOD(FillContainsPoint)(
  4609.         ID2D1Geometry *This,
  4610.         D2D1_POINT_2F point,
  4611.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4612.         FLOAT flatteningTolerance,
  4613.         __out BOOL *contains
  4614.         ) PURE;
  4615.    
  4616.     STDMETHOD(CompareWithGeometry)(
  4617.         ID2D1Geometry *This,
  4618.         __in ID2D1Geometry *inputGeometry,
  4619.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  4620.         FLOAT flatteningTolerance,
  4621.         __out D2D1_GEOMETRY_RELATION *relation
  4622.         ) PURE;
  4623.    
  4624.     STDMETHOD(Simplify)(
  4625.         ID2D1Geometry *This,
  4626.         D2D1_GEOMETRY_SIMPLIFICATION_OPTION simplificationOption,
  4627.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4628.         FLOAT flatteningTolerance,
  4629.         __in ID2D1SimplifiedGeometrySink *geometrySink
  4630.         ) PURE;
  4631.    
  4632.     STDMETHOD(Tessellate)(
  4633.         ID2D1Geometry *This,
  4634.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4635.         FLOAT flatteningTolerance,
  4636.         __in ID2D1TessellationSink *tessellationSink
  4637.         ) PURE;
  4638.    
  4639.     STDMETHOD(CombineWithGeometry)(
  4640.         ID2D1Geometry *This,
  4641.         __in ID2D1Geometry *inputGeometry,
  4642.         D2D1_COMBINE_MODE combineMode,
  4643.         __in_opt CONST D2D1_MATRIX_3X2_F *inputGeometryTransform,
  4644.         FLOAT flatteningTolerance,
  4645.         __in ID2D1SimplifiedGeometrySink *geometrySink
  4646.         ) PURE;
  4647.    
  4648.     STDMETHOD(Outline)(
  4649.         ID2D1Geometry *This,
  4650.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4651.         FLOAT flatteningTolerance,
  4652.         __in ID2D1SimplifiedGeometrySink *geometrySink
  4653.         ) PURE;
  4654.    
  4655.     STDMETHOD(ComputeArea)(
  4656.         ID2D1Geometry *This,
  4657.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4658.         FLOAT flatteningTolerance,
  4659.         __out FLOAT *area
  4660.         ) PURE;
  4661.    
  4662.     STDMETHOD(ComputeLength)(
  4663.         ID2D1Geometry *This,
  4664.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4665.         FLOAT flatteningTolerance,
  4666.         __out FLOAT *length
  4667.         ) PURE;
  4668.    
  4669.     STDMETHOD(ComputePointAtLength)(
  4670.         ID2D1Geometry *This,
  4671.         FLOAT length,
  4672.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4673.         FLOAT flatteningTolerance,
  4674.         __out_opt D2D1_POINT_2F *point,
  4675.         __out_opt D2D1_POINT_2F *unitTangentVector
  4676.         ) PURE;
  4677.    
  4678.     STDMETHOD(Widen)(
  4679.         ID2D1Geometry *This,
  4680.         FLOAT strokeWidth,
  4681.         __in_opt ID2D1StrokeStyle *strokeStyle,
  4682.         __in_opt CONST D2D1_MATRIX_3X2_F *worldTransform,
  4683.         FLOAT flatteningTolerance,
  4684.         __in ID2D1SimplifiedGeometrySink *geometrySink
  4685.         ) PURE;
  4686. } ID2D1GeometryVtbl;
  4687.  
  4688. interface ID2D1Geometry
  4689. {
  4690.     CONST struct ID2D1GeometryVtbl *lpVtbl;
  4691. };
  4692.  
  4693.  
  4694. #define ID2D1Geometry_QueryInterface(This, riid, ppv) \
  4695.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4696.  
  4697. #define ID2D1Geometry_AddRef(This) \
  4698.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  4699.  
  4700. #define ID2D1Geometry_Release(This) \
  4701.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  4702.  
  4703. #define ID2D1Geometry_GetFactory(This, factory) \
  4704.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  4705.  
  4706. #define ID2D1Geometry_GetBounds(This, worldTransform, bounds) \
  4707.     ((This)->lpVtbl->GetBounds(This, worldTransform, bounds))
  4708.  
  4709. #define ID2D1Geometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  4710.     ((This)->lpVtbl->GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  4711.  
  4712. #define ID2D1Geometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  4713.     ((This)->lpVtbl->StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  4714.  
  4715. #define ID2D1Geometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  4716.     ((This)->lpVtbl->FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains))
  4717.  
  4718. #define ID2D1Geometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  4719.     ((This)->lpVtbl->CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  4720.  
  4721. #define ID2D1Geometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  4722.     ((This)->lpVtbl->Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  4723.  
  4724. #define ID2D1Geometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  4725.     ((This)->lpVtbl->Tessellate(This, worldTransform, flatteningTolerance, tessellationSink))
  4726.  
  4727. #define ID2D1Geometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  4728.     ((This)->lpVtbl->CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  4729.  
  4730. #define ID2D1Geometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  4731.     ((This)->lpVtbl->Outline(This, worldTransform, flatteningTolerance, geometrySink))
  4732.  
  4733. #define ID2D1Geometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  4734.     ((This)->lpVtbl->ComputeArea(This, worldTransform, flatteningTolerance, area))
  4735.  
  4736. #define ID2D1Geometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  4737.     ((This)->lpVtbl->ComputeLength(This, worldTransform, flatteningTolerance, length))
  4738.  
  4739. #define ID2D1Geometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  4740.     ((This)->lpVtbl->ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  4741.  
  4742. #define ID2D1Geometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  4743.     ((This)->lpVtbl->Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  4744.  
  4745. typedef interface ID2D1RectangleGeometry ID2D1RectangleGeometry;
  4746.  
  4747. typedef struct ID2D1RectangleGeometryVtbl
  4748. {
  4749.    
  4750.     ID2D1GeometryVtbl Base;
  4751.    
  4752.    
  4753.     STDMETHOD_(void, GetRect)(
  4754.         ID2D1RectangleGeometry *This,
  4755.         __out D2D1_RECT_F *rect
  4756.         ) PURE;
  4757. } ID2D1RectangleGeometryVtbl;
  4758.  
  4759. interface ID2D1RectangleGeometry
  4760. {
  4761.     CONST struct ID2D1RectangleGeometryVtbl *lpVtbl;
  4762. };
  4763.  
  4764.  
  4765. #define ID2D1RectangleGeometry_QueryInterface(This, riid, ppv) \
  4766.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4767.  
  4768. #define ID2D1RectangleGeometry_AddRef(This) \
  4769.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4770.  
  4771. #define ID2D1RectangleGeometry_Release(This) \
  4772.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4773.  
  4774. #define ID2D1RectangleGeometry_GetFactory(This, factory) \
  4775.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4776.  
  4777. #define ID2D1RectangleGeometry_GetBounds(This, worldTransform, bounds) \
  4778.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  4779.  
  4780. #define ID2D1RectangleGeometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  4781.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  4782.  
  4783. #define ID2D1RectangleGeometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  4784.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  4785.  
  4786. #define ID2D1RectangleGeometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  4787.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  4788.  
  4789. #define ID2D1RectangleGeometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  4790.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  4791.  
  4792. #define ID2D1RectangleGeometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  4793.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  4794.  
  4795. #define ID2D1RectangleGeometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  4796.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  4797.  
  4798. #define ID2D1RectangleGeometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  4799.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  4800.  
  4801. #define ID2D1RectangleGeometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  4802.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  4803.  
  4804. #define ID2D1RectangleGeometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  4805.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  4806.  
  4807. #define ID2D1RectangleGeometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  4808.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  4809.  
  4810. #define ID2D1RectangleGeometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  4811.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  4812.  
  4813. #define ID2D1RectangleGeometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  4814.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  4815.  
  4816. #define ID2D1RectangleGeometry_GetRect(This, rect) \
  4817.     ((This)->lpVtbl->GetRect(This, rect))
  4818.  
  4819. typedef interface ID2D1RoundedRectangleGeometry ID2D1RoundedRectangleGeometry;
  4820.  
  4821. typedef struct ID2D1RoundedRectangleGeometryVtbl
  4822. {
  4823.    
  4824.     ID2D1GeometryVtbl Base;
  4825.    
  4826.    
  4827.     STDMETHOD_(void, GetRoundedRect)(
  4828.         ID2D1RoundedRectangleGeometry *This,
  4829.         __out D2D1_ROUNDED_RECT *roundedRect
  4830.         ) PURE;
  4831. } ID2D1RoundedRectangleGeometryVtbl;
  4832.  
  4833. interface ID2D1RoundedRectangleGeometry
  4834. {
  4835.     CONST struct ID2D1RoundedRectangleGeometryVtbl *lpVtbl;
  4836. };
  4837.  
  4838.  
  4839. #define ID2D1RoundedRectangleGeometry_QueryInterface(This, riid, ppv) \
  4840.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4841.  
  4842. #define ID2D1RoundedRectangleGeometry_AddRef(This) \
  4843.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4844.  
  4845. #define ID2D1RoundedRectangleGeometry_Release(This) \
  4846.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4847.  
  4848. #define ID2D1RoundedRectangleGeometry_GetFactory(This, factory) \
  4849.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4850.  
  4851. #define ID2D1RoundedRectangleGeometry_GetBounds(This, worldTransform, bounds) \
  4852.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  4853.  
  4854. #define ID2D1RoundedRectangleGeometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  4855.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  4856.  
  4857. #define ID2D1RoundedRectangleGeometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  4858.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  4859.  
  4860. #define ID2D1RoundedRectangleGeometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  4861.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  4862.  
  4863. #define ID2D1RoundedRectangleGeometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  4864.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  4865.  
  4866. #define ID2D1RoundedRectangleGeometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  4867.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  4868.  
  4869. #define ID2D1RoundedRectangleGeometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  4870.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  4871.  
  4872. #define ID2D1RoundedRectangleGeometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  4873.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  4874.  
  4875. #define ID2D1RoundedRectangleGeometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  4876.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  4877.  
  4878. #define ID2D1RoundedRectangleGeometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  4879.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  4880.  
  4881. #define ID2D1RoundedRectangleGeometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  4882.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  4883.  
  4884. #define ID2D1RoundedRectangleGeometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  4885.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  4886.  
  4887. #define ID2D1RoundedRectangleGeometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  4888.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  4889.  
  4890. #define ID2D1RoundedRectangleGeometry_GetRoundedRect(This, roundedRect) \
  4891.     ((This)->lpVtbl->GetRoundedRect(This, roundedRect))
  4892.  
  4893. typedef interface ID2D1EllipseGeometry ID2D1EllipseGeometry;
  4894.  
  4895. typedef struct ID2D1EllipseGeometryVtbl
  4896. {
  4897.    
  4898.     ID2D1GeometryVtbl Base;
  4899.    
  4900.    
  4901.     STDMETHOD_(void, GetEllipse)(
  4902.         ID2D1EllipseGeometry *This,
  4903.         __out D2D1_ELLIPSE *ellipse
  4904.         ) PURE;
  4905. } ID2D1EllipseGeometryVtbl;
  4906.  
  4907. interface ID2D1EllipseGeometry
  4908. {
  4909.     CONST struct ID2D1EllipseGeometryVtbl *lpVtbl;
  4910. };
  4911.  
  4912.  
  4913. #define ID2D1EllipseGeometry_QueryInterface(This, riid, ppv) \
  4914.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4915.  
  4916. #define ID2D1EllipseGeometry_AddRef(This) \
  4917.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  4918.  
  4919. #define ID2D1EllipseGeometry_Release(This) \
  4920.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  4921.  
  4922. #define ID2D1EllipseGeometry_GetFactory(This, factory) \
  4923.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  4924.  
  4925. #define ID2D1EllipseGeometry_GetBounds(This, worldTransform, bounds) \
  4926.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  4927.  
  4928. #define ID2D1EllipseGeometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  4929.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  4930.  
  4931. #define ID2D1EllipseGeometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  4932.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  4933.  
  4934. #define ID2D1EllipseGeometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  4935.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  4936.  
  4937. #define ID2D1EllipseGeometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  4938.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  4939.  
  4940. #define ID2D1EllipseGeometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  4941.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  4942.  
  4943. #define ID2D1EllipseGeometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  4944.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  4945.  
  4946. #define ID2D1EllipseGeometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  4947.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  4948.  
  4949. #define ID2D1EllipseGeometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  4950.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  4951.  
  4952. #define ID2D1EllipseGeometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  4953.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  4954.  
  4955. #define ID2D1EllipseGeometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  4956.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  4957.  
  4958. #define ID2D1EllipseGeometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  4959.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  4960.  
  4961. #define ID2D1EllipseGeometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  4962.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  4963.  
  4964. #define ID2D1EllipseGeometry_GetEllipse(This, ellipse) \
  4965.     ((This)->lpVtbl->GetEllipse(This, ellipse))
  4966.  
  4967. typedef interface ID2D1GeometryGroup ID2D1GeometryGroup;
  4968.  
  4969. typedef struct ID2D1GeometryGroupVtbl
  4970. {
  4971.    
  4972.     ID2D1GeometryVtbl Base;
  4973.    
  4974.    
  4975.     STDMETHOD_(D2D1_FILL_MODE, GetFillMode)(
  4976.         ID2D1GeometryGroup *This
  4977.         ) PURE;
  4978.    
  4979.     STDMETHOD_(UINT32, GetSourceGeometryCount)(
  4980.         ID2D1GeometryGroup *This
  4981.         ) PURE;
  4982.    
  4983.     STDMETHOD_(void, GetSourceGeometries)(
  4984.         ID2D1GeometryGroup *This,
  4985.         __out_ecount(geometriesCount) ID2D1Geometry **geometries,
  4986.         UINT geometriesCount
  4987.         ) PURE;
  4988. } ID2D1GeometryGroupVtbl;
  4989.  
  4990. interface ID2D1GeometryGroup
  4991. {
  4992.     CONST struct ID2D1GeometryGroupVtbl *lpVtbl;
  4993. };
  4994.  
  4995.  
  4996. #define ID2D1GeometryGroup_QueryInterface(This, riid, ppv) \
  4997.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  4998.  
  4999. #define ID2D1GeometryGroup_AddRef(This) \
  5000.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  5001.  
  5002. #define ID2D1GeometryGroup_Release(This) \
  5003.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  5004.  
  5005. #define ID2D1GeometryGroup_GetFactory(This, factory) \
  5006.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  5007.  
  5008. #define ID2D1GeometryGroup_GetBounds(This, worldTransform, bounds) \
  5009.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  5010.  
  5011. #define ID2D1GeometryGroup_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  5012.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  5013.  
  5014. #define ID2D1GeometryGroup_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  5015.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  5016.  
  5017. #define ID2D1GeometryGroup_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  5018.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  5019.  
  5020. #define ID2D1GeometryGroup_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  5021.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  5022.  
  5023. #define ID2D1GeometryGroup_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  5024.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  5025.  
  5026. #define ID2D1GeometryGroup_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  5027.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  5028.  
  5029. #define ID2D1GeometryGroup_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  5030.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  5031.  
  5032. #define ID2D1GeometryGroup_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  5033.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  5034.  
  5035. #define ID2D1GeometryGroup_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  5036.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  5037.  
  5038. #define ID2D1GeometryGroup_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  5039.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  5040.  
  5041. #define ID2D1GeometryGroup_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  5042.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  5043.  
  5044. #define ID2D1GeometryGroup_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  5045.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  5046.  
  5047. #define ID2D1GeometryGroup_GetFillMode(This) \
  5048.     ((This)->lpVtbl->GetFillMode(This))
  5049.  
  5050. #define ID2D1GeometryGroup_GetSourceGeometryCount(This) \
  5051.     ((This)->lpVtbl->GetSourceGeometryCount(This))
  5052.  
  5053. #define ID2D1GeometryGroup_GetSourceGeometries(This, geometries, geometriesCount) \
  5054.     ((This)->lpVtbl->GetSourceGeometries(This, geometries, geometriesCount))
  5055.  
  5056. typedef interface ID2D1TransformedGeometry ID2D1TransformedGeometry;
  5057.  
  5058. typedef struct ID2D1TransformedGeometryVtbl
  5059. {
  5060.    
  5061.     ID2D1GeometryVtbl Base;
  5062.    
  5063.    
  5064.     STDMETHOD_(void, GetSourceGeometry)(
  5065.         ID2D1TransformedGeometry *This,
  5066.         __deref_out ID2D1Geometry **sourceGeometry
  5067.         ) PURE;
  5068.    
  5069.     STDMETHOD_(void, GetTransform)(
  5070.         ID2D1TransformedGeometry *This,
  5071.         __out D2D1_MATRIX_3X2_F *transform
  5072.         ) PURE;
  5073. } ID2D1TransformedGeometryVtbl;
  5074.  
  5075. interface ID2D1TransformedGeometry
  5076. {
  5077.     CONST struct ID2D1TransformedGeometryVtbl *lpVtbl;
  5078. };
  5079.  
  5080.  
  5081. #define ID2D1TransformedGeometry_QueryInterface(This, riid, ppv) \
  5082.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5083.  
  5084. #define ID2D1TransformedGeometry_AddRef(This) \
  5085.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  5086.  
  5087. #define ID2D1TransformedGeometry_Release(This) \
  5088.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  5089.  
  5090. #define ID2D1TransformedGeometry_GetFactory(This, factory) \
  5091.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  5092.  
  5093. #define ID2D1TransformedGeometry_GetBounds(This, worldTransform, bounds) \
  5094.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  5095.  
  5096. #define ID2D1TransformedGeometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  5097.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  5098.  
  5099. #define ID2D1TransformedGeometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  5100.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  5101.  
  5102. #define ID2D1TransformedGeometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  5103.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  5104.  
  5105. #define ID2D1TransformedGeometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  5106.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  5107.  
  5108. #define ID2D1TransformedGeometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  5109.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  5110.  
  5111. #define ID2D1TransformedGeometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  5112.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  5113.  
  5114. #define ID2D1TransformedGeometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  5115.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  5116.  
  5117. #define ID2D1TransformedGeometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  5118.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  5119.  
  5120. #define ID2D1TransformedGeometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  5121.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  5122.  
  5123. #define ID2D1TransformedGeometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  5124.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  5125.  
  5126. #define ID2D1TransformedGeometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  5127.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  5128.  
  5129. #define ID2D1TransformedGeometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  5130.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  5131.  
  5132. #define ID2D1TransformedGeometry_GetSourceGeometry(This, sourceGeometry) \
  5133.     ((This)->lpVtbl->GetSourceGeometry(This, sourceGeometry))
  5134.  
  5135. #define ID2D1TransformedGeometry_GetTransform(This, transform) \
  5136.     ((This)->lpVtbl->GetTransform(This, transform))
  5137.  
  5138. typedef interface ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink;
  5139.  
  5140. typedef struct ID2D1SimplifiedGeometrySinkVtbl
  5141. {
  5142.    
  5143.     IUnknownVtbl Base;
  5144.    
  5145.    
  5146.     STDMETHOD_(void, SetFillMode)(
  5147.         ID2D1SimplifiedGeometrySink *This,
  5148.         D2D1_FILL_MODE fillMode
  5149.         ) PURE;
  5150.    
  5151.     STDMETHOD_(void, SetSegmentFlags)(
  5152.         ID2D1SimplifiedGeometrySink *This,
  5153.         D2D1_PATH_SEGMENT vertexFlags
  5154.         ) PURE;
  5155.    
  5156.     STDMETHOD_(void, BeginFigure)(
  5157.         ID2D1SimplifiedGeometrySink *This,
  5158.         D2D1_POINT_2F startPoint,
  5159.         D2D1_FIGURE_BEGIN figureBegin
  5160.         ) PURE;
  5161.    
  5162.     STDMETHOD_(void, AddLines)(
  5163.         ID2D1SimplifiedGeometrySink *This,
  5164.         __in_ecount(pointsCount) CONST D2D1_POINT_2F *points,
  5165.         UINT pointsCount
  5166.         ) PURE;
  5167.    
  5168.     STDMETHOD_(void, AddBeziers)(
  5169.         ID2D1SimplifiedGeometrySink *This,
  5170.         __in_ecount(beziersCount) CONST D2D1_BEZIER_SEGMENT *beziers,
  5171.         UINT beziersCount
  5172.         ) PURE;
  5173.    
  5174.     STDMETHOD_(void, EndFigure)(
  5175.         ID2D1SimplifiedGeometrySink *This,
  5176.         D2D1_FIGURE_END figureEnd
  5177.         ) PURE;
  5178.    
  5179.     STDMETHOD(Close)(
  5180.         ID2D1SimplifiedGeometrySink *This
  5181.         ) PURE;
  5182. } ID2D1SimplifiedGeometrySinkVtbl;
  5183.  
  5184. interface ID2D1SimplifiedGeometrySink
  5185. {
  5186.     CONST struct ID2D1SimplifiedGeometrySinkVtbl *lpVtbl;
  5187. };
  5188.  
  5189.  
  5190. #define ID2D1SimplifiedGeometrySink_QueryInterface(This, riid, ppv) \
  5191.     ((This)->lpVtbl->Base.QueryInterface((IUnknown *)This, riid, ppv))
  5192.  
  5193. #define ID2D1SimplifiedGeometrySink_AddRef(This) \
  5194.     ((This)->lpVtbl->Base.AddRef((IUnknown *)This))
  5195.  
  5196. #define ID2D1SimplifiedGeometrySink_Release(This) \
  5197.     ((This)->lpVtbl->Base.Release((IUnknown *)This))
  5198.  
  5199. #define ID2D1SimplifiedGeometrySink_SetFillMode(This, fillMode) \
  5200.     ((This)->lpVtbl->SetFillMode(This, fillMode))
  5201.  
  5202. #define ID2D1SimplifiedGeometrySink_SetSegmentFlags(This, vertexFlags) \
  5203.     ((This)->lpVtbl->SetSegmentFlags(This, vertexFlags))
  5204.  
  5205. #define ID2D1SimplifiedGeometrySink_BeginFigure(This, startPoint, figureBegin) \
  5206.     ((This)->lpVtbl->BeginFigure(This, startPoint, figureBegin))
  5207.  
  5208. #define ID2D1SimplifiedGeometrySink_AddLines(This, points, pointsCount) \
  5209.     ((This)->lpVtbl->AddLines(This, points, pointsCount))
  5210.  
  5211. #define ID2D1SimplifiedGeometrySink_AddBeziers(This, beziers, beziersCount) \
  5212.     ((This)->lpVtbl->AddBeziers(This, beziers, beziersCount))
  5213.  
  5214. #define ID2D1SimplifiedGeometrySink_EndFigure(This, figureEnd) \
  5215.     ((This)->lpVtbl->EndFigure(This, figureEnd))
  5216.  
  5217. #define ID2D1SimplifiedGeometrySink_Close(This) \
  5218.     ((This)->lpVtbl->Close(This))
  5219.  
  5220. typedef interface ID2D1GeometrySink ID2D1GeometrySink;
  5221.  
  5222. typedef struct ID2D1GeometrySinkVtbl
  5223. {
  5224.    
  5225.     ID2D1SimplifiedGeometrySinkVtbl Base;
  5226.    
  5227.    
  5228.     STDMETHOD_(void, AddLine)(
  5229.         ID2D1GeometrySink *This,
  5230.         D2D1_POINT_2F point
  5231.         ) PURE;
  5232.    
  5233.     STDMETHOD_(void, AddBezier)(
  5234.         ID2D1GeometrySink *This,
  5235.         __in CONST D2D1_BEZIER_SEGMENT *bezier
  5236.         ) PURE;
  5237.    
  5238.     STDMETHOD_(void, AddQuadraticBezier)(
  5239.         ID2D1GeometrySink *This,
  5240.         __in CONST D2D1_QUADRATIC_BEZIER_SEGMENT *bezier
  5241.         ) PURE;
  5242.    
  5243.     STDMETHOD_(void, AddQuadraticBeziers)(
  5244.         ID2D1GeometrySink *This,
  5245.         __in_ecount(beziersCount) CONST D2D1_QUADRATIC_BEZIER_SEGMENT *beziers,
  5246.         UINT beziersCount
  5247.         ) PURE;
  5248.    
  5249.     STDMETHOD_(void, AddArc)(
  5250.         ID2D1GeometrySink *This,
  5251.         __in CONST D2D1_ARC_SEGMENT *arc
  5252.         ) PURE;
  5253. } ID2D1GeometrySinkVtbl;
  5254.  
  5255. interface ID2D1GeometrySink
  5256. {
  5257.     CONST struct ID2D1GeometrySinkVtbl *lpVtbl;
  5258. };
  5259.  
  5260.  
  5261. #define ID2D1GeometrySink_QueryInterface(This, riid, ppv) \
  5262.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5263.  
  5264. #define ID2D1GeometrySink_AddRef(This) \
  5265.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  5266.  
  5267. #define ID2D1GeometrySink_Release(This) \
  5268.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  5269.  
  5270. #define ID2D1GeometrySink_SetFillMode(This, fillMode) \
  5271.     ((This)->lpVtbl->Base.SetFillMode((ID2D1SimplifiedGeometrySink *)This, fillMode))
  5272.  
  5273. #define ID2D1GeometrySink_SetSegmentFlags(This, vertexFlags) \
  5274.     ((This)->lpVtbl->Base.SetSegmentFlags((ID2D1SimplifiedGeometrySink *)This, vertexFlags))
  5275.  
  5276. #define ID2D1GeometrySink_BeginFigure(This, startPoint, figureBegin) \
  5277.     ((This)->lpVtbl->Base.BeginFigure((ID2D1SimplifiedGeometrySink *)This, startPoint, figureBegin))
  5278.  
  5279. #define ID2D1GeometrySink_AddLines(This, points, pointsCount) \
  5280.     ((This)->lpVtbl->Base.AddLines((ID2D1SimplifiedGeometrySink *)This, points, pointsCount))
  5281.  
  5282. #define ID2D1GeometrySink_AddBeziers(This, beziers, beziersCount) \
  5283.     ((This)->lpVtbl->Base.AddBeziers((ID2D1SimplifiedGeometrySink *)This, beziers, beziersCount))
  5284.  
  5285. #define ID2D1GeometrySink_EndFigure(This, figureEnd) \
  5286.     ((This)->lpVtbl->Base.EndFigure((ID2D1SimplifiedGeometrySink *)This, figureEnd))
  5287.  
  5288. #define ID2D1GeometrySink_Close(This) \
  5289.     ((This)->lpVtbl->Base.Close((ID2D1SimplifiedGeometrySink *)This))
  5290.  
  5291. #define ID2D1GeometrySink_AddLine(This, point) \
  5292.     ((This)->lpVtbl->AddLine(This, point))
  5293.  
  5294. #define ID2D1GeometrySink_AddBezier(This, bezier) \
  5295.     ((This)->lpVtbl->AddBezier(This, bezier))
  5296.  
  5297. #define ID2D1GeometrySink_AddQuadraticBezier(This, bezier) \
  5298.     ((This)->lpVtbl->AddQuadraticBezier(This, bezier))
  5299.  
  5300. #define ID2D1GeometrySink_AddQuadraticBeziers(This, beziers, beziersCount) \
  5301.     ((This)->lpVtbl->AddQuadraticBeziers(This, beziers, beziersCount))
  5302.  
  5303. #define ID2D1GeometrySink_AddArc(This, arc) \
  5304.     ((This)->lpVtbl->AddArc(This, arc))
  5305.  
  5306. typedef interface ID2D1TessellationSink ID2D1TessellationSink;
  5307.  
  5308. typedef struct ID2D1TessellationSinkVtbl
  5309. {
  5310.    
  5311.     IUnknownVtbl Base;
  5312.    
  5313.    
  5314.     STDMETHOD_(void, AddTriangles)(
  5315.         ID2D1TessellationSink *This,
  5316.         __in_ecount(trianglesCount) CONST D2D1_TRIANGLE *triangles,
  5317.         UINT trianglesCount
  5318.         ) PURE;
  5319.    
  5320.     STDMETHOD(Close)(
  5321.         ID2D1TessellationSink *This
  5322.         ) PURE;
  5323. } ID2D1TessellationSinkVtbl;
  5324.  
  5325. interface ID2D1TessellationSink
  5326. {
  5327.     CONST struct ID2D1TessellationSinkVtbl *lpVtbl;
  5328. };
  5329.  
  5330.  
  5331. #define ID2D1TessellationSink_QueryInterface(This, riid, ppv) \
  5332.     ((This)->lpVtbl->Base.QueryInterface((IUnknown *)This, riid, ppv))
  5333.  
  5334. #define ID2D1TessellationSink_AddRef(This) \
  5335.     ((This)->lpVtbl->Base.AddRef((IUnknown *)This))
  5336.  
  5337. #define ID2D1TessellationSink_Release(This) \
  5338.     ((This)->lpVtbl->Base.Release((IUnknown *)This))
  5339.  
  5340. #define ID2D1TessellationSink_AddTriangles(This, triangles, trianglesCount) \
  5341.     ((This)->lpVtbl->AddTriangles(This, triangles, trianglesCount))
  5342.  
  5343. #define ID2D1TessellationSink_Close(This) \
  5344.     ((This)->lpVtbl->Close(This))
  5345.  
  5346. typedef interface ID2D1PathGeometry ID2D1PathGeometry;
  5347.  
  5348. typedef struct ID2D1PathGeometryVtbl
  5349. {
  5350.    
  5351.     ID2D1GeometryVtbl Base;
  5352.    
  5353.    
  5354.     STDMETHOD(Open)(
  5355.         ID2D1PathGeometry *This,
  5356.         __deref_out ID2D1GeometrySink **geometrySink
  5357.         ) PURE;
  5358.    
  5359.     STDMETHOD(Stream)(
  5360.         ID2D1PathGeometry *This,
  5361.         __in ID2D1GeometrySink *geometrySink
  5362.         ) PURE;
  5363.    
  5364.     STDMETHOD(GetSegmentCount)(
  5365.         ID2D1PathGeometry *This,
  5366.         __out UINT32 *count
  5367.         ) PURE;
  5368.    
  5369.     STDMETHOD(GetFigureCount)(
  5370.         ID2D1PathGeometry *This,
  5371.         __out UINT32 *count
  5372.         ) PURE;
  5373. } ID2D1PathGeometryVtbl;
  5374.  
  5375. interface ID2D1PathGeometry
  5376. {
  5377.     CONST struct ID2D1PathGeometryVtbl *lpVtbl;
  5378. };
  5379.  
  5380.  
  5381. #define ID2D1PathGeometry_QueryInterface(This, riid, ppv) \
  5382.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5383.  
  5384. #define ID2D1PathGeometry_AddRef(This) \
  5385.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  5386.  
  5387. #define ID2D1PathGeometry_Release(This) \
  5388.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  5389.  
  5390. #define ID2D1PathGeometry_GetFactory(This, factory) \
  5391.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  5392.  
  5393. #define ID2D1PathGeometry_GetBounds(This, worldTransform, bounds) \
  5394.     ((This)->lpVtbl->Base.GetBounds((ID2D1Geometry *)This, worldTransform, bounds))
  5395.  
  5396. #define ID2D1PathGeometry_GetWidenedBounds(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds) \
  5397.     ((This)->lpVtbl->Base.GetWidenedBounds((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, bounds))
  5398.  
  5399. #define ID2D1PathGeometry_StrokeContainsPoint(This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains) \
  5400.     ((This)->lpVtbl->Base.StrokeContainsPoint((ID2D1Geometry *)This, point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains))
  5401.  
  5402. #define ID2D1PathGeometry_FillContainsPoint(This, point, worldTransform, flatteningTolerance, contains) \
  5403.     ((This)->lpVtbl->Base.FillContainsPoint((ID2D1Geometry *)This, point, worldTransform, flatteningTolerance, contains))
  5404.  
  5405. #define ID2D1PathGeometry_CompareWithGeometry(This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation) \
  5406.     ((This)->lpVtbl->Base.CompareWithGeometry((ID2D1Geometry *)This, inputGeometry, inputGeometryTransform, flatteningTolerance, relation))
  5407.  
  5408. #define ID2D1PathGeometry_Simplify(This, simplificationOption, worldTransform, flatteningTolerance, geometrySink) \
  5409.     ((This)->lpVtbl->Base.Simplify((ID2D1Geometry *)This, simplificationOption, worldTransform, flatteningTolerance, geometrySink))
  5410.  
  5411. #define ID2D1PathGeometry_Tessellate(This, worldTransform, flatteningTolerance, tessellationSink) \
  5412.     ((This)->lpVtbl->Base.Tessellate((ID2D1Geometry *)This, worldTransform, flatteningTolerance, tessellationSink))
  5413.  
  5414. #define ID2D1PathGeometry_CombineWithGeometry(This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink) \
  5415.     ((This)->lpVtbl->Base.CombineWithGeometry((ID2D1Geometry *)This, inputGeometry, combineMode, inputGeometryTransform, flatteningTolerance, geometrySink))
  5416.  
  5417. #define ID2D1PathGeometry_Outline(This, worldTransform, flatteningTolerance, geometrySink) \
  5418.     ((This)->lpVtbl->Base.Outline((ID2D1Geometry *)This, worldTransform, flatteningTolerance, geometrySink))
  5419.  
  5420. #define ID2D1PathGeometry_ComputeArea(This, worldTransform, flatteningTolerance, area) \
  5421.     ((This)->lpVtbl->Base.ComputeArea((ID2D1Geometry *)This, worldTransform, flatteningTolerance, area))
  5422.  
  5423. #define ID2D1PathGeometry_ComputeLength(This, worldTransform, flatteningTolerance, length) \
  5424.     ((This)->lpVtbl->Base.ComputeLength((ID2D1Geometry *)This, worldTransform, flatteningTolerance, length))
  5425.  
  5426. #define ID2D1PathGeometry_ComputePointAtLength(This, length, worldTransform, flatteningTolerance, point, unitTangentVector) \
  5427.     ((This)->lpVtbl->Base.ComputePointAtLength((ID2D1Geometry *)This, length, worldTransform, flatteningTolerance, point, unitTangentVector))
  5428.  
  5429. #define ID2D1PathGeometry_Widen(This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink) \
  5430.     ((This)->lpVtbl->Base.Widen((ID2D1Geometry *)This, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, geometrySink))
  5431.  
  5432. #define ID2D1PathGeometry_Open(This, geometrySink) \
  5433.     ((This)->lpVtbl->Open(This, geometrySink))
  5434.  
  5435. #define ID2D1PathGeometry_Stream(This, geometrySink) \
  5436.     ((This)->lpVtbl->Stream(This, geometrySink))
  5437.  
  5438. #define ID2D1PathGeometry_GetSegmentCount(This, count) \
  5439.     ((This)->lpVtbl->GetSegmentCount(This, count))
  5440.  
  5441. #define ID2D1PathGeometry_GetFigureCount(This, count) \
  5442.     ((This)->lpVtbl->GetFigureCount(This, count))
  5443.  
  5444. typedef interface ID2D1Mesh ID2D1Mesh;
  5445.  
  5446. typedef struct ID2D1MeshVtbl
  5447. {
  5448.    
  5449.     ID2D1ResourceVtbl Base;
  5450.    
  5451.    
  5452.     STDMETHOD(Open)(
  5453.         ID2D1Mesh *This,
  5454.         __deref_out ID2D1TessellationSink **tessellationSink
  5455.         ) PURE;
  5456. } ID2D1MeshVtbl;
  5457.  
  5458. interface ID2D1Mesh
  5459. {
  5460.     CONST struct ID2D1MeshVtbl *lpVtbl;
  5461. };
  5462.  
  5463.  
  5464. #define ID2D1Mesh_QueryInterface(This, riid, ppv) \
  5465.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5466.  
  5467. #define ID2D1Mesh_AddRef(This) \
  5468.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  5469.  
  5470. #define ID2D1Mesh_Release(This) \
  5471.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  5472.  
  5473. #define ID2D1Mesh_GetFactory(This, factory) \
  5474.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  5475.  
  5476. #define ID2D1Mesh_Open(This, tessellationSink) \
  5477.     ((This)->lpVtbl->Open(This, tessellationSink))
  5478.  
  5479. typedef interface ID2D1Layer ID2D1Layer;
  5480.  
  5481. typedef struct ID2D1LayerVtbl
  5482. {
  5483.    
  5484.     ID2D1ResourceVtbl Base;
  5485.    
  5486.    
  5487.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  5488.         ID2D1Layer *This
  5489.         ) PURE;
  5490. } ID2D1LayerVtbl;
  5491.  
  5492. interface ID2D1Layer
  5493. {
  5494.     CONST struct ID2D1LayerVtbl *lpVtbl;
  5495. };
  5496.  
  5497.  
  5498. #define ID2D1Layer_QueryInterface(This, riid, ppv) \
  5499.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5500.  
  5501. #define ID2D1Layer_AddRef(This) \
  5502.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  5503.  
  5504. #define ID2D1Layer_Release(This) \
  5505.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  5506.  
  5507. #define ID2D1Layer_GetFactory(This, factory) \
  5508.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  5509.  
  5510. #define ID2D1Layer_GetSize(This) \
  5511.     ((This)->lpVtbl->GetSize(This))
  5512.  
  5513. typedef interface ID2D1DrawingStateBlock ID2D1DrawingStateBlock;
  5514.  
  5515. typedef struct ID2D1DrawingStateBlockVtbl
  5516. {
  5517.    
  5518.     ID2D1ResourceVtbl Base;
  5519.    
  5520.    
  5521.     STDMETHOD_(void, GetDescription)(
  5522.         ID2D1DrawingStateBlock *This,
  5523.         __out D2D1_DRAWING_STATE_DESCRIPTION *stateDescription
  5524.         ) PURE;
  5525.    
  5526.     STDMETHOD_(void, SetDescription)(
  5527.         ID2D1DrawingStateBlock *This,
  5528.         __in CONST D2D1_DRAWING_STATE_DESCRIPTION *stateDescription
  5529.         ) PURE;
  5530.    
  5531.     STDMETHOD_(void, SetTextRenderingParams)(
  5532.         ID2D1DrawingStateBlock *This,
  5533.         __in_opt IDWriteRenderingParams *textRenderingParams
  5534.         ) PURE;
  5535.    
  5536.     STDMETHOD_(void, GetTextRenderingParams)(
  5537.         ID2D1DrawingStateBlock *This,
  5538.         __deref_out_opt IDWriteRenderingParams **textRenderingParams
  5539.         ) PURE;
  5540. } ID2D1DrawingStateBlockVtbl;
  5541.  
  5542. interface ID2D1DrawingStateBlock
  5543. {
  5544.     CONST struct ID2D1DrawingStateBlockVtbl *lpVtbl;
  5545. };
  5546.  
  5547.  
  5548. #define ID2D1DrawingStateBlock_QueryInterface(This, riid, ppv) \
  5549.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5550.  
  5551. #define ID2D1DrawingStateBlock_AddRef(This) \
  5552.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  5553.  
  5554. #define ID2D1DrawingStateBlock_Release(This) \
  5555.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  5556.  
  5557. #define ID2D1DrawingStateBlock_GetFactory(This, factory) \
  5558.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  5559.  
  5560. #define ID2D1DrawingStateBlock_GetDescription(This, stateDescription) \
  5561.     ((This)->lpVtbl->GetDescription(This, stateDescription))
  5562.  
  5563. #define ID2D1DrawingStateBlock_SetDescription(This, stateDescription) \
  5564.     ((This)->lpVtbl->SetDescription(This, stateDescription))
  5565.  
  5566. #define ID2D1DrawingStateBlock_SetTextRenderingParams(This, textRenderingParams) \
  5567.     ((This)->lpVtbl->SetTextRenderingParams(This, textRenderingParams))
  5568.  
  5569. #define ID2D1DrawingStateBlock_GetTextRenderingParams(This, textRenderingParams) \
  5570.     ((This)->lpVtbl->GetTextRenderingParams(This, textRenderingParams))
  5571.  
  5572. typedef interface ID2D1RenderTarget ID2D1RenderTarget;
  5573.  
  5574. typedef struct ID2D1RenderTargetVtbl
  5575. {
  5576.    
  5577.     ID2D1ResourceVtbl Base;
  5578.    
  5579.    
  5580.     STDMETHOD(CreateBitmap)(
  5581.         ID2D1RenderTarget *This,
  5582.         D2D1_SIZE_U size,
  5583.         __in_opt CONST void *srcData,
  5584.         UINT32 pitch,
  5585.         __in CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  5586.         __deref_out ID2D1Bitmap **bitmap
  5587.         ) PURE;
  5588.    
  5589.     STDMETHOD(CreateBitmapFromWicBitmap)(
  5590.         ID2D1RenderTarget *This,
  5591.         __in IWICBitmapSource *wicBitmapSource,
  5592.         __in_opt CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  5593.         __deref_out ID2D1Bitmap **bitmap
  5594.         ) PURE;
  5595.    
  5596.     STDMETHOD(CreateSharedBitmap)(
  5597.         ID2D1RenderTarget *This,
  5598.         __in REFIID riid,
  5599.         __inout void *data,
  5600.         __in_opt CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
  5601.         __deref_out ID2D1Bitmap **bitmap
  5602.         ) PURE;
  5603.    
  5604.     STDMETHOD(CreateBitmapBrush)(
  5605.         ID2D1RenderTarget *This,
  5606.         __in ID2D1Bitmap *bitmap,
  5607.         __in_opt CONST D2D1_BITMAP_BRUSH_PROPERTIES *bitmapBrushProperties,
  5608.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  5609.         __deref_out ID2D1BitmapBrush **bitmapBrush
  5610.         ) PURE;
  5611.    
  5612.     STDMETHOD(CreateSolidColorBrush)(
  5613.         ID2D1RenderTarget *This,
  5614.         __in CONST D2D1_COLOR_F *color,
  5615.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  5616.         __deref_out ID2D1SolidColorBrush **solidColorBrush
  5617.         ) PURE;
  5618.    
  5619.     STDMETHOD(CreateGradientStopCollection)(
  5620.         ID2D1RenderTarget *This,
  5621.         __in_ecount(gradientStopsCount) CONST D2D1_GRADIENT_STOP *gradientStops,
  5622.         __range(>=,1) UINT gradientStopsCount,
  5623.         D2D1_GAMMA colorInterpolationGamma,
  5624.         D2D1_EXTEND_MODE extendMode,
  5625.         __deref_out ID2D1GradientStopCollection **gradientStopCollection
  5626.         ) PURE;
  5627.    
  5628.     STDMETHOD(CreateLinearGradientBrush)(
  5629.         ID2D1RenderTarget *This,
  5630.         __in CONST D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties,
  5631.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  5632.         __in ID2D1GradientStopCollection *gradientStopCollection,
  5633.         __deref_out ID2D1LinearGradientBrush **linearGradientBrush
  5634.         ) PURE;
  5635.    
  5636.     STDMETHOD(CreateRadialGradientBrush)(
  5637.         ID2D1RenderTarget *This,
  5638.         __in CONST D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *radialGradientBrushProperties,
  5639.         __in_opt CONST D2D1_BRUSH_PROPERTIES *brushProperties,
  5640.         __in ID2D1GradientStopCollection *gradientStopCollection,
  5641.         __deref_out ID2D1RadialGradientBrush **radialGradientBrush
  5642.         ) PURE;
  5643.    
  5644.     STDMETHOD(CreateCompatibleRenderTarget)(
  5645.         ID2D1RenderTarget *This,
  5646.         __in_opt CONST D2D1_SIZE_F *desiredSize,
  5647.         __in_opt CONST D2D1_SIZE_U *desiredPixelSize,
  5648.         __in_opt CONST D2D1_PIXEL_FORMAT *desiredFormat,
  5649.         D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,
  5650.         __deref_out ID2D1BitmapRenderTarget **bitmapRenderTarget
  5651.         ) PURE;
  5652.    
  5653.     STDMETHOD(CreateLayer)(
  5654.         ID2D1RenderTarget *This,
  5655.         __in_opt CONST D2D1_SIZE_F *size,
  5656.         __deref_out ID2D1Layer **layer
  5657.         ) PURE;
  5658.    
  5659.     STDMETHOD(CreateMesh)(
  5660.         ID2D1RenderTarget *This,
  5661.         __deref_out ID2D1Mesh **mesh
  5662.         ) PURE;
  5663.    
  5664.     STDMETHOD_(void, DrawLine)(
  5665.         ID2D1RenderTarget *This,
  5666.         D2D1_POINT_2F point0,
  5667.         D2D1_POINT_2F point1,
  5668.         __in ID2D1Brush *brush,
  5669.         FLOAT strokeWidth,
  5670.         __in_opt ID2D1StrokeStyle *strokeStyle
  5671.         ) PURE;
  5672.    
  5673.     STDMETHOD_(void, DrawRectangle)(
  5674.         ID2D1RenderTarget *This,
  5675.         __in CONST D2D1_RECT_F *rect,
  5676.         __in ID2D1Brush *brush,
  5677.         FLOAT strokeWidth,
  5678.         __in_opt ID2D1StrokeStyle *strokeStyle
  5679.         ) PURE;
  5680.    
  5681.     STDMETHOD_(void, FillRectangle)(
  5682.         ID2D1RenderTarget *This,
  5683.         __in CONST D2D1_RECT_F *rect,
  5684.         __in ID2D1Brush *brush
  5685.         ) PURE;
  5686.    
  5687.     STDMETHOD_(void, DrawRoundedRectangle)(
  5688.         ID2D1RenderTarget *This,
  5689.         __in CONST D2D1_ROUNDED_RECT *roundedRect,
  5690.         __in ID2D1Brush *brush,
  5691.         FLOAT strokeWidth,
  5692.         __in_opt ID2D1StrokeStyle *strokeStyle
  5693.         ) PURE;
  5694.    
  5695.     STDMETHOD_(void, FillRoundedRectangle)(
  5696.         ID2D1RenderTarget *This,
  5697.         __in CONST D2D1_ROUNDED_RECT *roundedRect,
  5698.         __in ID2D1Brush *brush
  5699.         ) PURE;
  5700.    
  5701.     STDMETHOD_(void, DrawEllipse)(
  5702.         ID2D1RenderTarget *This,
  5703.         __in CONST D2D1_ELLIPSE *ellipse,
  5704.         __in ID2D1Brush *brush,
  5705.         FLOAT strokeWidth,
  5706.         __in_opt ID2D1StrokeStyle *strokeStyle
  5707.         ) PURE;
  5708.    
  5709.     STDMETHOD_(void, FillEllipse)(
  5710.         ID2D1RenderTarget *This,
  5711.         __in CONST D2D1_ELLIPSE *ellipse,
  5712.         __in ID2D1Brush *brush
  5713.         ) PURE;
  5714.    
  5715.     STDMETHOD_(void, DrawGeometry)(
  5716.         ID2D1RenderTarget *This,
  5717.         __in ID2D1Geometry *geometry,
  5718.         __in ID2D1Brush *brush,
  5719.         FLOAT strokeWidth,
  5720.         __in_opt ID2D1StrokeStyle *strokeStyle
  5721.         ) PURE;
  5722.    
  5723.     STDMETHOD_(void, FillGeometry)(
  5724.         ID2D1RenderTarget *This,
  5725.         __in ID2D1Geometry *geometry,
  5726.         __in ID2D1Brush *brush,
  5727.         __in_opt ID2D1Brush *opacityBrush
  5728.         ) PURE;
  5729.    
  5730.     STDMETHOD_(void, FillMesh)(
  5731.         ID2D1RenderTarget *This,
  5732.         __in ID2D1Mesh *mesh,
  5733.         __in ID2D1Brush *brush
  5734.         ) PURE;
  5735.    
  5736.     STDMETHOD_(void, FillOpacityMask)(
  5737.         ID2D1RenderTarget *This,
  5738.         __in ID2D1Bitmap *opacityMask,
  5739.         __in ID2D1Brush *brush,
  5740.         D2D1_OPACITY_MASK_CONTENT content,
  5741.         __in_opt CONST D2D1_RECT_F *destinationRectangle,
  5742.         __in_opt CONST D2D1_RECT_F *sourceRectangle
  5743.         ) PURE;
  5744.    
  5745.     STDMETHOD_(void, DrawBitmap)(
  5746.         ID2D1RenderTarget *This,
  5747.         __in ID2D1Bitmap *bitmap,
  5748.         __in_opt CONST D2D1_RECT_F *destinationRectangle,
  5749.         FLOAT opacity,
  5750.         D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,
  5751.         __in_opt CONST D2D1_RECT_F *sourceRectangle
  5752.         ) PURE;
  5753.    
  5754.     STDMETHOD_(void, DrawText)(
  5755.         ID2D1RenderTarget *This,
  5756.         __in_ecount(stringLength) CONST WCHAR *string,
  5757.         UINT stringLength,
  5758.         __in IDWriteTextFormat *textFormat,
  5759.         __in CONST D2D1_RECT_F *layoutRect,
  5760.         __in ID2D1Brush *defaultForegroundBrush,
  5761.         D2D1_DRAW_TEXT_OPTIONS options,
  5762.         DWRITE_MEASURING_MODE measuringMode
  5763.         ) PURE;
  5764.    
  5765.     STDMETHOD_(void, DrawTextLayout)(
  5766.         ID2D1RenderTarget *This,
  5767.         D2D1_POINT_2F origin,
  5768.         __in IDWriteTextLayout *textLayout,
  5769.         __in ID2D1Brush *defaultForegroundBrush,
  5770.         D2D1_DRAW_TEXT_OPTIONS options
  5771.         ) PURE;
  5772.    
  5773.     STDMETHOD_(void, DrawGlyphRun)(
  5774.         ID2D1RenderTarget *This,
  5775.         D2D1_POINT_2F baselineOrigin,
  5776.         __in CONST DWRITE_GLYPH_RUN *glyphRun,
  5777.         __in ID2D1Brush *foregroundBrush,
  5778.         DWRITE_MEASURING_MODE measuringMode
  5779.         ) PURE;
  5780.    
  5781.     STDMETHOD_(void, SetTransform)(
  5782.         ID2D1RenderTarget *This,
  5783.         __in CONST D2D1_MATRIX_3X2_F *transform
  5784.         ) PURE;
  5785.    
  5786.     STDMETHOD_(void, GetTransform)(
  5787.         ID2D1RenderTarget *This,
  5788.         __out D2D1_MATRIX_3X2_F *transform
  5789.         ) PURE;
  5790.    
  5791.     STDMETHOD_(void, SetAntialiasMode)(
  5792.         ID2D1RenderTarget *This,
  5793.         D2D1_ANTIALIAS_MODE antialiasMode
  5794.         ) PURE;
  5795.    
  5796.     STDMETHOD_(D2D1_ANTIALIAS_MODE, GetAntialiasMode)(
  5797.         ID2D1RenderTarget *This
  5798.         ) PURE;
  5799.    
  5800.     STDMETHOD_(void, SetTextAntialiasMode)(
  5801.         ID2D1RenderTarget *This,
  5802.         D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode
  5803.         ) PURE;
  5804.    
  5805.     STDMETHOD_(D2D1_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)(
  5806.         ID2D1RenderTarget *This
  5807.         ) PURE;
  5808.    
  5809.     STDMETHOD_(void, SetTextRenderingParams)(
  5810.         ID2D1RenderTarget *This,
  5811.         __in_opt IDWriteRenderingParams *textRenderingParams
  5812.         ) PURE;
  5813.    
  5814.     STDMETHOD_(void, GetTextRenderingParams)(
  5815.         ID2D1RenderTarget *This,
  5816.         __deref_out_opt IDWriteRenderingParams **textRenderingParams
  5817.         ) PURE;
  5818.    
  5819.     STDMETHOD_(void, SetTags)(
  5820.         ID2D1RenderTarget *This,
  5821.         D2D1_TAG tag1,
  5822.         D2D1_TAG tag2
  5823.         ) PURE;
  5824.    
  5825.     STDMETHOD_(void, GetTags)(
  5826.         ID2D1RenderTarget *This,
  5827.         __out_opt D2D1_TAG *tag1,
  5828.         __out_opt D2D1_TAG *tag2
  5829.         ) PURE;
  5830.    
  5831.     STDMETHOD_(void, PushLayer)(
  5832.         ID2D1RenderTarget *This,
  5833.         __in CONST D2D1_LAYER_PARAMETERS *layerParameters,
  5834.         __in ID2D1Layer *layer
  5835.         ) PURE;
  5836.    
  5837.     STDMETHOD_(void, PopLayer)(
  5838.         ID2D1RenderTarget *This
  5839.         ) PURE;
  5840.    
  5841.     STDMETHOD(Flush)(
  5842.         ID2D1RenderTarget *This,
  5843.         __out_opt D2D1_TAG *tag1,
  5844.         __out_opt D2D1_TAG *tag2
  5845.         ) PURE;
  5846.    
  5847.     STDMETHOD_(void, SaveDrawingState)(
  5848.         ID2D1RenderTarget *This,
  5849.         __inout ID2D1DrawingStateBlock *drawingStateBlock
  5850.         ) PURE;
  5851.    
  5852.     STDMETHOD_(void, RestoreDrawingState)(
  5853.         ID2D1RenderTarget *This,
  5854.         __in ID2D1DrawingStateBlock *drawingStateBlock
  5855.         ) PURE;
  5856.    
  5857.     STDMETHOD_(void, PushAxisAlignedClip)(
  5858.         ID2D1RenderTarget *This,
  5859.         __in CONST D2D1_RECT_F *clipRect,
  5860.         D2D1_ANTIALIAS_MODE antialiasMode
  5861.         ) PURE;
  5862.    
  5863.     STDMETHOD_(void, PopAxisAlignedClip)(
  5864.         ID2D1RenderTarget *This
  5865.         ) PURE;
  5866.    
  5867.     STDMETHOD_(void, Clear)(
  5868.         ID2D1RenderTarget *This,
  5869.         __in_opt CONST D2D1_COLOR_F *clearColor
  5870.         ) PURE;
  5871.    
  5872.     STDMETHOD_(void, BeginDraw)(
  5873.         ID2D1RenderTarget *This
  5874.         ) PURE;
  5875.    
  5876.     STDMETHOD(EndDraw)(
  5877.         ID2D1RenderTarget *This,
  5878.         __out_opt D2D1_TAG *tag1,
  5879.         __out_opt D2D1_TAG *tag2
  5880.         ) PURE;
  5881.    
  5882.     STDMETHOD_(D2D1_PIXEL_FORMAT, GetPixelFormat)(
  5883.         ID2D1RenderTarget *This
  5884.         ) PURE;
  5885.    
  5886.     STDMETHOD_(void, SetDpi)(
  5887.         ID2D1RenderTarget *This,
  5888.         FLOAT dpiX,
  5889.         FLOAT dpiY
  5890.         ) PURE;
  5891.    
  5892.     STDMETHOD_(void, GetDpi)(
  5893.         ID2D1RenderTarget *This,
  5894.         __out FLOAT *dpiX,
  5895.         __out FLOAT *dpiY
  5896.         ) PURE;
  5897.    
  5898.     STDMETHOD_(D2D1_SIZE_F, GetSize)(
  5899.         ID2D1RenderTarget *This
  5900.         ) PURE;
  5901.    
  5902.     STDMETHOD_(D2D1_SIZE_U, GetPixelSize)(
  5903.         ID2D1RenderTarget *This
  5904.         ) PURE;
  5905.    
  5906.     STDMETHOD_(UINT32, GetMaximumBitmapSize)(
  5907.         ID2D1RenderTarget *This
  5908.         ) PURE;
  5909.    
  5910.     STDMETHOD_(BOOL, IsSupported)(
  5911.         ID2D1RenderTarget *This,
  5912.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties
  5913.         ) PURE;
  5914. } ID2D1RenderTargetVtbl;
  5915.  
  5916. interface ID2D1RenderTarget
  5917. {
  5918.     CONST struct ID2D1RenderTargetVtbl *lpVtbl;
  5919. };
  5920.  
  5921.  
  5922. #define ID2D1RenderTarget_QueryInterface(This, riid, ppv) \
  5923.     ((This)->lpVtbl->Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  5924.  
  5925. #define ID2D1RenderTarget_AddRef(This) \
  5926.     ((This)->lpVtbl->Base.Base.AddRef((IUnknown *)This))
  5927.  
  5928. #define ID2D1RenderTarget_Release(This) \
  5929.     ((This)->lpVtbl->Base.Base.Release((IUnknown *)This))
  5930.  
  5931. #define ID2D1RenderTarget_GetFactory(This, factory) \
  5932.     ((This)->lpVtbl->Base.GetFactory((ID2D1Resource *)This, factory))
  5933.  
  5934. #define ID2D1RenderTarget_CreateBitmap(This, size, srcData, pitch, bitmapProperties, bitmap) \
  5935.     ((This)->lpVtbl->CreateBitmap(This, size, srcData, pitch, bitmapProperties, bitmap))
  5936.  
  5937. #define ID2D1RenderTarget_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \
  5938.     ((This)->lpVtbl->CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap))
  5939.  
  5940. #define ID2D1RenderTarget_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \
  5941.     ((This)->lpVtbl->CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap))
  5942.  
  5943. #define ID2D1RenderTarget_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \
  5944.     ((This)->lpVtbl->CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush))
  5945.  
  5946. #define ID2D1RenderTarget_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \
  5947.     ((This)->lpVtbl->CreateSolidColorBrush(This, color, brushProperties, solidColorBrush))
  5948.  
  5949. #define ID2D1RenderTarget_CreateGradientStopCollection(This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection) \
  5950.     ((This)->lpVtbl->CreateGradientStopCollection(This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection))
  5951.  
  5952. #define ID2D1RenderTarget_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \
  5953.     ((This)->lpVtbl->CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush))
  5954.  
  5955. #define ID2D1RenderTarget_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \
  5956.     ((This)->lpVtbl->CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush))
  5957.  
  5958. #define ID2D1RenderTarget_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \
  5959.     ((This)->lpVtbl->CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget))
  5960.  
  5961. #define ID2D1RenderTarget_CreateLayer(This, size, layer) \
  5962.     ((This)->lpVtbl->CreateLayer(This, size, layer))
  5963.  
  5964. #define ID2D1RenderTarget_CreateMesh(This, mesh) \
  5965.     ((This)->lpVtbl->CreateMesh(This, mesh))
  5966.  
  5967. #define ID2D1RenderTarget_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
  5968.     ((This)->lpVtbl->DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle))
  5969.  
  5970. #define ID2D1RenderTarget_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
  5971.     ((This)->lpVtbl->DrawRectangle(This, rect, brush, strokeWidth, strokeStyle))
  5972.  
  5973. #define ID2D1RenderTarget_FillRectangle(This, rect, brush) \
  5974.     ((This)->lpVtbl->FillRectangle(This, rect, brush))
  5975.  
  5976. #define ID2D1RenderTarget_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \
  5977.     ((This)->lpVtbl->DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle))
  5978.  
  5979. #define ID2D1RenderTarget_FillRoundedRectangle(This, roundedRect, brush) \
  5980.     ((This)->lpVtbl->FillRoundedRectangle(This, roundedRect, brush))
  5981.  
  5982. #define ID2D1RenderTarget_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \
  5983.     ((This)->lpVtbl->DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle))
  5984.  
  5985. #define ID2D1RenderTarget_FillEllipse(This, ellipse, brush) \
  5986.     ((This)->lpVtbl->FillEllipse(This, ellipse, brush))
  5987.  
  5988. #define ID2D1RenderTarget_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
  5989.     ((This)->lpVtbl->DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle))
  5990.  
  5991. #define ID2D1RenderTarget_FillGeometry(This, geometry, brush, opacityBrush) \
  5992.     ((This)->lpVtbl->FillGeometry(This, geometry, brush, opacityBrush))
  5993.  
  5994. #define ID2D1RenderTarget_FillMesh(This, mesh, brush) \
  5995.     ((This)->lpVtbl->FillMesh(This, mesh, brush))
  5996.  
  5997. #define ID2D1RenderTarget_FillOpacityMask(This, opacityMask, brush, content, destinationRectangle, sourceRectangle) \
  5998.     ((This)->lpVtbl->FillOpacityMask(This, opacityMask, brush, content, destinationRectangle, sourceRectangle))
  5999.  
  6000. #define ID2D1RenderTarget_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle) \
  6001.     ((This)->lpVtbl->DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle))
  6002.  
  6003. #define ID2D1RenderTarget_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \
  6004.     ((This)->lpVtbl->DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode))
  6005.  
  6006. #define ID2D1RenderTarget_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \
  6007.     ((This)->lpVtbl->DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options))
  6008.  
  6009. #define ID2D1RenderTarget_DrawGlyphRun(This, baselineOrigin, glyphRun, foregroundBrush, measuringMode) \
  6010.     ((This)->lpVtbl->DrawGlyphRun(This, baselineOrigin, glyphRun, foregroundBrush, measuringMode))
  6011.  
  6012. #define ID2D1RenderTarget_SetTransform(This, transform) \
  6013.     ((This)->lpVtbl->SetTransform(This, transform))
  6014.  
  6015. #define ID2D1RenderTarget_GetTransform(This, transform) \
  6016.     ((This)->lpVtbl->GetTransform(This, transform))
  6017.  
  6018. #define ID2D1RenderTarget_SetAntialiasMode(This, antialiasMode) \
  6019.     ((This)->lpVtbl->SetAntialiasMode(This, antialiasMode))
  6020.  
  6021. #define ID2D1RenderTarget_GetAntialiasMode(This) \
  6022.     ((This)->lpVtbl->GetAntialiasMode(This))
  6023.  
  6024. #define ID2D1RenderTarget_SetTextAntialiasMode(This, textAntialiasMode) \
  6025.     ((This)->lpVtbl->SetTextAntialiasMode(This, textAntialiasMode))
  6026.  
  6027. #define ID2D1RenderTarget_GetTextAntialiasMode(This) \
  6028.     ((This)->lpVtbl->GetTextAntialiasMode(This))
  6029.  
  6030. #define ID2D1RenderTarget_SetTextRenderingParams(This, textRenderingParams) \
  6031.     ((This)->lpVtbl->SetTextRenderingParams(This, textRenderingParams))
  6032.  
  6033. #define ID2D1RenderTarget_GetTextRenderingParams(This, textRenderingParams) \
  6034.     ((This)->lpVtbl->GetTextRenderingParams(This, textRenderingParams))
  6035.  
  6036. #define ID2D1RenderTarget_SetTags(This, tag1, tag2) \
  6037.     ((This)->lpVtbl->SetTags(This, tag1, tag2))
  6038.  
  6039. #define ID2D1RenderTarget_GetTags(This, tag1, tag2) \
  6040.     ((This)->lpVtbl->GetTags(This, tag1, tag2))
  6041.  
  6042. #define ID2D1RenderTarget_PushLayer(This, layerParameters, layer) \
  6043.     ((This)->lpVtbl->PushLayer(This, layerParameters, layer))
  6044.  
  6045. #define ID2D1RenderTarget_PopLayer(This) \
  6046.     ((This)->lpVtbl->PopLayer(This))
  6047.  
  6048. #define ID2D1RenderTarget_Flush(This, tag1, tag2) \
  6049.     ((This)->lpVtbl->Flush(This, tag1, tag2))
  6050.  
  6051. #define ID2D1RenderTarget_SaveDrawingState(This, drawingStateBlock) \
  6052.     ((This)->lpVtbl->SaveDrawingState(This, drawingStateBlock))
  6053.  
  6054. #define ID2D1RenderTarget_RestoreDrawingState(This, drawingStateBlock) \
  6055.     ((This)->lpVtbl->RestoreDrawingState(This, drawingStateBlock))
  6056.  
  6057. #define ID2D1RenderTarget_PushAxisAlignedClip(This, clipRect, antialiasMode) \
  6058.     ((This)->lpVtbl->PushAxisAlignedClip(This, clipRect, antialiasMode))
  6059.  
  6060. #define ID2D1RenderTarget_PopAxisAlignedClip(This) \
  6061.     ((This)->lpVtbl->PopAxisAlignedClip(This))
  6062.  
  6063. #define ID2D1RenderTarget_Clear(This, clearColor) \
  6064.     ((This)->lpVtbl->Clear(This, clearColor))
  6065.  
  6066. #define ID2D1RenderTarget_BeginDraw(This) \
  6067.     ((This)->lpVtbl->BeginDraw(This))
  6068.  
  6069. #define ID2D1RenderTarget_EndDraw(This, tag1, tag2) \
  6070.     ((This)->lpVtbl->EndDraw(This, tag1, tag2))
  6071.  
  6072. #define ID2D1RenderTarget_GetPixelFormat(This) \
  6073.     ((This)->lpVtbl->GetPixelFormat(This))
  6074.  
  6075. #define ID2D1RenderTarget_SetDpi(This, dpiX, dpiY) \
  6076.     ((This)->lpVtbl->SetDpi(This, dpiX, dpiY))
  6077.  
  6078. #define ID2D1RenderTarget_GetDpi(This, dpiX, dpiY) \
  6079.     ((This)->lpVtbl->GetDpi(This, dpiX, dpiY))
  6080.  
  6081. #define ID2D1RenderTarget_GetSize(This) \
  6082.     ((This)->lpVtbl->GetSize(This))
  6083.  
  6084. #define ID2D1RenderTarget_GetPixelSize(This) \
  6085.     ((This)->lpVtbl->GetPixelSize(This))
  6086.  
  6087. #define ID2D1RenderTarget_GetMaximumBitmapSize(This) \
  6088.     ((This)->lpVtbl->GetMaximumBitmapSize(This))
  6089.  
  6090. #define ID2D1RenderTarget_IsSupported(This, renderTargetProperties) \
  6091.     ((This)->lpVtbl->IsSupported(This, renderTargetProperties))
  6092.  
  6093. typedef interface ID2D1BitmapRenderTarget ID2D1BitmapRenderTarget;
  6094.  
  6095. typedef struct ID2D1BitmapRenderTargetVtbl
  6096. {
  6097.    
  6098.     ID2D1RenderTargetVtbl Base;
  6099.    
  6100.    
  6101.     STDMETHOD(GetBitmap)(
  6102.         ID2D1BitmapRenderTarget *This,
  6103.         __deref_out ID2D1Bitmap **bitmap
  6104.         ) PURE;
  6105. } ID2D1BitmapRenderTargetVtbl;
  6106.  
  6107. interface ID2D1BitmapRenderTarget
  6108. {
  6109.     CONST struct ID2D1BitmapRenderTargetVtbl *lpVtbl;
  6110. };
  6111.  
  6112.  
  6113. #define ID2D1BitmapRenderTarget_QueryInterface(This, riid, ppv) \
  6114.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  6115.  
  6116. #define ID2D1BitmapRenderTarget_AddRef(This) \
  6117.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  6118.  
  6119. #define ID2D1BitmapRenderTarget_Release(This) \
  6120.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  6121.  
  6122. #define ID2D1BitmapRenderTarget_GetFactory(This, factory) \
  6123.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  6124.  
  6125. #define ID2D1BitmapRenderTarget_CreateBitmap(This, size, srcData, pitch, bitmapProperties, bitmap) \
  6126.     ((This)->lpVtbl->Base.CreateBitmap((ID2D1RenderTarget *)This, size, srcData, pitch, bitmapProperties, bitmap))
  6127.  
  6128. #define ID2D1BitmapRenderTarget_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \
  6129.     ((This)->lpVtbl->Base.CreateBitmapFromWicBitmap((ID2D1RenderTarget *)This, wicBitmapSource, bitmapProperties, bitmap))
  6130.  
  6131. #define ID2D1BitmapRenderTarget_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \
  6132.     ((This)->lpVtbl->Base.CreateSharedBitmap((ID2D1RenderTarget *)This, riid, data, bitmapProperties, bitmap))
  6133.  
  6134. #define ID2D1BitmapRenderTarget_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \
  6135.     ((This)->lpVtbl->Base.CreateBitmapBrush((ID2D1RenderTarget *)This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush))
  6136.  
  6137. #define ID2D1BitmapRenderTarget_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \
  6138.     ((This)->lpVtbl->Base.CreateSolidColorBrush((ID2D1RenderTarget *)This, color, brushProperties, solidColorBrush))
  6139.  
  6140. #define ID2D1BitmapRenderTarget_CreateGradientStopCollection(This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection) \
  6141.     ((This)->lpVtbl->Base.CreateGradientStopCollection((ID2D1RenderTarget *)This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection))
  6142.  
  6143. #define ID2D1BitmapRenderTarget_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \
  6144.     ((This)->lpVtbl->Base.CreateLinearGradientBrush((ID2D1RenderTarget *)This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush))
  6145.  
  6146. #define ID2D1BitmapRenderTarget_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \
  6147.     ((This)->lpVtbl->Base.CreateRadialGradientBrush((ID2D1RenderTarget *)This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush))
  6148.  
  6149. #define ID2D1BitmapRenderTarget_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \
  6150.     ((This)->lpVtbl->Base.CreateCompatibleRenderTarget((ID2D1RenderTarget *)This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget))
  6151.  
  6152. #define ID2D1BitmapRenderTarget_CreateLayer(This, size, layer) \
  6153.     ((This)->lpVtbl->Base.CreateLayer((ID2D1RenderTarget *)This, size, layer))
  6154.  
  6155. #define ID2D1BitmapRenderTarget_CreateMesh(This, mesh) \
  6156.     ((This)->lpVtbl->Base.CreateMesh((ID2D1RenderTarget *)This, mesh))
  6157.  
  6158. #define ID2D1BitmapRenderTarget_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
  6159.     ((This)->lpVtbl->Base.DrawLine((ID2D1RenderTarget *)This, point0, point1, brush, strokeWidth, strokeStyle))
  6160.  
  6161. #define ID2D1BitmapRenderTarget_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
  6162.     ((This)->lpVtbl->Base.DrawRectangle((ID2D1RenderTarget *)This, rect, brush, strokeWidth, strokeStyle))
  6163.  
  6164. #define ID2D1BitmapRenderTarget_FillRectangle(This, rect, brush) \
  6165.     ((This)->lpVtbl->Base.FillRectangle((ID2D1RenderTarget *)This, rect, brush))
  6166.  
  6167. #define ID2D1BitmapRenderTarget_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \
  6168.     ((This)->lpVtbl->Base.DrawRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush, strokeWidth, strokeStyle))
  6169.  
  6170. #define ID2D1BitmapRenderTarget_FillRoundedRectangle(This, roundedRect, brush) \
  6171.     ((This)->lpVtbl->Base.FillRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush))
  6172.  
  6173. #define ID2D1BitmapRenderTarget_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \
  6174.     ((This)->lpVtbl->Base.DrawEllipse((ID2D1RenderTarget *)This, ellipse, brush, strokeWidth, strokeStyle))
  6175.  
  6176. #define ID2D1BitmapRenderTarget_FillEllipse(This, ellipse, brush) \
  6177.     ((This)->lpVtbl->Base.FillEllipse((ID2D1RenderTarget *)This, ellipse, brush))
  6178.  
  6179. #define ID2D1BitmapRenderTarget_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
  6180.     ((This)->lpVtbl->Base.DrawGeometry((ID2D1RenderTarget *)This, geometry, brush, strokeWidth, strokeStyle))
  6181.  
  6182. #define ID2D1BitmapRenderTarget_FillGeometry(This, geometry, brush, opacityBrush) \
  6183.     ((This)->lpVtbl->Base.FillGeometry((ID2D1RenderTarget *)This, geometry, brush, opacityBrush))
  6184.  
  6185. #define ID2D1BitmapRenderTarget_FillMesh(This, mesh, brush) \
  6186.     ((This)->lpVtbl->Base.FillMesh((ID2D1RenderTarget *)This, mesh, brush))
  6187.  
  6188. #define ID2D1BitmapRenderTarget_FillOpacityMask(This, opacityMask, brush, content, destinationRectangle, sourceRectangle) \
  6189.     ((This)->lpVtbl->Base.FillOpacityMask((ID2D1RenderTarget *)This, opacityMask, brush, content, destinationRectangle, sourceRectangle))
  6190.  
  6191. #define ID2D1BitmapRenderTarget_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle) \
  6192.     ((This)->lpVtbl->Base.DrawBitmap((ID2D1RenderTarget *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle))
  6193.  
  6194. #define ID2D1BitmapRenderTarget_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \
  6195.     ((This)->lpVtbl->Base.DrawText((ID2D1RenderTarget *)This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode))
  6196.  
  6197. #define ID2D1BitmapRenderTarget_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \
  6198.     ((This)->lpVtbl->Base.DrawTextLayout((ID2D1RenderTarget *)This, origin, textLayout, defaultForegroundBrush, options))
  6199.  
  6200. #define ID2D1BitmapRenderTarget_DrawGlyphRun(This, baselineOrigin, glyphRun, foregroundBrush, measuringMode) \
  6201.     ((This)->lpVtbl->Base.DrawGlyphRun((ID2D1RenderTarget *)This, baselineOrigin, glyphRun, foregroundBrush, measuringMode))
  6202.  
  6203. #define ID2D1BitmapRenderTarget_SetTransform(This, transform) \
  6204.     ((This)->lpVtbl->Base.SetTransform((ID2D1RenderTarget *)This, transform))
  6205.  
  6206. #define ID2D1BitmapRenderTarget_GetTransform(This, transform) \
  6207.     ((This)->lpVtbl->Base.GetTransform((ID2D1RenderTarget *)This, transform))
  6208.  
  6209. #define ID2D1BitmapRenderTarget_SetAntialiasMode(This, antialiasMode) \
  6210.     ((This)->lpVtbl->Base.SetAntialiasMode((ID2D1RenderTarget *)This, antialiasMode))
  6211.  
  6212. #define ID2D1BitmapRenderTarget_GetAntialiasMode(This) \
  6213.     ((This)->lpVtbl->Base.GetAntialiasMode((ID2D1RenderTarget *)This))
  6214.  
  6215. #define ID2D1BitmapRenderTarget_SetTextAntialiasMode(This, textAntialiasMode) \
  6216.     ((This)->lpVtbl->Base.SetTextAntialiasMode((ID2D1RenderTarget *)This, textAntialiasMode))
  6217.  
  6218. #define ID2D1BitmapRenderTarget_GetTextAntialiasMode(This) \
  6219.     ((This)->lpVtbl->Base.GetTextAntialiasMode((ID2D1RenderTarget *)This))
  6220.  
  6221. #define ID2D1BitmapRenderTarget_SetTextRenderingParams(This, textRenderingParams) \
  6222.     ((This)->lpVtbl->Base.SetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6223.  
  6224. #define ID2D1BitmapRenderTarget_GetTextRenderingParams(This, textRenderingParams) \
  6225.     ((This)->lpVtbl->Base.GetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6226.  
  6227. #define ID2D1BitmapRenderTarget_SetTags(This, tag1, tag2) \
  6228.     ((This)->lpVtbl->Base.SetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6229.  
  6230. #define ID2D1BitmapRenderTarget_GetTags(This, tag1, tag2) \
  6231.     ((This)->lpVtbl->Base.GetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6232.  
  6233. #define ID2D1BitmapRenderTarget_PushLayer(This, layerParameters, layer) \
  6234.     ((This)->lpVtbl->Base.PushLayer((ID2D1RenderTarget *)This, layerParameters, layer))
  6235.  
  6236. #define ID2D1BitmapRenderTarget_PopLayer(This) \
  6237.     ((This)->lpVtbl->Base.PopLayer((ID2D1RenderTarget *)This))
  6238.  
  6239. #define ID2D1BitmapRenderTarget_Flush(This, tag1, tag2) \
  6240.     ((This)->lpVtbl->Base.Flush((ID2D1RenderTarget *)This, tag1, tag2))
  6241.  
  6242. #define ID2D1BitmapRenderTarget_SaveDrawingState(This, drawingStateBlock) \
  6243.     ((This)->lpVtbl->Base.SaveDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6244.  
  6245. #define ID2D1BitmapRenderTarget_RestoreDrawingState(This, drawingStateBlock) \
  6246.     ((This)->lpVtbl->Base.RestoreDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6247.  
  6248. #define ID2D1BitmapRenderTarget_PushAxisAlignedClip(This, clipRect, antialiasMode) \
  6249.     ((This)->lpVtbl->Base.PushAxisAlignedClip((ID2D1RenderTarget *)This, clipRect, antialiasMode))
  6250.  
  6251. #define ID2D1BitmapRenderTarget_PopAxisAlignedClip(This) \
  6252.     ((This)->lpVtbl->Base.PopAxisAlignedClip((ID2D1RenderTarget *)This))
  6253.  
  6254. #define ID2D1BitmapRenderTarget_Clear(This, clearColor) \
  6255.     ((This)->lpVtbl->Base.Clear((ID2D1RenderTarget *)This, clearColor))
  6256.  
  6257. #define ID2D1BitmapRenderTarget_BeginDraw(This) \
  6258.     ((This)->lpVtbl->Base.BeginDraw((ID2D1RenderTarget *)This))
  6259.  
  6260. #define ID2D1BitmapRenderTarget_EndDraw(This, tag1, tag2) \
  6261.     ((This)->lpVtbl->Base.EndDraw((ID2D1RenderTarget *)This, tag1, tag2))
  6262.  
  6263. #define ID2D1BitmapRenderTarget_GetPixelFormat(This) \
  6264.     ((This)->lpVtbl->Base.GetPixelFormat((ID2D1RenderTarget *)This))
  6265.  
  6266. #define ID2D1BitmapRenderTarget_SetDpi(This, dpiX, dpiY) \
  6267.     ((This)->lpVtbl->Base.SetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6268.  
  6269. #define ID2D1BitmapRenderTarget_GetDpi(This, dpiX, dpiY) \
  6270.     ((This)->lpVtbl->Base.GetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6271.  
  6272. #define ID2D1BitmapRenderTarget_GetSize(This) \
  6273.     ((This)->lpVtbl->Base.GetSize((ID2D1RenderTarget *)This))
  6274.  
  6275. #define ID2D1BitmapRenderTarget_GetPixelSize(This) \
  6276.     ((This)->lpVtbl->Base.GetPixelSize((ID2D1RenderTarget *)This))
  6277.  
  6278. #define ID2D1BitmapRenderTarget_GetMaximumBitmapSize(This) \
  6279.     ((This)->lpVtbl->Base.GetMaximumBitmapSize((ID2D1RenderTarget *)This))
  6280.  
  6281. #define ID2D1BitmapRenderTarget_IsSupported(This, renderTargetProperties) \
  6282.     ((This)->lpVtbl->Base.IsSupported((ID2D1RenderTarget *)This, renderTargetProperties))
  6283.  
  6284. #define ID2D1BitmapRenderTarget_GetBitmap(This, bitmap) \
  6285.     ((This)->lpVtbl->GetBitmap(This, bitmap))
  6286.  
  6287. typedef interface ID2D1HwndRenderTarget ID2D1HwndRenderTarget;
  6288.  
  6289. typedef struct ID2D1HwndRenderTargetVtbl
  6290. {
  6291.    
  6292.     ID2D1RenderTargetVtbl Base;
  6293.    
  6294.    
  6295.     STDMETHOD_(D2D1_WINDOW_STATE, CheckWindowState)(
  6296.         ID2D1HwndRenderTarget *This
  6297.         ) PURE;
  6298.    
  6299.     STDMETHOD(Resize)(
  6300.         ID2D1HwndRenderTarget *This,
  6301.         __in CONST D2D1_SIZE_U *pixelSize
  6302.         ) PURE;
  6303.    
  6304.     STDMETHOD_(HWND, GetHwnd)(
  6305.         ID2D1HwndRenderTarget *This
  6306.         ) PURE;
  6307. } ID2D1HwndRenderTargetVtbl;
  6308.  
  6309. interface ID2D1HwndRenderTarget
  6310. {
  6311.     CONST struct ID2D1HwndRenderTargetVtbl *lpVtbl;
  6312. };
  6313.  
  6314.  
  6315. #define ID2D1HwndRenderTarget_QueryInterface(This, riid, ppv) \
  6316.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  6317.  
  6318. #define ID2D1HwndRenderTarget_AddRef(This) \
  6319.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  6320.  
  6321. #define ID2D1HwndRenderTarget_Release(This) \
  6322.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  6323.  
  6324. #define ID2D1HwndRenderTarget_GetFactory(This, factory) \
  6325.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  6326.  
  6327. #define ID2D1HwndRenderTarget_CreateBitmap(This, size, srcData, pitch, bitmapProperties, bitmap) \
  6328.     ((This)->lpVtbl->Base.CreateBitmap((ID2D1RenderTarget *)This, size, srcData, pitch, bitmapProperties, bitmap))
  6329.  
  6330. #define ID2D1HwndRenderTarget_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \
  6331.     ((This)->lpVtbl->Base.CreateBitmapFromWicBitmap((ID2D1RenderTarget *)This, wicBitmapSource, bitmapProperties, bitmap))
  6332.  
  6333. #define ID2D1HwndRenderTarget_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \
  6334.     ((This)->lpVtbl->Base.CreateSharedBitmap((ID2D1RenderTarget *)This, riid, data, bitmapProperties, bitmap))
  6335.  
  6336. #define ID2D1HwndRenderTarget_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \
  6337.     ((This)->lpVtbl->Base.CreateBitmapBrush((ID2D1RenderTarget *)This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush))
  6338.  
  6339. #define ID2D1HwndRenderTarget_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \
  6340.     ((This)->lpVtbl->Base.CreateSolidColorBrush((ID2D1RenderTarget *)This, color, brushProperties, solidColorBrush))
  6341.  
  6342. #define ID2D1HwndRenderTarget_CreateGradientStopCollection(This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection) \
  6343.     ((This)->lpVtbl->Base.CreateGradientStopCollection((ID2D1RenderTarget *)This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection))
  6344.  
  6345. #define ID2D1HwndRenderTarget_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \
  6346.     ((This)->lpVtbl->Base.CreateLinearGradientBrush((ID2D1RenderTarget *)This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush))
  6347.  
  6348. #define ID2D1HwndRenderTarget_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \
  6349.     ((This)->lpVtbl->Base.CreateRadialGradientBrush((ID2D1RenderTarget *)This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush))
  6350.  
  6351. #define ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \
  6352.     ((This)->lpVtbl->Base.CreateCompatibleRenderTarget((ID2D1RenderTarget *)This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget))
  6353.  
  6354. #define ID2D1HwndRenderTarget_CreateLayer(This, size, layer) \
  6355.     ((This)->lpVtbl->Base.CreateLayer((ID2D1RenderTarget *)This, size, layer))
  6356.  
  6357. #define ID2D1HwndRenderTarget_CreateMesh(This, mesh) \
  6358.     ((This)->lpVtbl->Base.CreateMesh((ID2D1RenderTarget *)This, mesh))
  6359.  
  6360. #define ID2D1HwndRenderTarget_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
  6361.     ((This)->lpVtbl->Base.DrawLine((ID2D1RenderTarget *)This, point0, point1, brush, strokeWidth, strokeStyle))
  6362.  
  6363. #define ID2D1HwndRenderTarget_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
  6364.     ((This)->lpVtbl->Base.DrawRectangle((ID2D1RenderTarget *)This, rect, brush, strokeWidth, strokeStyle))
  6365.  
  6366. #define ID2D1HwndRenderTarget_FillRectangle(This, rect, brush) \
  6367.     ((This)->lpVtbl->Base.FillRectangle((ID2D1RenderTarget *)This, rect, brush))
  6368.  
  6369. #define ID2D1HwndRenderTarget_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \
  6370.     ((This)->lpVtbl->Base.DrawRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush, strokeWidth, strokeStyle))
  6371.  
  6372. #define ID2D1HwndRenderTarget_FillRoundedRectangle(This, roundedRect, brush) \
  6373.     ((This)->lpVtbl->Base.FillRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush))
  6374.  
  6375. #define ID2D1HwndRenderTarget_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \
  6376.     ((This)->lpVtbl->Base.DrawEllipse((ID2D1RenderTarget *)This, ellipse, brush, strokeWidth, strokeStyle))
  6377.  
  6378. #define ID2D1HwndRenderTarget_FillEllipse(This, ellipse, brush) \
  6379.     ((This)->lpVtbl->Base.FillEllipse((ID2D1RenderTarget *)This, ellipse, brush))
  6380.  
  6381. #define ID2D1HwndRenderTarget_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
  6382.     ((This)->lpVtbl->Base.DrawGeometry((ID2D1RenderTarget *)This, geometry, brush, strokeWidth, strokeStyle))
  6383.  
  6384. #define ID2D1HwndRenderTarget_FillGeometry(This, geometry, brush, opacityBrush) \
  6385.     ((This)->lpVtbl->Base.FillGeometry((ID2D1RenderTarget *)This, geometry, brush, opacityBrush))
  6386.  
  6387. #define ID2D1HwndRenderTarget_FillMesh(This, mesh, brush) \
  6388.     ((This)->lpVtbl->Base.FillMesh((ID2D1RenderTarget *)This, mesh, brush))
  6389.  
  6390. #define ID2D1HwndRenderTarget_FillOpacityMask(This, opacityMask, brush, content, destinationRectangle, sourceRectangle) \
  6391.     ((This)->lpVtbl->Base.FillOpacityMask((ID2D1RenderTarget *)This, opacityMask, brush, content, destinationRectangle, sourceRectangle))
  6392.  
  6393. #define ID2D1HwndRenderTarget_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle) \
  6394.     ((This)->lpVtbl->Base.DrawBitmap((ID2D1RenderTarget *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle))
  6395.  
  6396. #define ID2D1HwndRenderTarget_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \
  6397.     ((This)->lpVtbl->Base.DrawText((ID2D1RenderTarget *)This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode))
  6398.  
  6399. #define ID2D1HwndRenderTarget_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \
  6400.     ((This)->lpVtbl->Base.DrawTextLayout((ID2D1RenderTarget *)This, origin, textLayout, defaultForegroundBrush, options))
  6401.  
  6402. #define ID2D1HwndRenderTarget_DrawGlyphRun(This, baselineOrigin, glyphRun, foregroundBrush, measuringMode) \
  6403.     ((This)->lpVtbl->Base.DrawGlyphRun((ID2D1RenderTarget *)This, baselineOrigin, glyphRun, foregroundBrush, measuringMode))
  6404.  
  6405. #define ID2D1HwndRenderTarget_SetTransform(This, transform) \
  6406.     ((This)->lpVtbl->Base.SetTransform((ID2D1RenderTarget *)This, transform))
  6407.  
  6408. #define ID2D1HwndRenderTarget_GetTransform(This, transform) \
  6409.     ((This)->lpVtbl->Base.GetTransform((ID2D1RenderTarget *)This, transform))
  6410.  
  6411. #define ID2D1HwndRenderTarget_SetAntialiasMode(This, antialiasMode) \
  6412.     ((This)->lpVtbl->Base.SetAntialiasMode((ID2D1RenderTarget *)This, antialiasMode))
  6413.  
  6414. #define ID2D1HwndRenderTarget_GetAntialiasMode(This) \
  6415.     ((This)->lpVtbl->Base.GetAntialiasMode((ID2D1RenderTarget *)This))
  6416.  
  6417. #define ID2D1HwndRenderTarget_SetTextAntialiasMode(This, textAntialiasMode) \
  6418.     ((This)->lpVtbl->Base.SetTextAntialiasMode((ID2D1RenderTarget *)This, textAntialiasMode))
  6419.  
  6420. #define ID2D1HwndRenderTarget_GetTextAntialiasMode(This) \
  6421.     ((This)->lpVtbl->Base.GetTextAntialiasMode((ID2D1RenderTarget *)This))
  6422.  
  6423. #define ID2D1HwndRenderTarget_SetTextRenderingParams(This, textRenderingParams) \
  6424.     ((This)->lpVtbl->Base.SetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6425.  
  6426. #define ID2D1HwndRenderTarget_GetTextRenderingParams(This, textRenderingParams) \
  6427.     ((This)->lpVtbl->Base.GetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6428.  
  6429. #define ID2D1HwndRenderTarget_SetTags(This, tag1, tag2) \
  6430.     ((This)->lpVtbl->Base.SetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6431.  
  6432. #define ID2D1HwndRenderTarget_GetTags(This, tag1, tag2) \
  6433.     ((This)->lpVtbl->Base.GetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6434.  
  6435. #define ID2D1HwndRenderTarget_PushLayer(This, layerParameters, layer) \
  6436.     ((This)->lpVtbl->Base.PushLayer((ID2D1RenderTarget *)This, layerParameters, layer))
  6437.  
  6438. #define ID2D1HwndRenderTarget_PopLayer(This) \
  6439.     ((This)->lpVtbl->Base.PopLayer((ID2D1RenderTarget *)This))
  6440.  
  6441. #define ID2D1HwndRenderTarget_Flush(This, tag1, tag2) \
  6442.     ((This)->lpVtbl->Base.Flush((ID2D1RenderTarget *)This, tag1, tag2))
  6443.  
  6444. #define ID2D1HwndRenderTarget_SaveDrawingState(This, drawingStateBlock) \
  6445.     ((This)->lpVtbl->Base.SaveDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6446.  
  6447. #define ID2D1HwndRenderTarget_RestoreDrawingState(This, drawingStateBlock) \
  6448.     ((This)->lpVtbl->Base.RestoreDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6449.  
  6450. #define ID2D1HwndRenderTarget_PushAxisAlignedClip(This, clipRect, antialiasMode) \
  6451.     ((This)->lpVtbl->Base.PushAxisAlignedClip((ID2D1RenderTarget *)This, clipRect, antialiasMode))
  6452.  
  6453. #define ID2D1HwndRenderTarget_PopAxisAlignedClip(This) \
  6454.     ((This)->lpVtbl->Base.PopAxisAlignedClip((ID2D1RenderTarget *)This))
  6455.  
  6456. #define ID2D1HwndRenderTarget_Clear(This, clearColor) \
  6457.     ((This)->lpVtbl->Base.Clear((ID2D1RenderTarget *)This, clearColor))
  6458.  
  6459. #define ID2D1HwndRenderTarget_BeginDraw(This) \
  6460.     ((This)->lpVtbl->Base.BeginDraw((ID2D1RenderTarget *)This))
  6461.  
  6462. #define ID2D1HwndRenderTarget_EndDraw(This, tag1, tag2) \
  6463.     ((This)->lpVtbl->Base.EndDraw((ID2D1RenderTarget *)This, tag1, tag2))
  6464.  
  6465. #define ID2D1HwndRenderTarget_GetPixelFormat(This) \
  6466.     ((This)->lpVtbl->Base.GetPixelFormat((ID2D1RenderTarget *)This))
  6467.  
  6468. #define ID2D1HwndRenderTarget_SetDpi(This, dpiX, dpiY) \
  6469.     ((This)->lpVtbl->Base.SetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6470.  
  6471. #define ID2D1HwndRenderTarget_GetDpi(This, dpiX, dpiY) \
  6472.     ((This)->lpVtbl->Base.GetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6473.  
  6474. #define ID2D1HwndRenderTarget_GetSize(This) \
  6475.     ((This)->lpVtbl->Base.GetSize((ID2D1RenderTarget *)This))
  6476.  
  6477. #define ID2D1HwndRenderTarget_GetPixelSize(This) \
  6478.     ((This)->lpVtbl->Base.GetPixelSize((ID2D1RenderTarget *)This))
  6479.  
  6480. #define ID2D1HwndRenderTarget_GetMaximumBitmapSize(This) \
  6481.     ((This)->lpVtbl->Base.GetMaximumBitmapSize((ID2D1RenderTarget *)This))
  6482.  
  6483. #define ID2D1HwndRenderTarget_IsSupported(This, renderTargetProperties) \
  6484.     ((This)->lpVtbl->Base.IsSupported((ID2D1RenderTarget *)This, renderTargetProperties))
  6485.  
  6486. #define ID2D1HwndRenderTarget_CheckWindowState(This) \
  6487.     ((This)->lpVtbl->CheckWindowState(This))
  6488.  
  6489. #define ID2D1HwndRenderTarget_Resize(This, pixelSize) \
  6490.     ((This)->lpVtbl->Resize(This, pixelSize))
  6491.  
  6492. #define ID2D1HwndRenderTarget_GetHwnd(This) \
  6493.     ((This)->lpVtbl->GetHwnd(This))
  6494.  
  6495. typedef interface ID2D1GdiInteropRenderTarget ID2D1GdiInteropRenderTarget;
  6496.  
  6497. typedef struct ID2D1GdiInteropRenderTargetVtbl
  6498. {
  6499.    
  6500.     IUnknownVtbl Base;
  6501.    
  6502.    
  6503.     STDMETHOD(GetDC)(
  6504.         ID2D1GdiInteropRenderTarget *This,
  6505.         D2D1_DC_INITIALIZE_MODE mode,
  6506.         __out HDC *hdc
  6507.         ) PURE;
  6508.    
  6509.     STDMETHOD(ReleaseDC)(
  6510.         ID2D1GdiInteropRenderTarget *This,
  6511.         __in_opt CONST RECT *update
  6512.         ) PURE;
  6513. } ID2D1GdiInteropRenderTargetVtbl;
  6514.  
  6515. interface ID2D1GdiInteropRenderTarget
  6516. {
  6517.     CONST struct ID2D1GdiInteropRenderTargetVtbl *lpVtbl;
  6518. };
  6519.  
  6520.  
  6521. #define ID2D1GdiInteropRenderTarget_QueryInterface(This, riid, ppv) \
  6522.     ((This)->lpVtbl->Base.QueryInterface((IUnknown *)This, riid, ppv))
  6523.  
  6524. #define ID2D1GdiInteropRenderTarget_AddRef(This) \
  6525.     ((This)->lpVtbl->Base.AddRef((IUnknown *)This))
  6526.  
  6527. #define ID2D1GdiInteropRenderTarget_Release(This) \
  6528.     ((This)->lpVtbl->Base.Release((IUnknown *)This))
  6529.  
  6530. #define ID2D1GdiInteropRenderTarget_GetDC(This, mode, hdc) \
  6531.     ((This)->lpVtbl->GetDC(This, mode, hdc))
  6532.  
  6533. #define ID2D1GdiInteropRenderTarget_ReleaseDC(This, update) \
  6534.     ((This)->lpVtbl->ReleaseDC(This, update))
  6535.  
  6536. typedef interface ID2D1DCRenderTarget ID2D1DCRenderTarget;
  6537.  
  6538. typedef struct ID2D1DCRenderTargetVtbl
  6539. {
  6540.    
  6541.     ID2D1RenderTargetVtbl Base;
  6542.    
  6543.    
  6544.     STDMETHOD(BindDC)(
  6545.         ID2D1DCRenderTarget *This,
  6546.         __in CONST HDC hDC,
  6547.         __in CONST RECT *pSubRect
  6548.         ) PURE;
  6549. } ID2D1DCRenderTargetVtbl;
  6550.  
  6551. interface ID2D1DCRenderTarget
  6552. {
  6553.     CONST struct ID2D1DCRenderTargetVtbl *lpVtbl;
  6554. };
  6555.  
  6556.  
  6557. #define ID2D1DCRenderTarget_QueryInterface(This, riid, ppv) \
  6558.     ((This)->lpVtbl->Base.Base.Base.QueryInterface((IUnknown *)This, riid, ppv))
  6559.  
  6560. #define ID2D1DCRenderTarget_AddRef(This) \
  6561.     ((This)->lpVtbl->Base.Base.Base.AddRef((IUnknown *)This))
  6562.  
  6563. #define ID2D1DCRenderTarget_Release(This) \
  6564.     ((This)->lpVtbl->Base.Base.Base.Release((IUnknown *)This))
  6565.  
  6566. #define ID2D1DCRenderTarget_GetFactory(This, factory) \
  6567.     ((This)->lpVtbl->Base.Base.GetFactory((ID2D1Resource *)This, factory))
  6568.  
  6569. #define ID2D1DCRenderTarget_CreateBitmap(This, size, srcData, pitch, bitmapProperties, bitmap) \
  6570.     ((This)->lpVtbl->Base.CreateBitmap((ID2D1RenderTarget *)This, size, srcData, pitch, bitmapProperties, bitmap))
  6571.  
  6572. #define ID2D1DCRenderTarget_CreateBitmapFromWicBitmap(This, wicBitmapSource, bitmapProperties, bitmap) \
  6573.     ((This)->lpVtbl->Base.CreateBitmapFromWicBitmap((ID2D1RenderTarget *)This, wicBitmapSource, bitmapProperties, bitmap))
  6574.  
  6575. #define ID2D1DCRenderTarget_CreateSharedBitmap(This, riid, data, bitmapProperties, bitmap) \
  6576.     ((This)->lpVtbl->Base.CreateSharedBitmap((ID2D1RenderTarget *)This, riid, data, bitmapProperties, bitmap))
  6577.  
  6578. #define ID2D1DCRenderTarget_CreateBitmapBrush(This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush) \
  6579.     ((This)->lpVtbl->Base.CreateBitmapBrush((ID2D1RenderTarget *)This, bitmap, bitmapBrushProperties, brushProperties, bitmapBrush))
  6580.  
  6581. #define ID2D1DCRenderTarget_CreateSolidColorBrush(This, color, brushProperties, solidColorBrush) \
  6582.     ((This)->lpVtbl->Base.CreateSolidColorBrush((ID2D1RenderTarget *)This, color, brushProperties, solidColorBrush))
  6583.  
  6584. #define ID2D1DCRenderTarget_CreateGradientStopCollection(This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection) \
  6585.     ((This)->lpVtbl->Base.CreateGradientStopCollection((ID2D1RenderTarget *)This, gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, gradientStopCollection))
  6586.  
  6587. #define ID2D1DCRenderTarget_CreateLinearGradientBrush(This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush) \
  6588.     ((This)->lpVtbl->Base.CreateLinearGradientBrush((ID2D1RenderTarget *)This, linearGradientBrushProperties, brushProperties, gradientStopCollection, linearGradientBrush))
  6589.  
  6590. #define ID2D1DCRenderTarget_CreateRadialGradientBrush(This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush) \
  6591.     ((This)->lpVtbl->Base.CreateRadialGradientBrush((ID2D1RenderTarget *)This, radialGradientBrushProperties, brushProperties, gradientStopCollection, radialGradientBrush))
  6592.  
  6593. #define ID2D1DCRenderTarget_CreateCompatibleRenderTarget(This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget) \
  6594.     ((This)->lpVtbl->Base.CreateCompatibleRenderTarget((ID2D1RenderTarget *)This, desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget))
  6595.  
  6596. #define ID2D1DCRenderTarget_CreateLayer(This, size, layer) \
  6597.     ((This)->lpVtbl->Base.CreateLayer((ID2D1RenderTarget *)This, size, layer))
  6598.  
  6599. #define ID2D1DCRenderTarget_CreateMesh(This, mesh) \
  6600.     ((This)->lpVtbl->Base.CreateMesh((ID2D1RenderTarget *)This, mesh))
  6601.  
  6602. #define ID2D1DCRenderTarget_DrawLine(This, point0, point1, brush, strokeWidth, strokeStyle) \
  6603.     ((This)->lpVtbl->Base.DrawLine((ID2D1RenderTarget *)This, point0, point1, brush, strokeWidth, strokeStyle))
  6604.  
  6605. #define ID2D1DCRenderTarget_DrawRectangle(This, rect, brush, strokeWidth, strokeStyle) \
  6606.     ((This)->lpVtbl->Base.DrawRectangle((ID2D1RenderTarget *)This, rect, brush, strokeWidth, strokeStyle))
  6607.  
  6608. #define ID2D1DCRenderTarget_FillRectangle(This, rect, brush) \
  6609.     ((This)->lpVtbl->Base.FillRectangle((ID2D1RenderTarget *)This, rect, brush))
  6610.  
  6611. #define ID2D1DCRenderTarget_DrawRoundedRectangle(This, roundedRect, brush, strokeWidth, strokeStyle) \
  6612.     ((This)->lpVtbl->Base.DrawRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush, strokeWidth, strokeStyle))
  6613.  
  6614. #define ID2D1DCRenderTarget_FillRoundedRectangle(This, roundedRect, brush) \
  6615.     ((This)->lpVtbl->Base.FillRoundedRectangle((ID2D1RenderTarget *)This, roundedRect, brush))
  6616.  
  6617. #define ID2D1DCRenderTarget_DrawEllipse(This, ellipse, brush, strokeWidth, strokeStyle) \
  6618.     ((This)->lpVtbl->Base.DrawEllipse((ID2D1RenderTarget *)This, ellipse, brush, strokeWidth, strokeStyle))
  6619.  
  6620. #define ID2D1DCRenderTarget_FillEllipse(This, ellipse, brush) \
  6621.     ((This)->lpVtbl->Base.FillEllipse((ID2D1RenderTarget *)This, ellipse, brush))
  6622.  
  6623. #define ID2D1DCRenderTarget_DrawGeometry(This, geometry, brush, strokeWidth, strokeStyle) \
  6624.     ((This)->lpVtbl->Base.DrawGeometry((ID2D1RenderTarget *)This, geometry, brush, strokeWidth, strokeStyle))
  6625.  
  6626. #define ID2D1DCRenderTarget_FillGeometry(This, geometry, brush, opacityBrush) \
  6627.     ((This)->lpVtbl->Base.FillGeometry((ID2D1RenderTarget *)This, geometry, brush, opacityBrush))
  6628.  
  6629. #define ID2D1DCRenderTarget_FillMesh(This, mesh, brush) \
  6630.     ((This)->lpVtbl->Base.FillMesh((ID2D1RenderTarget *)This, mesh, brush))
  6631.  
  6632. #define ID2D1DCRenderTarget_FillOpacityMask(This, opacityMask, brush, content, destinationRectangle, sourceRectangle) \
  6633.     ((This)->lpVtbl->Base.FillOpacityMask((ID2D1RenderTarget *)This, opacityMask, brush, content, destinationRectangle, sourceRectangle))
  6634.  
  6635. #define ID2D1DCRenderTarget_DrawBitmap(This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle) \
  6636.     ((This)->lpVtbl->Base.DrawBitmap((ID2D1RenderTarget *)This, bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle))
  6637.  
  6638. #define ID2D1DCRenderTarget_DrawText(This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode) \
  6639.     ((This)->lpVtbl->Base.DrawText((ID2D1RenderTarget *)This, string, stringLength, textFormat, layoutRect, defaultForegroundBrush, options, measuringMode))
  6640.  
  6641. #define ID2D1DCRenderTarget_DrawTextLayout(This, origin, textLayout, defaultForegroundBrush, options) \
  6642.     ((This)->lpVtbl->Base.DrawTextLayout((ID2D1RenderTarget *)This, origin, textLayout, defaultForegroundBrush, options))
  6643.  
  6644. #define ID2D1DCRenderTarget_DrawGlyphRun(This, baselineOrigin, glyphRun, foregroundBrush, measuringMode) \
  6645.     ((This)->lpVtbl->Base.DrawGlyphRun((ID2D1RenderTarget *)This, baselineOrigin, glyphRun, foregroundBrush, measuringMode))
  6646.  
  6647. #define ID2D1DCRenderTarget_SetTransform(This, transform) \
  6648.     ((This)->lpVtbl->Base.SetTransform((ID2D1RenderTarget *)This, transform))
  6649.  
  6650. #define ID2D1DCRenderTarget_GetTransform(This, transform) \
  6651.     ((This)->lpVtbl->Base.GetTransform((ID2D1RenderTarget *)This, transform))
  6652.  
  6653. #define ID2D1DCRenderTarget_SetAntialiasMode(This, antialiasMode) \
  6654.     ((This)->lpVtbl->Base.SetAntialiasMode((ID2D1RenderTarget *)This, antialiasMode))
  6655.  
  6656. #define ID2D1DCRenderTarget_GetAntialiasMode(This) \
  6657.     ((This)->lpVtbl->Base.GetAntialiasMode((ID2D1RenderTarget *)This))
  6658.  
  6659. #define ID2D1DCRenderTarget_SetTextAntialiasMode(This, textAntialiasMode) \
  6660.     ((This)->lpVtbl->Base.SetTextAntialiasMode((ID2D1RenderTarget *)This, textAntialiasMode))
  6661.  
  6662. #define ID2D1DCRenderTarget_GetTextAntialiasMode(This) \
  6663.     ((This)->lpVtbl->Base.GetTextAntialiasMode((ID2D1RenderTarget *)This))
  6664.  
  6665. #define ID2D1DCRenderTarget_SetTextRenderingParams(This, textRenderingParams) \
  6666.     ((This)->lpVtbl->Base.SetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6667.  
  6668. #define ID2D1DCRenderTarget_GetTextRenderingParams(This, textRenderingParams) \
  6669.     ((This)->lpVtbl->Base.GetTextRenderingParams((ID2D1RenderTarget *)This, textRenderingParams))
  6670.  
  6671. #define ID2D1DCRenderTarget_SetTags(This, tag1, tag2) \
  6672.     ((This)->lpVtbl->Base.SetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6673.  
  6674. #define ID2D1DCRenderTarget_GetTags(This, tag1, tag2) \
  6675.     ((This)->lpVtbl->Base.GetTags((ID2D1RenderTarget *)This, tag1, tag2))
  6676.  
  6677. #define ID2D1DCRenderTarget_PushLayer(This, layerParameters, layer) \
  6678.     ((This)->lpVtbl->Base.PushLayer((ID2D1RenderTarget *)This, layerParameters, layer))
  6679.  
  6680. #define ID2D1DCRenderTarget_PopLayer(This) \
  6681.     ((This)->lpVtbl->Base.PopLayer((ID2D1RenderTarget *)This))
  6682.  
  6683. #define ID2D1DCRenderTarget_Flush(This, tag1, tag2) \
  6684.     ((This)->lpVtbl->Base.Flush((ID2D1RenderTarget *)This, tag1, tag2))
  6685.  
  6686. #define ID2D1DCRenderTarget_SaveDrawingState(This, drawingStateBlock) \
  6687.     ((This)->lpVtbl->Base.SaveDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6688.  
  6689. #define ID2D1DCRenderTarget_RestoreDrawingState(This, drawingStateBlock) \
  6690.     ((This)->lpVtbl->Base.RestoreDrawingState((ID2D1RenderTarget *)This, drawingStateBlock))
  6691.  
  6692. #define ID2D1DCRenderTarget_PushAxisAlignedClip(This, clipRect, antialiasMode) \
  6693.     ((This)->lpVtbl->Base.PushAxisAlignedClip((ID2D1RenderTarget *)This, clipRect, antialiasMode))
  6694.  
  6695. #define ID2D1DCRenderTarget_PopAxisAlignedClip(This) \
  6696.     ((This)->lpVtbl->Base.PopAxisAlignedClip((ID2D1RenderTarget *)This))
  6697.  
  6698. #define ID2D1DCRenderTarget_Clear(This, clearColor) \
  6699.     ((This)->lpVtbl->Base.Clear((ID2D1RenderTarget *)This, clearColor))
  6700.  
  6701. #define ID2D1DCRenderTarget_BeginDraw(This) \
  6702.     ((This)->lpVtbl->Base.BeginDraw((ID2D1RenderTarget *)This))
  6703.  
  6704. #define ID2D1DCRenderTarget_EndDraw(This, tag1, tag2) \
  6705.     ((This)->lpVtbl->Base.EndDraw((ID2D1RenderTarget *)This, tag1, tag2))
  6706.  
  6707. #define ID2D1DCRenderTarget_GetPixelFormat(This) \
  6708.     ((This)->lpVtbl->Base.GetPixelFormat((ID2D1RenderTarget *)This))
  6709.  
  6710. #define ID2D1DCRenderTarget_SetDpi(This, dpiX, dpiY) \
  6711.     ((This)->lpVtbl->Base.SetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6712.  
  6713. #define ID2D1DCRenderTarget_GetDpi(This, dpiX, dpiY) \
  6714.     ((This)->lpVtbl->Base.GetDpi((ID2D1RenderTarget *)This, dpiX, dpiY))
  6715.  
  6716. #define ID2D1DCRenderTarget_GetSize(This) \
  6717.     ((This)->lpVtbl->Base.GetSize((ID2D1RenderTarget *)This))
  6718.  
  6719. #define ID2D1DCRenderTarget_GetPixelSize(This) \
  6720.     ((This)->lpVtbl->Base.GetPixelSize((ID2D1RenderTarget *)This))
  6721.  
  6722. #define ID2D1DCRenderTarget_GetMaximumBitmapSize(This) \
  6723.     ((This)->lpVtbl->Base.GetMaximumBitmapSize((ID2D1RenderTarget *)This))
  6724.  
  6725. #define ID2D1DCRenderTarget_IsSupported(This, renderTargetProperties) \
  6726.     ((This)->lpVtbl->Base.IsSupported((ID2D1RenderTarget *)This, renderTargetProperties))
  6727.  
  6728. #define ID2D1DCRenderTarget_BindDC(This, hDC, pSubRect) \
  6729.     ((This)->lpVtbl->BindDC(This, hDC, pSubRect))
  6730.  
  6731. typedef interface ID2D1Factory ID2D1Factory;
  6732.  
  6733. typedef struct ID2D1FactoryVtbl
  6734. {
  6735.    
  6736.     IUnknownVtbl Base;
  6737.    
  6738.    
  6739.     STDMETHOD(ReloadSystemMetrics)(
  6740.         ID2D1Factory *This
  6741.         ) PURE;
  6742.    
  6743.     STDMETHOD_(void, GetDesktopDpi)(
  6744.         ID2D1Factory *This,
  6745.         __out FLOAT *dpiX,
  6746.         __out FLOAT *dpiY
  6747.         ) PURE;
  6748.    
  6749.     STDMETHOD(CreateRectangleGeometry)(
  6750.         ID2D1Factory *This,
  6751.         __in CONST D2D1_RECT_F *rectangle,
  6752.         __deref_out ID2D1RectangleGeometry **rectangleGeometry
  6753.         ) PURE;
  6754.    
  6755.     STDMETHOD(CreateRoundedRectangleGeometry)(
  6756.         ID2D1Factory *This,
  6757.         __in CONST D2D1_ROUNDED_RECT *roundedRectangle,
  6758.         __deref_out ID2D1RoundedRectangleGeometry **roundedRectangleGeometry
  6759.         ) PURE;
  6760.    
  6761.     STDMETHOD(CreateEllipseGeometry)(
  6762.         ID2D1Factory *This,
  6763.         __in CONST D2D1_ELLIPSE *ellipse,
  6764.         __deref_out ID2D1EllipseGeometry **ellipseGeometry
  6765.         ) PURE;
  6766.    
  6767.     STDMETHOD(CreateGeometryGroup)(
  6768.         ID2D1Factory *This,
  6769.         D2D1_FILL_MODE fillMode,
  6770.         __in_ecount(geometriesCount) ID2D1Geometry **geometries,
  6771.         UINT geometriesCount,
  6772.         __deref_out ID2D1GeometryGroup **geometryGroup
  6773.         ) PURE;
  6774.    
  6775.     STDMETHOD(CreateTransformedGeometry)(
  6776.         ID2D1Factory *This,
  6777.         __in ID2D1Geometry *sourceGeometry,
  6778.         __in CONST D2D1_MATRIX_3X2_F *transform,
  6779.         __deref_out ID2D1TransformedGeometry **transformedGeometry
  6780.         ) PURE;
  6781.    
  6782.     STDMETHOD(CreatePathGeometry)(
  6783.         ID2D1Factory *This,
  6784.         __deref_out ID2D1PathGeometry **pathGeometry
  6785.         ) PURE;
  6786.    
  6787.     STDMETHOD(CreateStrokeStyle)(
  6788.         ID2D1Factory *This,
  6789.         __in CONST D2D1_STROKE_STYLE_PROPERTIES *strokeStyleProperties,
  6790.         __in_ecount_opt(dashesCount) CONST FLOAT *dashes,
  6791.         UINT dashesCount,
  6792.         __deref_out ID2D1StrokeStyle **strokeStyle
  6793.         ) PURE;
  6794.    
  6795.     STDMETHOD(CreateDrawingStateBlock)(
  6796.         ID2D1Factory *This,
  6797.         __in_opt CONST D2D1_DRAWING_STATE_DESCRIPTION *drawingStateDescription,
  6798.         __in_opt IDWriteRenderingParams *textRenderingParams,
  6799.         __deref_out ID2D1DrawingStateBlock **drawingStateBlock
  6800.         ) PURE;
  6801.    
  6802.     STDMETHOD(CreateWicBitmapRenderTarget)(
  6803.         ID2D1Factory *This,
  6804.         __in IWICBitmap *target,
  6805.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  6806.         __deref_out ID2D1RenderTarget **renderTarget
  6807.         ) PURE;
  6808.    
  6809.     STDMETHOD(CreateHwndRenderTarget)(
  6810.         ID2D1Factory *This,
  6811.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  6812.         __in CONST D2D1_HWND_RENDER_TARGET_PROPERTIES *hwndRenderTargetProperties,
  6813.         __deref_out ID2D1HwndRenderTarget **hwndRenderTarget
  6814.         ) PURE;
  6815.    
  6816.     STDMETHOD(CreateDxgiSurfaceRenderTarget)(
  6817.         ID2D1Factory *This,
  6818.         __in IDXGISurface *dxgiSurface,
  6819.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  6820.         __deref_out ID2D1RenderTarget **renderTarget
  6821.         ) PURE;
  6822.    
  6823.     STDMETHOD(CreateDCRenderTarget)(
  6824.         ID2D1Factory *This,
  6825.         __in CONST D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties,
  6826.         __deref_out ID2D1DCRenderTarget **dcRenderTarget
  6827.         ) PURE;
  6828. } ID2D1FactoryVtbl;
  6829.  
  6830. interface ID2D1Factory
  6831. {
  6832.     CONST struct ID2D1FactoryVtbl *lpVtbl;
  6833. };
  6834.  
  6835.  
  6836. #define ID2D1Factory_QueryInterface(This, riid, ppv) \
  6837.     ((This)->lpVtbl->Base.QueryInterface((IUnknown *)This, riid, ppv))
  6838.  
  6839. #define ID2D1Factory_AddRef(This) \
  6840.     ((This)->lpVtbl->Base.AddRef((IUnknown *)This))
  6841.  
  6842. #define ID2D1Factory_Release(This) \
  6843.     ((This)->lpVtbl->Base.Release((IUnknown *)This))
  6844.  
  6845. #define ID2D1Factory_ReloadSystemMetrics(This) \
  6846.     ((This)->lpVtbl->ReloadSystemMetrics(This))
  6847.  
  6848. #define ID2D1Factory_GetDesktopDpi(This, dpiX, dpiY) \
  6849.     ((This)->lpVtbl->GetDesktopDpi(This, dpiX, dpiY))
  6850.  
  6851. #define ID2D1Factory_CreateRectangleGeometry(This, rectangle, rectangleGeometry) \
  6852.     ((This)->lpVtbl->CreateRectangleGeometry(This, rectangle, rectangleGeometry))
  6853.  
  6854. #define ID2D1Factory_CreateRoundedRectangleGeometry(This, roundedRectangle, roundedRectangleGeometry) \
  6855.     ((This)->lpVtbl->CreateRoundedRectangleGeometry(This, roundedRectangle, roundedRectangleGeometry))
  6856.  
  6857. #define ID2D1Factory_CreateEllipseGeometry(This, ellipse, ellipseGeometry) \
  6858.     ((This)->lpVtbl->CreateEllipseGeometry(This, ellipse, ellipseGeometry))
  6859.  
  6860. #define ID2D1Factory_CreateGeometryGroup(This, fillMode, geometries, geometriesCount, geometryGroup) \
  6861.     ((This)->lpVtbl->CreateGeometryGroup(This, fillMode, geometries, geometriesCount, geometryGroup))
  6862.  
  6863. #define ID2D1Factory_CreateTransformedGeometry(This, sourceGeometry, transform, transformedGeometry) \
  6864.     ((This)->lpVtbl->CreateTransformedGeometry(This, sourceGeometry, transform, transformedGeometry))
  6865.  
  6866. #define ID2D1Factory_CreatePathGeometry(This, pathGeometry) \
  6867.     ((This)->lpVtbl->CreatePathGeometry(This, pathGeometry))
  6868.  
  6869. #define ID2D1Factory_CreateStrokeStyle(This, strokeStyleProperties, dashes, dashesCount, strokeStyle) \
  6870.     ((This)->lpVtbl->CreateStrokeStyle(This, strokeStyleProperties, dashes, dashesCount, strokeStyle))
  6871.  
  6872. #define ID2D1Factory_CreateDrawingStateBlock(This, drawingStateDescription, textRenderingParams, drawingStateBlock) \
  6873.     ((This)->lpVtbl->CreateDrawingStateBlock(This, drawingStateDescription, textRenderingParams, drawingStateBlock))
  6874.  
  6875. #define ID2D1Factory_CreateWicBitmapRenderTarget(This, target, renderTargetProperties, renderTarget) \
  6876.     ((This)->lpVtbl->CreateWicBitmapRenderTarget(This, target, renderTargetProperties, renderTarget))
  6877.  
  6878. #define ID2D1Factory_CreateHwndRenderTarget(This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget) \
  6879.     ((This)->lpVtbl->CreateHwndRenderTarget(This, renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget))
  6880.  
  6881. #define ID2D1Factory_CreateDxgiSurfaceRenderTarget(This, dxgiSurface, renderTargetProperties, renderTarget) \
  6882.     ((This)->lpVtbl->CreateDxgiSurfaceRenderTarget(This, dxgiSurface, renderTargetProperties, renderTarget))
  6883.  
  6884. #define ID2D1Factory_CreateDCRenderTarget(This, renderTargetProperties, dcRenderTarget) \
  6885.     ((This)->lpVtbl->CreateDCRenderTarget(This, renderTargetProperties, dcRenderTarget))
  6886.  
  6887.  
  6888. #endif
  6889.  
  6890.  
  6891. #ifdef __cplusplus
  6892. extern "C"
  6893. {
  6894. #endif
  6895.  
  6896.     //
  6897.     // This export cannot be in a namespace because compiler name mangling isn't consistent
  6898.     // also, this must be 'C' callable.
  6899.     //
  6900.     HRESULT WINAPI
  6901.     D2D1CreateFactory(
  6902.         __in D2D1_FACTORY_TYPE factoryType,
  6903.         __in REFIID riid,
  6904.         __in_opt CONST D2D1_FACTORY_OPTIONS *pFactoryOptions,
  6905.         __out void **ppIFactory
  6906.         );
  6907.  
  6908.        
  6909.     void WINAPI
  6910.     D2D1MakeRotateMatrix(
  6911.         __in FLOAT angle,
  6912.         __in D2D1_POINT_2F center,
  6913.         __out D2D1_MATRIX_3X2_F *matrix
  6914.         );
  6915.        
  6916.     void WINAPI
  6917.     D2D1MakeSkewMatrix(
  6918.         __in FLOAT angleX,
  6919.         __in FLOAT angleY,
  6920.         __in D2D1_POINT_2F center,
  6921.         __out D2D1_MATRIX_3X2_F *matrix
  6922.         );
  6923.  
  6924.     BOOL WINAPI
  6925.     D2D1IsMatrixInvertible(
  6926.         __in CONST D2D1_MATRIX_3X2_F *matrix
  6927.         );
  6928.  
  6929.     BOOL WINAPI
  6930.     D2D1InvertMatrix(
  6931.         __inout D2D1_MATRIX_3X2_F *matrix
  6932.         );
  6933.  
  6934. #ifdef __cplusplus
  6935. }
  6936. #endif
  6937.  
  6938. #ifndef D2D1FORCEINLINE
  6939. #define D2D1FORCEINLINE FORCEINLINE
  6940. #endif // #ifndef D2D1FORCEINLINE
  6941.  
  6942.        
  6943. #include <d2d1helper.h>
  6944.  
  6945.  
  6946. #ifndef D2D_USE_C_DEFINITIONS
  6947.  
  6948. inline
  6949. HRESULT
  6950. D2D1CreateFactory(
  6951.     __in D2D1_FACTORY_TYPE factoryType,
  6952.     __in REFIID riid,
  6953.     __out void **factory
  6954.     )
  6955. {
  6956.     return
  6957.         D2D1CreateFactory(
  6958.             factoryType,
  6959.             riid,
  6960.             NULL,
  6961.             factory);
  6962. }
  6963.  
  6964.  
  6965. template<class Factory>
  6966. HRESULT
  6967. D2D1CreateFactory(
  6968.     __in D2D1_FACTORY_TYPE factoryType,
  6969.     __out Factory **factory
  6970.     )
  6971. {
  6972.     return
  6973.         D2D1CreateFactory(
  6974.             factoryType,
  6975.             __uuidof(Factory),
  6976.             reinterpret_cast<void **>(factory));
  6977. }
  6978.  
  6979. template<class Factory>
  6980. HRESULT
  6981. D2D1CreateFactory(
  6982.     __in D2D1_FACTORY_TYPE factoryType,
  6983.     __in CONST D2D1_FACTORY_OPTIONS &factoryOptions,
  6984.     __out Factory **ppFactory
  6985.     )
  6986. {
  6987.     return
  6988.         D2D1CreateFactory(
  6989.             factoryType,            
  6990.             __uuidof(Factory),
  6991.             &factoryOptions,
  6992.             reinterpret_cast<void **>(ppFactory));
  6993. }
  6994.  
  6995. #endif // #ifndef D2D_USE_C_DEFINITIONS
  6996. #endif // #ifndef _D2D1_H_
  6997.