From a52b58473c4bf09e26592b5fb5ad51964b39180d Mon Sep 17 00:00:00 2001 From: Ziqing Hui Date: Wed, 11 Aug 2021 13:53:44 +0800 Subject: [PATCH] d2d1: Add D2D1Crop. Signed-off-by: Ziqing Hui Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d2d1/effect.c | 3 ++- dlls/d2d1/tests/d2d1.c | 1 + include/d2d1effects.idl | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 5f334d19f71..0c33f956826 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -24,7 +24,8 @@ static const struct d2d_effect_info builtin_effects[] = { {&CLSID_D2D12DAffineTransform, 1, 1, 1}, {&CLSID_D2D13DPerspectiveTransform, 1, 1, 1}, - {&CLSID_D2D1Composite, 2, 1, 0xffffffff} + {&CLSID_D2D1Composite, 2, 1, 0xffffffff}, + {&CLSID_D2D1Crop, 1, 1, 1}, }; static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 343a2363e14..cd58d642ce1 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -9707,6 +9707,7 @@ static void test_effect(BOOL d3d11) {&CLSID_D2D12DAffineTransform, 1, 1, 1}, {&CLSID_D2D13DPerspectiveTransform, 1, 1, 1}, {&CLSID_D2D1Composite, 2, 1, 0xffffffff}, + {&CLSID_D2D1Crop, 1, 1, 1}, }; if (!init_test_context(&ctx, d3d11)) diff --git a/include/d2d1effects.idl b/include/d2d1effects.idl index 4154276345b..9bd0b7012ad 100644 --- a/include/d2d1effects.idl +++ b/include/d2d1effects.idl @@ -19,6 +19,7 @@ cpp_quote("DEFINE_GUID(CLSID_D2D12DAffineTransform, 0x6aa97485,0x6354,0x4cfc,0x90,0x8c,0xe4,0xa7,0x4f,0x62,0xc9,0x6c);") cpp_quote("DEFINE_GUID(CLSID_D2D13DPerspectiveTransform, 0xc2844d0b,0x3d86,0x46e7,0x85,0xba,0x52,0x6c,0x92,0x40,0xf3,0xfb);") cpp_quote("DEFINE_GUID(CLSID_D2D1Composite, 0x48fc9f51,0xf6ac,0x48f1,0x8b,0x58,0x3b,0x28,0xac,0x46,0xf7,0x6d);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Crop, 0xe23f7110,0x0e9a,0x4324,0xaf,0x47,0x6a,0x2c,0x0c,0x46,0xf3,0x5b);") typedef enum D2D1_BORDER_MODE { @@ -75,3 +76,10 @@ typedef enum D2D1_COMPOSITE_PROP D2D1_COMPOSITE_PROP_MODE = 0x0, D2D1_COMPOSITE_PROP_FORCE_DWORD = 0xffffffff } D2D1_COMPOSITE_PROP; + +typedef enum D2D1_CROP_PROP +{ + D2D1_CROP_PROP_RECT = 0x0, + D2D1_CROP_PROP_BORDER_MODE = 0x1, + D2D1_CROP_PROP_FORCE_DWORD = 0xffffffff +} D2D1_CROP_PROP;