From: Biswapriyo Nath nathbappai@gmail.com
--- include/d2d1_3.idl | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index 29bcc8df56d..c88226b4136 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -19,8 +19,6 @@ import "d2d1_2.idl"; import "d2d1effects_2.idl";
-interface ID2D1SpriteBatch; - typedef enum D2D1_INK_NIB_SHAPE { D2D1_INK_NIB_SHAPE_ROUND = 0x0, @@ -269,6 +267,48 @@ interface ID2D1LookupTable3D : ID2D1Resource { }
+[ + object, + uuid(4dc583bf-3a10-438a-8722-e9765224f1f1), + local, +] +interface ID2D1SpriteBatch : ID2D1Resource +{ + HRESULT AddSprites( + [in] UINT32 sprite_count, + [in] const D2D1_RECT_F *destination_rectangles, + [in] const D2D1_RECT_U *source_rectangles, + [in] const D2D1_COLOR_F *colors, + [in] const D2D1_MATRIX_3X2_F *transforms, + [in] UINT32 destination_rectangles_stride, + [in] UINT32 source_rectangles_stride, + [in] UINT32 colors_stride, + [in] UINT32 transforms_stride + ); + HRESULT SetSprites( + [in] UINT32 start_index, + [in] UINT32 sprite_count, + [in] const D2D1_RECT_F *destination_rectangles, + [in] const D2D1_RECT_U *source_rectangles, + [in] const D2D1_COLOR_F *colors, + [in] const D2D1_MATRIX_3X2_F *transforms, + [in] UINT32 destination_rectangles_stride, + [in] UINT32 source_rectangles_stride, + [in] UINT32 colors_stride, + [in] UINT32 transforms_stride + ); + HRESULT GetSprites( + [in] UINT32 start_index, + [in] UINT32 sprite_count, + [out, optional] D2D1_RECT_F *destination_rectangles, + [out, optional] D2D1_RECT_U *source_rectangles, + [out, optional] D2D1_COLOR_F *colors, + [out, optional] D2D1_MATRIX_3X2_F *transforms + ); + UINT32 GetSpriteCount(void); + void Clear(void); +} + [ object, uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7),
From: Biswapriyo Nath nathbappai@gmail.com
--- include/d2d1_3.idl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index c88226b4136..830c196a484 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -309,6 +309,36 @@ interface ID2D1SpriteBatch : ID2D1Resource void Clear(void); }
+[ + object, + uuid(af671749-d241-4db8-8e41-dcc2e5c1a438), + local, +] +interface ID2D1SvgGlyphStyle : ID2D1Resource +{ + HRESULT SetFill( + [in, optional] ID2D1Brush *brush + ); + void GetFill( + [out] ID2D1Brush **brush + ); + HRESULT SetStroke( + [in, optional] ID2D1Brush *brush, + [in] FLOAT stroke_width, + [in, optional] const FLOAT *dashes, + [in, optional] UINT32 dashes_count, + [in] FLOAT dash_offset + ); + UINT32 GetStrokeDashesCount(void); + void GetStroke( + [out, optional] ID2D1Brush **brush, + [out, optional] FLOAT *stroke_width, + [out, optional] FLOAT *dashes, + [in, optional] UINT32 dashes_count, + [out, optional] FLOAT *dash_offset + ); +} + [ object, uuid(394ea6a3-0c34-4321-950b-6ca20f0be6c7),
From: Biswapriyo Nath nathbappai@gmail.com
--- include/d2d1_3.idl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index 830c196a484..a746a17c7c6 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -404,6 +404,26 @@ interface ID2D1DeviceContext2 : ID2D1DeviceContext1 ); }
+[ + object, + uuid(235a7496-8351-414c-bcd4-6672ab2d8e00), + local, +] +interface ID2D1DeviceContext3 : ID2D1DeviceContext2 +{ + HRESULT CreateSpriteBatch( + [out] ID2D1SpriteBatch **sprite_batch + ); + void DrawSpriteBatch( + [in] ID2D1SpriteBatch *sprite_batch, + [in] UINT32 start_index, + [in] UINT32 sprite_count, + [in] ID2D1Bitmap *bitmap, + [in] D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode, + [in] D2D1_SPRITE_OPTIONS sprite_options + ); +} + [ object, uuid(a44472e1-8dfb-4e60-8492-6e2861c9ca8b),
From: Biswapriyo Nath nathbappai@gmail.com
--- include/d2d1_3.idl | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
diff --git a/include/d2d1_3.idl b/include/d2d1_3.idl index a746a17c7c6..9ca42e661e1 100644 --- a/include/d2d1_3.idl +++ b/include/d2d1_3.idl @@ -19,6 +19,8 @@ import "d2d1_2.idl"; import "d2d1effects_2.idl";
+interface IDWriteFontFace; + typedef enum D2D1_INK_NIB_SHAPE { D2D1_INK_NIB_SHAPE_ROUND = 0x0, @@ -76,6 +78,13 @@ typedef enum D2D1_SPRITE_OPTIONS D2D1_SPRITE_OPTIONS_FORCE_DWORD = 0xffffffff } D2D1_SPRITE_OPTIONS;
+typedef enum D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION +{ + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DEFAULT = 0x0, + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_DISABLE = 0x1, + D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION_FORCE_DWORD = 0xffffffff +} D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION; + typedef struct D2D1_INK_POINT { float x; @@ -424,6 +433,78 @@ interface ID2D1DeviceContext3 : ID2D1DeviceContext2 ); }
+[ + object, + uuid(8c427831-3d90-4476-b647-c4fae349e4db), + local, +] +interface ID2D1DeviceContext4 : ID2D1DeviceContext3 +{ + HRESULT CreateSvgGlyphStyle( + [out] ID2D1SvgGlyphStyle **svg_glyph_style + ); + void DrawText( + [in] const WCHAR *string, + [in] UINT32 string_length, + [in] IDWriteTextFormat *text_format, + [in] const D2D1_RECT_F *layout_rect, + [in, optional] ID2D1Brush *default_fill_brush, + [in, optional] ID2D1SvgGlyphStyle *svg_glyph_style, + [in, optional] UINT32 color_palette_index, + [in] D2D1_DRAW_TEXT_OPTIONS options, + [in] DWRITE_MEASURING_MODE measuring_mode + ); + void DrawTextLayout( + [in] D2D1_POINT_2F origin, + [in] IDWriteTextLayout *text_layout, + [in, optional] ID2D1Brush *default_fill_brush, + [in, optional] ID2D1SvgGlyphStyle *svg_glyph_style, + [in, optional] UINT32 color_palette_index, + [in] D2D1_DRAW_TEXT_OPTIONS options + ); + void DrawColorBitmapGlyphRun( + [in] DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, + [in] D2D1_POINT_2F baseline_origin, + [in] const DWRITE_GLYPH_RUN *glyph_run, + [in] DWRITE_MEASURING_MODE measuring_mode, + [in] D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION bitmap_snap_option + ); + void DrawSvgGlyphRun( + [in] D2D1_POINT_2F baseline_origin, + [in] const DWRITE_GLYPH_RUN *glyph_run, + [in, optional] ID2D1Brush *default_fill_brush, + [in, optional] ID2D1SvgGlyphStyle *svg_glyph_style, + [in, optional]UINT32 color_palette_index, + [in] DWRITE_MEASURING_MODE measuring_mode + ); + HRESULT GetColorBitmapGlyphImage( + [in] DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, + [in] D2D1_POINT_2F glyph_origin, + [in] IDWriteFontFace *font_face, + [in] FLOAT font_em_size, + [in] UINT16 glyph_index, + [in] BOOL is_sideways, + [in, optional] const D2D1_MATRIX_3X2_F *world_transform, + [in] FLOAT dpi_x, + [in] FLOAT dpi_y, + [out] D2D1_MATRIX_3X2_F *glyph_transform, + [out] ID2D1Image **glyph_image + ); + HRESULT GetSvgGlyphImage( + [in] D2D1_POINT_2F glyph_origin, + [in] IDWriteFontFace *font_face, + [in] FLOAT font_em_size, + [in] UINT16 glyph_index, + [in] BOOL is_sideways, + [in, optional] const D2D1_MATRIX_3X2_F *world_transform, + [in, optional] ID2D1Brush *default_fill_brush, + [in, optional] ID2D1SvgGlyphStyle *svg_glyph_style, + [in] UINT32 color_palette_index, + [out] D2D1_MATRIX_3X2_F *glyph_transform, + [out] ID2D1CommandList **glyph_image + ); +} + [ object, uuid(a44472e1-8dfb-4e60-8492-6e2861c9ca8b),