21#define WIDL_C_INLINE_WRAPPERS
29#include "d2d1effectauthor.h"
37DEFINE_GUID(CLSID_TestEffect, 0xb9ee12e9,0x32d9,0xe659,0xac,0x61,0x2d,0x7c,0xea,0x69,0x28,0x78);
38DEFINE_GUID(CLSID_TestEffect2, 0xb9ee12e9,0x32d9,0xe659,0xac,0x61,0x2d,0x7c,0xea,0x69,0x28,0x79);
39DEFINE_GUID(CLSID_AuxEffect, 0xb9ee12e9,0x32d9,0xe659,0xac,0x61,0x2d,0x7c,0xea,0x69,0x28,0x79);
40DEFINE_GUID(GUID_TestVertexShader, 0x5bcdcfae,0x1e92,0x4dc1,0x94,0xfa,0x3b,0x01,0xca,0x54,0x59,0x20);
41DEFINE_GUID(GUID_TestPixelShader, 0x53015748,0xfc13,0x4168,0xbd,0x13,0x0f,0xcf,0x15,0x29,0x7f,0x01);
42DEFINE_GUID(GUID_CustomVertexBuffer, 0x53015748,0xfc13,0x4168,0xbd,0x13,0x0f,0xcf,0x15,0x29,0x7f,0x02);
48 return IUnknown_Release(
unknown);
51#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
60 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
63 IUnknown_Release(unk);
67L"<?xml version='1.0'?> \
69 <Property name='DisplayName' type='string' value='TestEffectA'/> \
70 <Property name='Author' type='string' value='The Wine Project'/> \
71 <Property name='Category' type='string' value='Test'/> \
72 <Property name='Description' type='string' value='Test effect.'/> \
74 <Input name='Source'/> \
76 <Property name='Integer' type='uint32'> \
77 <Property name='DisplayName' type='string' value='Integer'/> \
78 <Property name='Min' type='uint32' value='0'/> \
79 <Property name='Max' type='uint32' value='100'/> \
80 <Property name='Default' type='uint32' value='10'/> \
82 <Property name='Int32Prop' type='int32' value='-2'> \
83 <Property name='DisplayName' type='string' value='Int32 prop'/> \
84 <Property name='Default' type='int32' value='10'/> \
86 <Property name='Int32PropHex' type='int32' value='0xffff0001'> \
87 <Property name='DisplayName' type='string' value='Int32 prop hex'/> \
89 <Property name='Int32PropOct' type='int32' value='012'> \
90 <Property name='DisplayName' type='string' value='Int32 prop oct'/> \
92 <Property name='UInt32Prop' type='uint32' value='-3'> \
93 <Property name='DisplayName' type='string' value='UInt32 prop'/> \
94 <Property name='Default' type='uint32' value='10'/> \
96 <Property name='UInt32PropHex' type='uint32' value='0xfff'> \
97 <Property name='DisplayName' type='string' value='UInt32 prop hex'/> \
99 <Property name='UInt32PropOct' type='uint32' value='013'> \
100 <Property name='DisplayName' type='string' value='UInt32 prop oct'/> \
102 <Property name='Bool' type='bool'> \
103 <Property name='DisplayName' type='string' value='Bool property'/> \
104 <Property name='Default' type='bool' value='false'/> \
106 <Property name='Vec2Prop' type='vector2' value='( 3.0, 4.0)'> \
107 <Property name='DisplayName' type='string' value='Vec2 prop'/> \
108 <Property name='Default' type='vector2' value='(1.0, 2.0)'/> \
110 <Property name='Vec3Prop' type='vector3' value='(5.0, 6.0, 7.0)'> \
111 <Property name='DisplayName' type='string' value='Vec3 prop'/> \
112 <Property name='Default' type='vector3' value='(0.1, 0.2, 0.3)'/> \
114 <Property name='Vec4Prop' type='vector4' value='(8.0,9.0,10.0,11.0)'> \
115 <Property name='DisplayName' type='string' value='Vec4 prop'/> \
116 <Property name='Default' type='vector4' value='(0.8,0.9,1.0,1.1)'/> \
118 <Property name='Mat3x2Prop' type='matrix3x2' \
119 value='(1.0,2.0,3.0,4.0,5.0,6.0)'> \
120 <Property name='DisplayName' type='string' value='Mat3x2 prop'/> \
121 <Property name='Default' type='matrix3x2' \
122 value='(0.1,0.2,0.3,0.4,0.5,0.6)'/> \
124 <Property name='Mat4x3Prop' type='matrix4x3' \
125 value='(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12)'> \
126 <Property name='DisplayName' type='string' value='Mat4x3 prop'/> \
127 <Property name='Default' type='matrix4x3' \
128 value='(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2)'/> \
130 <Property name='Mat4x4Prop' type='matrix4x4' \
131 value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)'> \
132 <Property name='DisplayName' type='string' value='Mat4x4 prop'/> \
133 <Property name='Default' type='matrix4x4' \
134 value='(16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/> \
136 <Property name='Mat5x4Prop' type='matrix5x4' \
137 value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)'> \
138 <Property name='DisplayName' type='string' value='Mat5x4 prop'/> \
139 <Property name='Default' type='matrix5x4' \
140 value='(20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/>\
142 <Property name='BlobProp' type='blob' > \
143 <Property name='DisplayName' type='string' value='Blob prop'/> \
149L"<?xml version='1.0'?> \
151 <Property name='DisplayName' type='string' value='TestEffectB'/> \
152 <Property name='Author' type='string' value='The Wine Project'/> \
153 <Property name='Category' type='string' value='Test'/> \
154 <Property name='Description' type='string' value='Test effect.'/> \
156 <Input name='Source'/> \
158 <Property name='Context' type='iunknown'> \
159 <Property name='DisplayName' type='string' value='Context'/> \
165L"<?xml version='1.0'?> \
167 <Property name='DisplayName' type='string' value='TestEffectC'/> \
168 <Property name='Author' type='string' value='The Wine Project'/> \
169 <Property name='Category' type='string' value='Test'/> \
170 <Property name='Description' type='string' value='Test effect.'/> \
172 <Input name='Source'/> \
174 <Property name='Context' type='iunknown'> \
175 <Property name='DisplayName' type='string' value='Context'/> \
177 <Property name='Integer' type='uint32'> \
178 <Property name='DisplayName' type='string' value='Integer'/> \
180 <Property name='Graph' type='iunknown'> \
181 <Property name='DisplayName' type='string' value='Graph'/> \
187L"<?xml version='1.0'?> \
189 <Property name='DisplayName' type='string'/> \
190 <Property name='Author' type='string'/> \
191 <Property name='Category' type='string'/> \
192 <Property name='Description' type='string'/> \
199 <Property name='DisplayName' type='string'/> \
200 <Property name='Author' type='string'/> \
201 <Property name='Category' type='string'/> \
202 <Property name='Description' type='string'/> \
208L"<?xml version='1.0'?> \
210 <Property name='DisplayName' type='string'/> \
211 <Property name='Author' type='string'/> \
212 <Property name='Category' type='string'/> \
213 <Property name='Description' type='string'/> \
218L"<?xml version='1.0'?> \
220 <Property name='Author' type='string'/> \
221 <Property name='Category' type='string'/> \
222 <Property name='Description' type='string'/> \
228L"<?xml version='1.0'?> \
230 <Property name='DisplayName' type='string'/> \
231 <Property name='Category' type='string'/> \
232 <Property name='Description' type='string'/> \
238L"<?xml version='1.0'?> \
240 <Property name='DisplayName' type='string'/> \
241 <Property name='Author' type='string'/> \
242 <Property name='Description' type='string'/> \
248L"<?xml version='1.0'?> \
250 <Property name='DisplayName' type='string'/> \
251 <Property name='Author' type='string'/> \
252 <Property name='Category' type='string'/> \
258L"<?xml version='1.0'?> \
260 <Property name='DisplayName' type='string'/> \
261 <Property name='Author' type='string'/> \
262 <Property name='Category' type='string'/> \
263 <Property name='Description'/> \
269L"<?xml version='1.0'?> \
271 <Property name='DisplayName' type='string' value='VariableInputs'/> \
272 <Property name='Author' type='string' value='The Wine Project'/> \
273 <Property name='Category' type='string' value='Test'/> \
274 <Property name='Description' type='string' value='Test effect.'/> \
275 <Inputs minimum='2' maximum='5' > \
276 <Input name='Source1'/> \
277 <Input name='Source2'/> \
278 <Input name='Source3'/> \
280 <Property name='Graph' type='iunknown'> \
281 <Property name='DisplayName' type='string' value='Graph'/> \
287 "void main(float4 pos : Position, out float4 output : SV_Position)\n"
293 "float4 main() : SV_Target\n"
295 " return float4(0.1, 0.2, 0.3, 0.4);\n"
471 ok(!!
threads[
i],
"Failed to create thread %u.\n",
i);
512 float radius_x,
float radius_y)
515 rect->radiusX = radius_x;
516 rect->radiusY = radius_y;
574 float sin_theta, cos_theta, tmp_11, tmp_12;
576 sin_theta =
sinf(theta);
577 cos_theta =
cosf(theta);
581 matrix->_11 = cos_theta * tmp_11 + sin_theta *
matrix->_21;
582 matrix->_12 = cos_theta * tmp_12 + sin_theta *
matrix->_22;
583 matrix->_21 = -sin_theta * tmp_11 + cos_theta *
matrix->_21;
584 matrix->_22 = -sin_theta * tmp_12 + cos_theta *
matrix->_22;
589 float tmp_11, tmp_12;
627 ID2D1GeometrySink_AddQuadraticBezier(
sink, &quadratic);
640 ID2D1GeometrySink_AddBezier(
sink, &
b);
652 hr = IDXGISurface_GetDevice(surface, &IID_ID3D10Device, (
void **)&
device);
653 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
654 hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Resource, (
void **)&src_resource);
655 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
657 hr = IDXGISurface_GetDesc(surface, &surface_desc);
658 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
670 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
676 ID3D10Resource_Release(src_resource);
677 ID3D10Device_Release(
device);
680 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
688 D3D11_TEXTURE2D_DESC texture_desc;
691 ID3D11Resource *src_resource;
696 hr = IDXGISurface_GetDevice(surface, &IID_ID3D11Device, (
void **)&
device);
697 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
698 hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Resource, (
void **)&src_resource);
699 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
701 hr = IDXGISurface_GetDesc(surface, &surface_desc);
702 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
703 texture_desc.Width = surface_desc.
Width;
704 texture_desc.Height = surface_desc.
Height;
705 texture_desc.MipLevels = 1;
706 texture_desc.ArraySize = 1;
707 texture_desc.Format = surface_desc.
Format;
708 texture_desc.SampleDesc = surface_desc.
SampleDesc;
709 texture_desc.Usage = D3D11_USAGE_STAGING;
710 texture_desc.BindFlags = 0;
711 texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
712 texture_desc.MiscFlags = 0;
714 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
716 rb->
width = texture_desc.Width;
717 rb->
height = texture_desc.Height;
721 ID3D11Resource_Release(src_resource);
722 ID3D11Device_Release(
device);
725 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
726 ID3D11DeviceContext_Release(
context);
753 ID3D11Device_Release(
device);
757 ID3D11DeviceContext_Release(
context);
775 return f < lower ? lower : f > upper ? upper :
f;
780 unsigned int diff =
x >
y ?
x -
y :
y -
x;
782 return diff <= max_diff;
788 &&
compare_uint((c1 >> 8) & 0xff, (c2 >> 8) & 0xff, max_diff)
789 &&
compare_uint((c1 >> 16) & 0xff, (c2 >> 16) & 0xff, max_diff)
790 &&
compare_uint((c1 >> 24) & 0xff, (c2 >> 24) & 0xff, max_diff);
829 float x2,
float y2,
float x3,
float y3,
unsigned int ulps)
837 unsigned int w,
unsigned int h,
const char *ref_sha1)
839 static const char hex_chars[] =
"0123456789abcdef";
849 ok(
ret,
"Failed to acquire crypt context.\n");
851 ok(
ret,
"Failed to create hash.\n");
853 for (
i = 0;
i <
h; ++
i)
858 ok(
ret,
"Failed to hash data.\n");
862 ok(
ret,
"Failed to get hash value.\n");
863 ok(hash_size ==
sizeof(
hash_data),
"Got unexpected hash size %lu.\n", hash_size);
866 ok(
ret,
"Failed to destroy hash.\n");
868 ok(
ret,
"Failed to release crypt context.\n");
870 for (
i = 0;
i < 20; ++
i)
901 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
904 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
907 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
910 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
914 IWICBitmapLock_Release(
lock);
921 static const char lookup[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
939 p[1] =
lookup[((
t[0] & 0x03) << 4) | ((
t[1] & 0xf0) >> 4)];
940 p[2] =
lookup[((
t[1] & 0x0f) << 2) | ((
t[2] & 0xc0) >> 6)];
945 trace(
"%.76s\n", output);
955 for (
i =
j;
i < 3; ++
i)
958 p[1] =
lookup[((
t[0] & 0x03) << 4) | ((
t[1] & 0xf0) >> 4)];
959 p[2] =
lookup[((
t[1] & 0x0f) << 2) | ((
t[2] & 0xc0) >> 6)];
964 trace(
"%.*s\n",
k * 4, output);
998 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
999 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1000 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f,
1001 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
1002 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
1003 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff,
1004 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
1005 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff,
1028 unsigned int x,
unsigned int y,
unsigned int w,
unsigned int h,
DWORD prev)
1038 if ((
i ||
j) && prev !=
row[
j])
1051 unsigned int w,
unsigned int h,
DWORD prev,
unsigned int max_diff,
const char *
ref)
1054 unsigned int i,
j,
span, diff;
1079 diff += ref_figure.
spans[
j];
1086 diff += ref_figure.
spans[
j];
1098 if (diff > max_diff)
1100 trace(
"diff %u > max_diff %u.\n", diff, max_diff);
1109 return diff <= max_diff;
1150 ID3D11Device *d3d11_device;
1158 hr = ID3D11Device_QueryInterface(d3d11_device, &IID_IDXGIDevice, (
void **)&
device);
1159 ID3D11Device_Release(d3d11_device);
1165 hr = ID3D10Device1_QueryInterface(d3d10_device, &IID_IDXGIDevice, (
void **)&
device);
1166 ID3D10Device1_Release(d3d10_device);
1169 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1176 RECT r = {0, 0, 640, 480};
1193 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1194 hr = IDXGIAdapter_GetParent(
adapter, &IID_IDXGIFactory, (
void **)&
factory);
1195 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1196 IDXGIAdapter_Release(
adapter);
1198 desc.BufferDesc.Width = 640;
1199 desc.BufferDesc.Height = 480;
1200 desc.BufferDesc.RefreshRate.Numerator = 60;
1201 desc.BufferDesc.RefreshRate.Denominator = 1;
1205 desc.SampleDesc.Count = 1;
1206 desc.SampleDesc.Quality = 0;
1208 desc.BufferCount = 1;
1210 desc.Windowed = windowed;
1215 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1216 IDXGIFactory_Release(
factory);
1228 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1242 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1243 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory, surface,
desc, &render_target);
1244 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1245 ID2D1Factory_Release(
factory);
1247 return render_target;
1256 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
1265#define release_test_context(ctx) release_test_context_(__LINE__, ctx)
1271 ID2D1Factory3_Release(
ctx->factory3);
1273 ID2D1Factory2_Release(
ctx->factory2);
1275 ID2D1Factory1_Release(
ctx->factory1);
1276 ID2D1DeviceContext_Release(
ctx->context);
1277 ID2D1RenderTarget_Release(
ctx->rt);
1278 ref = ID2D1Factory_Release(
ctx->factory);
1279 ok_(__FILE__,
line)(!
ref,
"Factory has %lu references left.\n",
ref);
1281 IDXGISurface_Release(
ctx->surface);
1282 IDXGISwapChain_Release(
ctx->swapchain);
1284 ref = IDXGIDevice_Release(
ctx->device);
1285 ok_(__FILE__,
line)(!
ref,
"Device has %lu references left.\n",
ref);
1288#define init_test_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11, D2D1_FACTORY_TYPE_SINGLE_THREADED)
1289#define init_test_multithreaded_context(ctx, d3d11) init_test_context_(__LINE__, ctx, d3d11, D2D1_FACTORY_TYPE_MULTI_THREADED)
1299 skip_(__FILE__,
line)(
"Failed to create device, skipping tests.\n");
1304 ok_(__FILE__,
line)(!!
ctx->window,
"Failed to create test window.\n");
1306 ok_(__FILE__,
line)(!!
ctx->swapchain,
"Failed to create swapchain.\n");
1307 hr = IDXGISwapChain_GetBuffer(
ctx->swapchain, 0, &IID_IDXGISurface, (
void **)&
ctx->surface);
1308 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get buffer, hr %#lx.\n",
hr);
1315 IDXGISurface_Release(
ctx->surface);
1316 IDXGISwapChain_Release(
ctx->swapchain);
1318 IDXGIDevice_Release(
ctx->device);
1322 ok_(__FILE__,
line)(!!
ctx->rt,
"Failed to create render target.\n");
1324 hr = ID2D1RenderTarget_QueryInterface(
ctx->rt, &IID_ID2D1DeviceContext, (
void **)&
ctx->context);
1325 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get device context, hr %#lx.\n",
hr);
1327 ID2D1RenderTarget_GetFactory(
ctx->rt, &
ctx->factory);
1328 ID2D1Factory_QueryInterface(
ctx->factory, &IID_ID2D1Factory1, (
void **)&
ctx->factory1);
1329 ID2D1Factory_QueryInterface(
ctx->factory, &IID_ID2D1Factory2, (
void **)&
ctx->factory2);
1330 ID2D1Factory_QueryInterface(
ctx->factory, &IID_ID2D1Factory3, (
void **)&
ctx->factory3);
1335#define check_bitmap_options(b, o) check_bitmap_options_(__LINE__, b, o)
1342 hr = ID2D1Bitmap_QueryInterface(
bitmap, &IID_ID2D1Bitmap1, (
void **)&bitmap1);
1346 options = ID2D1Bitmap1_GetOptions(bitmap1);
1347 ok_(__FILE__,
line)(
options == expected_options,
"Got unexpected bitmap options %#x, expected %#lx.\n",
1350 ID2D1Bitmap1_Release(bitmap1);
1353#define check_bitmap_surface(b, s, o) check_bitmap_surface_(__LINE__, b, s, o)
1361 hr = ID2D1Bitmap_QueryInterface(
bitmap, &IID_ID2D1Bitmap1, (
void **)&bitmap1);
1365 options = ID2D1Bitmap1_GetOptions(bitmap1);
1366 ok_(__FILE__,
line)(
options == expected_options,
"Got unexpected bitmap options %#x, expected %#lx.\n",
1369 surface = (
void *)0xdeadbeef;
1370 hr = ID2D1Bitmap1_GetSurface(bitmap1, &surface);
1373 unsigned int bind_flags = 0, misc_flags = 0;
1378 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get bitmap surface, hr %#lx.\n",
hr);
1379 ok_(__FILE__,
line)(!!surface,
"Expected surface instance.\n");
1382 hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Texture2D, (
void **)&
texture);
1383 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get texture pointer, hr %#lx.\n",
hr);
1386 ok_(__FILE__,
line)(
desc.Usage == 0,
"Unexpected usage %#x.\n",
desc.Usage);
1395 ok_(__FILE__,
line)(
desc.BindFlags == bind_flags,
"Unexpected bind flags %#x for bitmap options %#x.\n",
1397 ok_(__FILE__,
line)(!
desc.CPUAccessFlags,
"Unexpected cpu access flags %#x.\n",
desc.CPUAccessFlags);
1398 ok_(__FILE__,
line)(
desc.MiscFlags == misc_flags,
"Unexpected misc flags %#x for bitmap options %#x.\n",
1401 pixel_size = ID2D1Bitmap_GetPixelSize(
bitmap);
1404 ok_(__FILE__,
line)(
desc.Width == pixel_size.
width,
"Got width %u, expected %u.\n",
1406 ok_(__FILE__,
line)(
desc.Height == pixel_size.
height,
"Got height %u, expected %u.\n",
1409 ID3D10Texture2D_Release(
texture);
1411 IDXGISurface_Release(surface);
1416 ok_(__FILE__,
line)(!surface,
"Unexpected surface instance.\n");
1419 ID2D1Bitmap1_Release(bitmap1);
1430 if (
IsEqualGUID(iid, &IID_ID2D1SimplifiedGeometrySink)
1470 struct geometry_figure *
figure;
1472 if (
sink->figure_count ==
sink->figures_size)
1474 sink->figures_size *= 2;
1476 sink->figures_size *
sizeof(*
sink->figures));
1480 figure->begin = figure_begin;
1481 figure->start_point = start_point;
1482 figure->segments_size = 4;
1491 figure->segments_size *= 2;
1502 struct geometry_figure *
figure = &
sink->figures[
sink->figure_count - 1];
1503 struct geometry_segment *
segment;
1519 struct geometry_figure *
figure = &
sink->figures[
sink->figure_count - 1];
1520 struct geometry_segment *
segment;
1526 segment->type = SEGMENT_BEZIER;
1536 struct geometry_figure *
figure = &
sink->figures[
sink->figure_count - 1];
1538 figure->end = figure_end;
1568 sink->figures_size = 4;
1570 sink->figures_size *
sizeof(*
sink->figures));
1577 for (
i = 0;
i <
sink->figure_count; ++
i)
1584#define geometry_sink_check(a, b, c, d, e) geometry_sink_check_(__LINE__, a, b, c, d, e)
1588 const struct geometry_segment *
segment, *expected_segment;
1590 const struct geometry_figure *
figure;
1592 unsigned int segment_count;
1596 "Got unexpected fill mode %#x.\n",
sink->fill_mode);
1597 ok_(__FILE__,
line)(
sink->figure_count == figure_count,
1598 "Got unexpected figure count %u, expected %u.\n",
sink->figure_count, figure_count);
1599 ok_(__FILE__,
line)(!
sink->closed,
"Sink is closed.\n");
1601 for (
i = 0;
i < figure_count; ++
i)
1603 expected_figure = &expected_figures[
i];
1607 "Got unexpected figure %u begin %#x, expected %#x.\n",
1610 "Got unexpected figure %u end %#x, expected %#x.\n",
1614 ok_(__FILE__,
line)(
match,
"Got unexpected figure %u start point {%.8e, %.8e}, expected {%.8e, %.8e}.\n",
1618 "Got unexpected figure %u segment count %u, expected %u.\n",
1624 for (
j = 0;
j < segment_count; ++
j)
1626 expected_segment = &expected_figure->
segments[
j];
1629 "Got unexpected figure %u, segment %u type %#x, expected %#x.\n",
1630 i,
j,
segment->type, expected_segment->type);
1632 "Got unexpected figure %u, segment %u flags %#lx, expected %#lx.\n",
1633 i,
j,
segment->flags, expected_segment->flags);
1638 expected_segment->u.line.x, expected_segment->u.line.y,
ulps);
1639 ok_(__FILE__,
line)(
match,
"Got unexpected figure %u segment %u {%.8e, %.8e}, "
1640 "expected {%.8e, %.8e}.\n",
1642 expected_segment->u.line.x, expected_segment->u.line.y);
1645 case SEGMENT_BEZIER:
1647 expected_segment->u.bezier.point1.x, expected_segment->u.bezier.point1.y,
1648 expected_segment->u.bezier.point2.x, expected_segment->u.bezier.point2.y,
1649 expected_segment->u.bezier.point3.x, expected_segment->u.bezier.point3.y,
1651 ok_(__FILE__,
line)(
match,
"Got unexpected figure %u segment %u "
1652 "{%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}, "
1653 "expected {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
1657 expected_segment->u.bezier.point1.x, expected_segment->u.bezier.point1.y,
1658 expected_segment->u.bezier.point2.x, expected_segment->u.bezier.point2.y,
1659 expected_segment->u.bezier.point3.x, expected_segment->u.bezier.point3.y);
1670 ok_(__FILE__,
line)(
FALSE,
"Missing figure %u segment %u {%.8e, %.8e}.\n",
1673 case SEGMENT_BEZIER:
1674 ok_(__FILE__,
line)(
FALSE,
"Missing figure %u segment %u "
1675 "{%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}\n",
1683 for (
j = segment_count;
j <
figure->segment_count; ++
j)
1689 ok_(__FILE__,
line)(
FALSE,
"Got unexpected figure %u segment %u {%.8e, %.8e}.\n",
1692 case SEGMENT_BEZIER:
1693 ok_(__FILE__,
line)(
FALSE,
"Got unexpected figure %u segment %u "
1694 "{%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}\n",
1728 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1729 ok(dpi_x == 96.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1730 ok(dpi_y == 96.0f,
"Got unexpected dpi_x %.8e.\n", dpi_y);
1731 size = ID2D1RenderTarget_GetSize(
rt);
1732 ok(
size.width == 640.0f,
"Got unexpected width %.8e.\n",
size.width);
1733 ok(
size.height == 480.0f,
"Got unexpected height %.8e.\n",
size.height);
1734 pixel_size = ID2D1RenderTarget_GetPixelSize(
rt);
1735 ok(pixel_size.
width == 640,
"Got unexpected width %u.\n", pixel_size.
width);
1736 ok(pixel_size.
height == 480,
"Got unexpected height %u.\n", pixel_size.
height);
1738 ID2D1RenderTarget_GetTransform(
rt, &
matrix);
1740 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
1743 ID2D1RenderTarget_BeginDraw(
rt);
1746 ID2D1RenderTarget_Clear(
rt, &
color);
1748 ID2D1RenderTarget_SetDpi(
rt, 48.0f, 192.0f);
1749 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1750 ok(dpi_x == 48.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1751 ok(dpi_y == 192.0f,
"Got unexpected dpi_x %.8e.\n", dpi_y);
1752 size = ID2D1RenderTarget_GetSize(
rt);
1753 ok(
size.width == 1280.0f,
"Got unexpected width %.8e.\n",
size.width);
1754 ok(
size.height == 240.0f,
"Got unexpected height %.8e.\n",
size.height);
1755 pixel_size = ID2D1RenderTarget_GetPixelSize(
rt);
1756 ok(pixel_size.
width == 640,
"Got unexpected width %u.\n", pixel_size.
width);
1757 ok(pixel_size.
height == 480,
"Got unexpected height %u.\n", pixel_size.
height);
1767 ID2D1RenderTarget_Clear(
rt, &
color);
1768 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1769 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1771 ID2D1RenderTarget_SetDpi(
rt, 0.0f, 0.0f);
1772 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1773 ok(dpi_x == 96.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1774 ok(dpi_y == 96.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
1776 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 192.0f);
1777 ID2D1RenderTarget_SetDpi(
rt, 0.0f, 96.0f);
1778 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1779 ok(dpi_x == 192.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1780 ok(dpi_y == 192.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
1782 ID2D1RenderTarget_SetDpi(
rt, -10.0f, 96.0f);
1783 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1784 ok(dpi_x == 192.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1785 ok(dpi_y == 192.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
1787 ID2D1RenderTarget_SetDpi(
rt, 96.0f, -10.0f);
1788 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1789 ok(dpi_x == 192.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1790 ok(dpi_y == 192.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
1792 ID2D1RenderTarget_SetDpi(
rt, 96.0f, 0.0f);
1793 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
1794 ok(dpi_x == 192.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
1795 ok(dpi_y == 192.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
1797 ID2D1RenderTarget_SetDpi(
rt, 96.0f, 96.0f);
1803 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1807 ID2D1RenderTarget_Clear(
rt, &
color);
1808 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1813 ID2D1RenderTarget_SetTransform(
rt, &
identity);
1816 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1817 ID2D1RenderTarget_SetDpi(
rt, 48.0f, 192.0f);
1819 ID2D1RenderTarget_Clear(
rt, &
color);
1820 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1823 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1825 ok(
match,
"Surface does not match.\n");
1829 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1830 ID2D1RenderTarget_SetDpi(
rt, 96.0f, 96.0f);
1832 ID2D1RenderTarget_BeginDraw(
rt);
1835 ID2D1RenderTarget_Clear(
rt, &
color);
1838 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1842 ID2D1RenderTarget_Clear(
rt, &
color);
1843 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1846 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1850 ID2D1RenderTarget_Clear(
rt, &
color);
1851 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1853 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1857 ID2D1RenderTarget_Clear(
rt, &
color);
1858 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1861 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
1865 ID2D1RenderTarget_Clear(
rt, &
color);
1866 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1871 ID2D1RenderTarget_Clear(
rt, &
color);
1872 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1874 ID2D1RenderTarget_SetDpi(
rt, 48.0f, 192.0f);
1878 ID2D1RenderTarget_Clear(
rt, &
color);
1879 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1881 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
1885 ID2D1RenderTarget_Clear(
rt, &
color);
1886 ID2D1RenderTarget_PopAxisAlignedClip(
rt);
1889 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1891 ok(
match,
"Surface does not match.\n");
1935 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1936 hr = IDWriteFactory_CreateRenderingParams(dwrite_factory, &text_rendering_params1);
1937 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1938 IDWriteFactory_Release(dwrite_factory);
1942 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
1946 ID2D1RenderTarget_GetTags(
rt, &drawing_state.
tag1, &drawing_state.
tag2);
1947 ok(!drawing_state.
tag1 && !drawing_state.
tag2,
"Got unexpected tags %s:%s.\n",
1949 ID2D1RenderTarget_GetTransform(
rt, &drawing_state.
transform);
1951 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
1954 ID2D1RenderTarget_GetTextRenderingParams(
rt, &text_rendering_params2);
1955 ok(!text_rendering_params2,
"Got unexpected text rendering params %p.\n", text_rendering_params2);
1958 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1959 ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
1961 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
1964 ok(!drawing_state.
tag1 && !drawing_state.
tag2,
"Got unexpected tags %s:%s.\n",
1967 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
1970 ID2D1DrawingStateBlock_GetTextRenderingParams(state_block, &text_rendering_params2);
1971 ok(!text_rendering_params2,
"Got unexpected text rendering params %p.\n", text_rendering_params2);
1972 ID2D1DrawingStateBlock_Release(state_block);
1976 drawing_state.
tag1 = 0xdead;
1977 drawing_state.
tag2 = 0xbeef;
1979 hr = ID2D1Factory_CreateDrawingStateBlock(
factory, &drawing_state, text_rendering_params1, &state_block);
1980 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
1982 ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
1984 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
1987 ok(drawing_state.
tag1 == 0xdead && drawing_state.
tag2 == 0xbeef,
"Got unexpected tags %s:%s.\n",
1990 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
1993 ID2D1DrawingStateBlock_GetTextRenderingParams(state_block, &text_rendering_params2);
1994 ok(text_rendering_params2 == text_rendering_params1,
"Got unexpected text rendering params %p, expected %p.\n",
1995 text_rendering_params2, text_rendering_params1);
1996 IDWriteRenderingParams_Release(text_rendering_params2);
1998 ID2D1RenderTarget_RestoreDrawingState(
rt, state_block);
2002 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
2006 ID2D1RenderTarget_GetTags(
rt, &drawing_state.
tag1, &drawing_state.
tag2);
2007 ok(drawing_state.
tag1 == 0xdead && drawing_state.
tag2 == 0xbeef,
"Got unexpected tags %s:%s.\n",
2009 ID2D1RenderTarget_GetTransform(
rt, &drawing_state.
transform);
2011 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2014 ID2D1RenderTarget_GetTextRenderingParams(
rt, &text_rendering_params2);
2015 ok(text_rendering_params2 == text_rendering_params1,
"Got unexpected text rendering params %p, expected %p.\n",
2016 text_rendering_params2, text_rendering_params1);
2017 IDWriteRenderingParams_Release(text_rendering_params2);
2021 ID2D1RenderTarget_SetTags(
rt, 1, 2);
2022 ID2D1RenderTarget_SetTransform(
rt, &transform2);
2023 ID2D1RenderTarget_SetTextRenderingParams(
rt,
NULL);
2027 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
2031 ID2D1RenderTarget_GetTags(
rt, &drawing_state.
tag1, &drawing_state.
tag2);
2032 ok(drawing_state.
tag1 == 1 && drawing_state.
tag2 == 2,
"Got unexpected tags %s:%s.\n",
2034 ID2D1RenderTarget_GetTransform(
rt, &drawing_state.
transform);
2036 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2039 ID2D1RenderTarget_GetTextRenderingParams(
rt, &text_rendering_params2);
2040 ok(!text_rendering_params2,
"Got unexpected text rendering params %p.\n", text_rendering_params2);
2042 ID2D1RenderTarget_SaveDrawingState(
rt, state_block);
2044 ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
2046 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
2049 ok(drawing_state.
tag1 == 1 && drawing_state.
tag2 == 2,
"Got unexpected tags %s:%s.\n",
2052 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2055 ID2D1DrawingStateBlock_GetTextRenderingParams(state_block, &text_rendering_params2);
2056 ok(!text_rendering_params2,
"Got unexpected text rendering params %p.\n", text_rendering_params2);
2060 drawing_state.
tag1 = 3;
2061 drawing_state.
tag2 = 4;
2063 ID2D1DrawingStateBlock_SetDescription(state_block, &drawing_state);
2064 ID2D1DrawingStateBlock_SetTextRenderingParams(state_block, text_rendering_params1);
2066 ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
2068 "Got unexpected antialias mode %#x.\n", drawing_state.
antialiasMode);
2071 ok(drawing_state.
tag1 == 3 && drawing_state.
tag2 == 4,
"Got unexpected tags %s:%s.\n",
2074 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2077 ID2D1DrawingStateBlock_GetTextRenderingParams(state_block, &text_rendering_params2);
2078 ok(text_rendering_params2 == text_rendering_params1,
"Got unexpected text rendering params %p, expected %p.\n",
2079 text_rendering_params2, text_rendering_params1);
2080 IDWriteRenderingParams_Release(text_rendering_params2);
2087 hr = ID2D1DrawingStateBlock_QueryInterface(state_block, &IID_ID2D1DrawingStateBlock1, (
void **)&state_block1);
2088 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2090 ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
2092 "Got unexpected antialias mode %#x.\n", drawing_state1.
antialiasMode);
2095 ok(drawing_state1.
tag1 == 3 && drawing_state1.
tag2 == 4,
"Got unexpected tags %s:%s.\n",
2098 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2102 "Got unexpected primitive blend mode %#x.\n", drawing_state1.
primitiveBlend);
2104 ID2D1DrawingStateBlock1_GetTextRenderingParams(state_block1, &text_rendering_params2);
2105 ok(text_rendering_params2 == text_rendering_params1,
"Got unexpected text rendering params %p, expected %p.\n",
2106 text_rendering_params2, text_rendering_params1);
2107 IDWriteRenderingParams_Release(text_rendering_params2);
2111 ID2D1DrawingStateBlock1_SetDescription(state_block1, &drawing_state1);
2112 ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
2114 "Got unexpected primitive blend mode %#x.\n", drawing_state1.
primitiveBlend);
2116 "Got unexpected unit mode %#x.\n", drawing_state1.
unitMode);
2118 ID2D1DrawingStateBlock_SetDescription(state_block, &drawing_state);
2119 ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
2121 "Got unexpected primitive blend mode %#x.\n", drawing_state1.
primitiveBlend);
2123 "Got unexpected unit mode %#x.\n", drawing_state1.
unitMode);
2125 ID2D1DrawingStateBlock1_Release(state_block1);
2128 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2129 ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
2131 "Got unexpected antialias mode %#x.\n", drawing_state1.
antialiasMode);
2134 ok(drawing_state1.
tag1 == 0 && drawing_state1.
tag2 == 0,
"Got unexpected tags %s:%s.\n",
2137 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2141 "Got unexpected primitive blend mode %#x.\n", drawing_state1.
primitiveBlend);
2143 ID2D1DrawingStateBlock1_GetTextRenderingParams(state_block1, &text_rendering_params2);
2144 ok(!text_rendering_params2,
"Got unexpected text rendering params %p.\n", text_rendering_params2);
2145 ID2D1DrawingStateBlock1_Release(state_block1);
2148 ID2D1DrawingStateBlock_Release(state_block);
2150 refcount = IDWriteRenderingParams_Release(text_rendering_params1);
2151 ok(!refcount,
"Rendering params %lu references left.\n", refcount);
2154 ptr = (
void *)0xdeadbeef;
2155 ID2D1RenderTarget_BeginDraw(
rt);
2159 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2181 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
2185 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
2186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2187 opacity = ID2D1SolidColorBrush_GetOpacity(brush);
2188 ok(opacity == 1.0f,
"Got unexpected opacity %.8e.\n", opacity);
2190 ID2D1SolidColorBrush_GetTransform(brush, &tmp_matrix);
2192 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2193 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
2194 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
2195 tmp_color = ID2D1SolidColorBrush_GetColor(brush);
2197 "Got unexpected color {%.8e, %.8e, %.8e, %.8e}.\n",
2198 tmp_color.
r, tmp_color.
g, tmp_color.
b, tmp_color.
a);
2199 ID2D1SolidColorBrush_Release(brush);
2206 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color, &brush_desc, &brush);
2207 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2208 opacity = ID2D1SolidColorBrush_GetOpacity(brush);
2209 ok(opacity == 0.3f,
"Got unexpected opacity %.8e.\n", opacity);
2210 ID2D1SolidColorBrush_GetTransform(brush, &tmp_matrix);
2212 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2213 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
2214 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
2215 tmp_color = ID2D1SolidColorBrush_GetColor(brush);
2217 "Got unexpected color {%.8e, %.8e, %.8e, %.8e}.\n",
2218 tmp_color.
r, tmp_color.
g, tmp_color.
b, tmp_color.
a);
2220 ID2D1RenderTarget_BeginDraw(
rt);
2223 ID2D1RenderTarget_Clear(
rt, &
color);
2225 ID2D1SolidColorBrush_SetOpacity(brush, 1.0f);
2233 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2235 ID2D1SolidColorBrush_SetColor(brush, &
color);
2236 ID2D1SolidColorBrush_SetOpacity(brush, 0.75f);
2241 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2243 ok(
match,
"Surface does not match.\n");
2245 ID2D1SolidColorBrush_Release(brush);
2282 extend_mode_tests[] =
2296 0xffff0000, 0xffffff00, 0xff00ff00, 0xff00ffff,
2297 0xff0000ff, 0xffff00ff, 0xff000000, 0xff7f7f7f,
2298 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000,
2299 0xffffffff, 0xff000000, 0xff000000, 0xff000000,
2306 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
2312 bitmap_desc.
dpiX = 96.0f;
2313 bitmap_desc.
dpiY = 96.0f;
2315 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2318 hr = ID2D1Bitmap_QueryInterface(
bitmap, &IID_ID2D1Image, (
void **)&
image);
2326 ID2D1RenderTarget_BeginDraw(
rt);
2328 ID2D1RenderTarget_Clear(
rt, &
color);
2330 ID2D1RenderTarget_GetTransform(
rt, &tmp_matrix);
2334 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2377 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2379 ok(
match,
"Surface does not match.\n");
2381 ID2D1RenderTarget_BeginDraw(
rt);
2389 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2391 ok(
match,
"Surface does not match.\n");
2393 ID2D1RenderTarget_SetTransform(
rt, &tmp_matrix);
2394 ID2D1Image_Release(
image);
2400 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2401 ID2D1BitmapBrush_GetBitmap(brush, &tmp_bitmap);
2402 ok(tmp_bitmap ==
bitmap,
"Got unexpected bitmap %p, expected %p.\n", tmp_bitmap,
bitmap);
2403 ID2D1Bitmap_Release(tmp_bitmap);
2404 opacity = ID2D1BitmapBrush_GetOpacity(brush);
2405 ok(opacity == 1.0f,
"Got unexpected opacity %.8e.\n", opacity);
2407 ID2D1BitmapBrush_GetTransform(brush, &tmp_matrix);
2409 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2410 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
2411 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
2412 extend_mode = ID2D1BitmapBrush_GetExtendModeX(brush);
2414 extend_mode = ID2D1BitmapBrush_GetExtendModeY(brush);
2416 interpolation_mode = ID2D1BitmapBrush_GetInterpolationMode(brush);
2418 "Got unexpected interpolation mode %#x.\n", interpolation_mode);
2419 ID2D1BitmapBrush_Release(brush);
2422 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2426 ID2D1BitmapBrush_SetTransform(brush, &
matrix);
2429 ID2D1RenderTarget_BeginDraw(
rt);
2432 ID2D1RenderTarget_Clear(
rt, &
color);
2434 set_rect(&dst_rect, 40.0f, 120.0f, 120.0f, 360.0f);
2435 ID2D1RenderTarget_FillRectangle(
rt, &dst_rect, (
ID2D1Brush *)brush);
2441 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2445 ID2D1BitmapBrush_SetTransform(brush, &
matrix);
2446 ID2D1BitmapBrush_SetOpacity(brush, 0.75f);
2447 set_rect(&dst_rect, -80.0f, -60.0f, 80.0f, 60.0f);
2448 ID2D1RenderTarget_FillRectangle(
rt, &dst_rect, (
ID2D1Brush *)brush);
2453 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2456 set_rect(&dst_rect, -4.0f, 12.0f, -8.0f, 8.0f);
2457 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 0.75f,
2459 set_rect(&dst_rect, 0.0f, 8.0f, 4.0f, 12.0f);
2460 set_rect(&src_rect, 2.0f, 1.0f, 4.0f, 3.0f);
2461 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2463 set_rect(&dst_rect, 4.0f, 12.0f, 12.0f, 20.0f);
2465 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2467 set_rect(&dst_rect, 4.0f, 8.0f, 12.0f, 12.0f);
2469 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2471 set_rect(&dst_rect, 0.0f, 4.0f, 4.0f, 8.0f);
2473 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2477 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2479 ok(
match,
"Surface does not match.\n");
2482 ID2D1RenderTarget_BeginDraw(
rt);
2484 set_rect(&dst_rect, 4.0f, 8.0f, 8.0f, 12.0f);
2486 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2489 set_rect(&dst_rect, 1.0f, 8.0f, 4.0f, 12.0f);
2490 set_rect(&src_rect, 2.0f, 1.0f, 4.0f, 3.0f);
2491 ID2D1RenderTarget_DrawBitmap(
rt,
bitmap, &dst_rect, 1.0f,
2497 ok(
match,
"Surface does not match.\n");
2499 ID2D1RenderTarget_BeginDraw(
rt);
2500 ID2D1RenderTarget_Clear(
rt, &
color);
2507 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2509 ok(
match,
"Surface does not match.\n");
2511 ID2D1RenderTarget_BeginDraw(
rt);
2513 ID2D1RenderTarget_Clear(
rt, &
color);
2515 ID2D1BitmapBrush_SetOpacity(brush, 1.0f);
2518 ID2D1BitmapBrush_SetExtendModeX(brush, extend_mode_tests[
i].extend_mode_x);
2519 extend_mode = ID2D1BitmapBrush_GetExtendModeX(brush);
2520 ok(extend_mode == extend_mode_tests[
i].extend_mode_x,
2521 "Test %u: Got unexpected extend mode %#x, expected %#x.\n",
2522 i, extend_mode, extend_mode_tests[
i].extend_mode_x);
2523 ID2D1BitmapBrush_SetExtendModeY(brush, extend_mode_tests[
i].extend_mode_y);
2524 extend_mode = ID2D1BitmapBrush_GetExtendModeY(brush);
2525 ok(extend_mode == extend_mode_tests[
i].extend_mode_y,
2526 "Test %u: Got unexpected extend mode %#x, expected %#x.\n",
2527 i, extend_mode, extend_mode_tests[
i].extend_mode_y);
2531 ID2D1BitmapBrush_SetTransform(brush, &
matrix);
2532 ID2D1RenderTarget_FillRectangle(
rt, &extend_mode_tests[
i].
rect, (
ID2D1Brush *)brush);
2536 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2538 ok(
match,
"Surface does not match.\n");
2540 ID2D1Bitmap_Release(
bitmap);
2541 bitmap_desc.
dpiX = 96.0f / 20.0f;
2542 bitmap_desc.
dpiY = 96.0f / 60.0f;
2544 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2545 ID2D1BitmapBrush_SetBitmap(brush,
bitmap);
2547 ID2D1RenderTarget_BeginDraw(
rt);
2549 ID2D1RenderTarget_Clear(
rt, &
color);
2554 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2556 ID2D1BitmapBrush_SetTransform(brush, &
matrix);
2557 set_rect(&dst_rect, 0.0f, 0.0f, 80.0f, 240.0f);
2558 ID2D1RenderTarget_FillRectangle(
rt, &dst_rect, (
ID2D1Brush *)brush);
2562 set_rect(&dst_rect, -1.0f, -1.0f, 1.0f, 1.0f);
2563 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &dst_rect, &rectangle_geometry);
2564 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2570 &
matrix, &transformed_geometry);
2571 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2572 ID2D1RectangleGeometry_Release(rectangle_geometry);
2575 ID2D1RenderTarget_SetTransform(
rt, &
matrix);
2578 ID2D1BitmapBrush_SetTransform(brush, &
matrix);
2580 ID2D1TransformedGeometry_Release(transformed_geometry);
2583 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2585 ok(
match,
"Surface does not match.\n");
2587 if (
SUCCEEDED(ID2D1BitmapBrush_QueryInterface(brush, &IID_ID2D1BitmapBrush1, (
void **)&brush1)))
2591 interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
2593 "Unexpected interpolation mode %#x.\n", interpolation_mode);
2595 interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
2597 "Unexpected interpolation mode %#x.\n", interpolation_mode1);
2600 interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
2602 "Unexpected interpolation mode %#x.\n", interpolation_mode);
2604 interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
2606 "Unexpected interpolation mode %#x.\n", interpolation_mode1);
2608 ID2D1BitmapBrush1_SetInterpolationMode1(brush1, 100);
2609 interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
2611 "Unexpected interpolation mode %#x.\n", interpolation_mode1);
2613 ID2D1BitmapBrush1_SetInterpolationMode(brush1, 100);
2614 interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
2616 "Unexpected interpolation mode %#x.\n", interpolation_mode1);
2619 interpolation_mode = ID2D1BitmapBrush1_GetInterpolationMode(brush1);
2621 "Unexpected interpolation mode %#x.\n", interpolation_mode);
2623 interpolation_mode1 = ID2D1BitmapBrush1_GetInterpolationMode1(brush1);
2625 "Unexpected interpolation mode %#x.\n", interpolation_mode1);
2627 ID2D1BitmapBrush1_Release(brush1);
2630 ID2D1BitmapBrush_Release(brush);
2631 refcount = ID2D1Bitmap_Release(
bitmap);
2632 ok(!refcount,
"Bitmap has %lu references left.\n", refcount);
2660 0xffff0000, 0xffffff00, 0xff00ff00, 0xff00ffff,
2661 0xff0000ff, 0xffff00ff, 0xff000000, 0xff7f7f7f,
2662 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000,
2663 0xffffffff, 0xff000000, 0xff000000, 0xff000000,
2675 device_context =
ctx.context;
2680 bitmap_desc.
dpiX = 96.0f;
2681 bitmap_desc.
dpiY = 96.0f;
2683 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2685 hr = ID2D1Bitmap_QueryInterface(
bitmap, &IID_ID2D1Image, (
void **)&
image);
2686 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2694 hr = ID2D1DeviceContext_CreateImageBrush(device_context,
NULL, &image_brush_desc,
NULL, &brush);
2695 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2697 tmp_image = (
void *)0xdeadbeef;
2698 ID2D1ImageBrush_GetImage(brush, &tmp_image);
2699 ok(!tmp_image,
"Unexpected image %p.\n",
image);
2701 opacity = ID2D1ImageBrush_GetOpacity(brush);
2702 ok(opacity == 1.0f,
"Unexpected opacity %.8e.\n", opacity);
2703 ID2D1ImageBrush_GetTransform(brush, &
matrix);
2705 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2708 ID2D1ImageBrush_GetSourceRectangle(brush, &
rect);
2710 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
2713 extend_mode = ID2D1ImageBrush_GetExtendModeX(brush);
2715 extend_mode = ID2D1ImageBrush_GetExtendModeY(brush);
2717 interp_mode = ID2D1ImageBrush_GetInterpolationMode(brush);
2720 ID2D1ImageBrush_Release(brush);
2724 hr = ID2D1DeviceContext_CreateImageBrush(device_context,
image, &image_brush_desc,
NULL, &brush);
2725 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2729 ID2D1RenderTarget_BeginDraw(
ctx.rt);
2732 ID2D1RenderTarget_Clear(
ctx.rt, &
color);
2734 set_rect(&dst_rect, 40.0f, 120.0f, 120.0f, 360.0f);
2735 ID2D1RenderTarget_FillRectangle(
ctx.rt, &dst_rect, (
ID2D1Brush *)brush);
2738 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2740 ok(
match,
"Surface does not match.\n");
2742 ID2D1ImageBrush_Release(brush);
2745 hr = ID2D1DeviceContext_CreateImageBrush(device_context,
image, &image_brush_desc,
NULL, &brush);
2746 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2750 ID2D1RenderTarget_BeginDraw(
ctx.rt);
2753 ID2D1RenderTarget_Clear(
ctx.rt, &
color);
2755 set_rect(&dst_rect, 40.0f, 120.0f, 120.0f, 360.0f);
2756 ID2D1RenderTarget_FillRectangle(
ctx.rt, &dst_rect, (
ID2D1Brush *)brush);
2759 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2762 ok(
match,
"Surface does not match.\n");
2764 ID2D1ImageBrush_Release(brush);
2771 hr = ID2D1DeviceContext_CreateImageBrush(device_context,
image, &image_brush_desc, &brush_desc, &brush);
2772 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2774 ID2D1ImageBrush_GetImage(brush, &tmp_image);
2775 ok(tmp_image ==
image,
"Got unexpected image %p, expected %p.\n", tmp_image,
image);
2776 ID2D1Image_Release(tmp_image);
2778 opacity = ID2D1ImageBrush_GetOpacity(brush);
2779 ok(opacity == 2.0f,
"Unexpected opacity %.8e.\n", opacity);
2780 ID2D1ImageBrush_GetTransform(brush, &
matrix);
2782 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2785 ID2D1ImageBrush_Release(brush);
2787 ID2D1Image_Release(
image);
2788 refcount = ID2D1Bitmap_Release(
bitmap);
2789 ok(!refcount,
"Bitmap has %lu references left.\n", refcount);
2816 {0.0f, {1.0f, 0.0f, 0.0f, 1.0f}},
2817 {0.5f, {0.0f, 1.0f, 0.0f, 1.0f}},
2818 {1.0f, {0.0f, 0.0f, 1.0f, 1.0f}},
2827 {80, 80, 0xff857a00}, {240, 80, 0xff926d00}, {400, 80, 0xff9f6000}, {560, 80, 0xffac5300},
2828 {80, 240, 0xff00eb14}, {240, 240, 0xff00f807}, {400, 240, 0xff06f900}, {560, 240, 0xff13ec00},
2829 {80, 400, 0xff0053ac}, {240, 400, 0xff005fa0}, {400, 400, 0xff006c93}, {560, 400, 0xff007986},
2833 { 40, 30, 0xff005ba4}, {120, 30, 0xffffffff}, { 40, 60, 0xffffffff}, { 80, 60, 0xff00b44b},
2834 {120, 60, 0xff006c93}, {200, 60, 0xffffffff}, { 40, 90, 0xffffffff}, {120, 90, 0xff0ef100},
2835 {160, 90, 0xff00c53a}, {200, 90, 0xffffffff}, { 80, 120, 0xffffffff}, {120, 120, 0xffaf5000},
2836 {160, 120, 0xff679800}, {200, 120, 0xff1fe000}, {240, 120, 0xffffffff}, {160, 150, 0xffffffff},
2837 {200, 150, 0xffc03e00}, {240, 150, 0xffffffff}, {280, 150, 0xffffffff}, {320, 150, 0xffffffff},
2838 {240, 180, 0xffffffff}, {280, 180, 0xffff4040}, {320, 180, 0xffff4040}, {380, 180, 0xffffffff},
2839 {200, 210, 0xffffffff}, {240, 210, 0xffa99640}, {280, 210, 0xffb28d40}, {320, 210, 0xffbb8440},
2840 {360, 210, 0xffc47b40}, {400, 210, 0xffffffff}, {200, 240, 0xffffffff}, {280, 240, 0xff41fe40},
2841 {320, 240, 0xff49f540}, {360, 240, 0xff52ec40}, {440, 240, 0xffffffff}, {240, 270, 0xffffffff},
2842 {280, 270, 0xff408eb0}, {320, 270, 0xff4097a7}, {360, 270, 0xff40a19e}, {440, 270, 0xffffffff},
2843 {280, 300, 0xffffffff}, {320, 300, 0xff4040ff}, {360, 300, 0xff4040ff}, {400, 300, 0xff406ad4},
2844 {440, 300, 0xff4061de}, {480, 300, 0xff4057e7}, {520, 300, 0xff404ef1}, {280, 330, 0xffffffff},
2845 {360, 330, 0xffffffff}, {400, 330, 0xff40c17e}, {440, 330, 0xff40b788}, {480, 330, 0xff40ae91},
2846 {520, 330, 0xff40a49b}, {400, 360, 0xff57e740}, {440, 360, 0xff4ef140}, {480, 360, 0xff44fb40},
2847 {520, 360, 0xff40fa45}, {400, 390, 0xffae9140}, {440, 390, 0xffa49b40}, {480, 390, 0xff9aa540},
2848 {520, 390, 0xff90ae40},
2855 ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
2858 hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops,
ARRAY_SIZE(stops),
2860 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2864 hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &gradient_properties,
NULL, gradient, &brush);
2865 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2867 opacity = ID2D1LinearGradientBrush_GetOpacity(brush);
2868 ok(opacity == 1.0f,
"Got unexpected opacity %.8e.\n", opacity);
2870 ID2D1LinearGradientBrush_GetTransform(brush, &tmp_matrix);
2872 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
2873 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
2874 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
2875 p = ID2D1LinearGradientBrush_GetStartPoint(brush);
2876 ok(
compare_point(&
p, 320.0f, 0.0f, 0),
"Got unexpected start point {%.8e, %.8e}.\n",
p.x,
p.y);
2877 p = ID2D1LinearGradientBrush_GetEndPoint(brush);
2878 ok(
compare_point(&
p, 0.0f, 960.0f, 0),
"Got unexpected end point {%.8e, %.8e}.\n",
p.x,
p.y);
2879 ID2D1LinearGradientBrush_GetGradientStopCollection(brush, &tmp_gradient);
2880 ok(tmp_gradient == gradient,
"Got unexpected gradient %p, expected %p.\n", tmp_gradient, gradient);
2881 ID2D1GradientStopCollection_Release(tmp_gradient);
2883 ID2D1RenderTarget_BeginDraw(rt);
2886 ID2D1RenderTarget_Clear(rt, &
colour);
2888 set_rect(&
r, 0.0f, 0.0f, 320.0f, 960.0f);
2889 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
2891 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
2892 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2901 "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
2906 ID2D1RenderTarget_BeginDraw(rt);
2908 ID2D1RenderTarget_Clear(rt, &
colour);
2912 ID2D1RenderTarget_SetTransform(rt, &
matrix);
2917 ID2D1LinearGradientBrush_SetTransform(brush, &
matrix);
2919 set_rect(&
r, 0.0f, 0.0f, 80.0f, 240.0f);
2920 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
2926 ID2D1RenderTarget_SetTransform(rt, &
matrix);
2932 ID2D1LinearGradientBrush_SetTransform(brush, &
matrix);
2934 ID2D1LinearGradientBrush_SetOpacity(brush, 0.75f);
2935 set_rect(&
r, -80.0f, -60.0f, 80.0f, 60.0f);
2936 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
2941 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
r, &rectangle_geometry);
2942 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2948 &
matrix, &transformed_geometry);
2949 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2950 ID2D1RectangleGeometry_Release(rectangle_geometry);
2953 ID2D1RenderTarget_SetTransform(rt, &
matrix);
2954 ID2D1LinearGradientBrush_SetTransform(brush, &
matrix);
2956 ID2D1LinearGradientBrush_SetStartPoint(brush,
p);
2958 ID2D1LinearGradientBrush_SetEndPoint(brush,
p);
2960 ID2D1TransformedGeometry_Release(transformed_geometry);
2962 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
2963 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
2972 "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
2977 ID2D1LinearGradientBrush_Release(brush);
2978 refcount = ID2D1GradientStopCollection_Release(gradient);
2979 ok(!refcount,
"Gradient has %lu references left.\n", refcount);
3005 {0.0f, {1.0f, 0.0f, 0.0f, 1.0f}},
3006 {0.5f, {0.0f, 1.0f, 0.0f, 1.0f}},
3007 {1.0f, {0.0f, 0.0f, 1.0f, 1.0f}},
3016 {80, 80, 0xff0000ff}, {240, 80, 0xff00a857}, {400, 80, 0xff00d728}, {560, 80, 0xff0000ff},
3017 {80, 240, 0xff006699}, {240, 240, 0xff29d600}, {400, 240, 0xff966900}, {560, 240, 0xff00a55a},
3018 {80, 400, 0xff0000ff}, {240, 400, 0xff006e91}, {400, 400, 0xff007d82}, {560, 400, 0xff0000ff},
3022 { 40, 30, 0xff000df2}, {120, 30, 0xffffffff}, { 40, 60, 0xffffffff}, { 80, 60, 0xff00b04f},
3023 {120, 60, 0xff007689}, {200, 60, 0xffffffff}, { 40, 90, 0xffffffff}, {120, 90, 0xff47b800},
3024 {160, 90, 0xff00c13e}, {200, 90, 0xffffffff}, { 80, 120, 0xffffffff}, {120, 120, 0xff0000ff},
3025 {160, 120, 0xff6f9000}, {200, 120, 0xff00718e}, {240, 120, 0xffffffff}, {160, 150, 0xffffffff},
3026 {200, 150, 0xff00609f}, {240, 150, 0xffffffff}, {280, 150, 0xffffffff}, {320, 150, 0xffffffff},
3027 {240, 180, 0xffffffff}, {280, 180, 0xff4040ff}, {320, 180, 0xff40b788}, {380, 180, 0xffffffff},
3028 {200, 210, 0xffffffff}, {240, 210, 0xff4040ff}, {280, 210, 0xff4040ff}, {320, 210, 0xff76c940},
3029 {360, 210, 0xff40cc73}, {400, 210, 0xffffffff}, {200, 240, 0xffffffff}, {280, 240, 0xff4061de},
3030 {320, 240, 0xff9fa040}, {360, 240, 0xff404af5}, {440, 240, 0xffffffff}, {240, 270, 0xffffffff},
3031 {280, 270, 0xff40aa95}, {320, 270, 0xff4ef140}, {360, 270, 0xff4040ff}, {440, 270, 0xffffffff},
3032 {280, 300, 0xffffffff}, {320, 300, 0xff4093ac}, {360, 300, 0xff4040ff}, {400, 300, 0xff4040ff},
3033 {440, 300, 0xff404af5}, {480, 300, 0xff4045fa}, {520, 300, 0xff4040ff}, {280, 330, 0xffffffff},
3034 {360, 330, 0xffffffff}, {400, 330, 0xff4069d6}, {440, 330, 0xff40c579}, {480, 330, 0xff40e956},
3035 {520, 330, 0xff4072cd}, {400, 360, 0xff408ab4}, {440, 360, 0xff49f540}, {480, 360, 0xffb98640},
3036 {520, 360, 0xff40dc62}, {400, 390, 0xff405ee1}, {440, 390, 0xff40d56a}, {480, 390, 0xff62dd40},
3037 {520, 390, 0xff4059e6},
3044 ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
3047 hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops,
ARRAY_SIZE(stops),
3049 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3053 gradient_properties.
radiusX = 160.0f;
3054 gradient_properties.
radiusY = 480.0f;
3055 hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &gradient_properties,
NULL, gradient, &brush);
3056 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3058 f = ID2D1RadialGradientBrush_GetOpacity(brush);
3059 ok(
f == 1.0f,
"Got unexpected opacity %.8e.\n",
f);
3061 ID2D1RadialGradientBrush_GetTransform(brush, &tmp_matrix);
3063 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
3064 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
3065 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
3066 p = ID2D1RadialGradientBrush_GetCenter(brush);
3067 ok(
compare_point(&
p, 160.0f, 480.0f, 0),
"Got unexpected center {%.8e, %.8e}.\n",
p.x,
p.y);
3068 p = ID2D1RadialGradientBrush_GetGradientOriginOffset(brush);
3069 ok(
compare_point(&
p, 40.0f, -120.0f, 0),
"Got unexpected origin offset {%.8e, %.8e}.\n",
p.x,
p.y);
3070 f = ID2D1RadialGradientBrush_GetRadiusX(brush);
3072 f = ID2D1RadialGradientBrush_GetRadiusY(brush);
3074 ID2D1RadialGradientBrush_GetGradientStopCollection(brush, &tmp_gradient);
3075 ok(tmp_gradient == gradient,
"Got unexpected gradient %p, expected %p.\n", tmp_gradient, gradient);
3076 ID2D1GradientStopCollection_Release(tmp_gradient);
3078 ID2D1RenderTarget_BeginDraw(rt);
3081 ID2D1RenderTarget_Clear(rt, &
colour);
3083 set_rect(&
r, 0.0f, 0.0f, 320.0f, 960.0f);
3084 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
3086 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
3087 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3096 "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
3101 ID2D1RenderTarget_BeginDraw(rt);
3103 ID2D1RenderTarget_Clear(rt, &
colour);
3107 ID2D1RenderTarget_SetTransform(rt, &
matrix);
3112 ID2D1RadialGradientBrush_SetTransform(brush, &
matrix);
3114 set_rect(&
r, 0.0f, 0.0f, 80.0f, 240.0f);
3115 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
3121 ID2D1RenderTarget_SetTransform(rt, &
matrix);
3127 ID2D1RadialGradientBrush_SetTransform(brush, &
matrix);
3129 ID2D1RadialGradientBrush_SetOpacity(brush, 0.75f);
3130 set_rect(&
r, -80.0f, -60.0f, 80.0f, 60.0f);
3131 ID2D1RenderTarget_FillRectangle(rt, &
r, (
ID2D1Brush *)brush);
3136 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
r, &rectangle_geometry);
3137 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3143 &
matrix, &transformed_geometry);
3144 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3145 ID2D1RectangleGeometry_Release(rectangle_geometry);
3148 ID2D1RenderTarget_SetTransform(rt, &
matrix);
3149 ID2D1RadialGradientBrush_SetTransform(brush, &
matrix);
3151 ID2D1RadialGradientBrush_SetCenter(brush,
p);
3152 ID2D1RadialGradientBrush_SetRadiusX(brush, -40.0f);
3153 ID2D1RadialGradientBrush_SetRadiusY(brush, 120.0f);
3155 ID2D1RadialGradientBrush_SetGradientOriginOffset(brush,
p);
3157 ID2D1TransformedGeometry_Release(transformed_geometry);
3159 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
3160 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3169 "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
3174 ID2D1RadialGradientBrush_Release(brush);
3175 refcount = ID2D1GradientStopCollection_Release(gradient);
3176 ok(!refcount,
"Gradient has %lu references left.\n", refcount);
3183 unsigned int idx = 0;
3188 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3208 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3224 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3231 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3238 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3245 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3255 unsigned int idx = 0;
3260 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3269 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3278 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3287 ID2D1GeometrySink_BeginFigure(
sink,
point, begin);
3314 static const struct geometry_segment expected_segments[] =
3317 {SEGMENT_LINE, {{{ 55.0f, 20.0f}}}},
3318 {SEGMENT_LINE, {{{ 55.0f, 220.0f}}}},
3319 {SEGMENT_LINE, {{{ 25.0f, 220.0f}}}},
3320 {SEGMENT_LINE, {{{ 25.0f, 100.0f}}}},
3321 {SEGMENT_LINE, {{{ 75.0f, 100.0f}}}},
3322 {SEGMENT_LINE, {{{ 75.0f, 300.0f}}}},
3323 {SEGMENT_LINE, {{{ 5.0f, 300.0f}}}},
3324 {SEGMENT_LINE, {{{ 5.0f, 60.0f}}}},
3325 {SEGMENT_LINE, {{{ 45.0f, 60.0f}}}},
3326 {SEGMENT_LINE, {{{ 45.0f, 180.0f}}}},
3327 {SEGMENT_LINE, {{{ 35.0f, 180.0f}}}},
3328 {SEGMENT_LINE, {{{ 35.0f, 140.0f}}}},
3329 {SEGMENT_LINE, {{{ 65.0f, 140.0f}}}},
3330 {SEGMENT_LINE, {{{ 65.0f, 260.0f}}}},
3331 {SEGMENT_LINE, {{{ 15.0f, 260.0f}}}},
3333 {SEGMENT_LINE, {{{155.0f, 160.0f}}}},
3334 {SEGMENT_LINE, {{{ 85.0f, 160.0f}}}},
3335 {SEGMENT_LINE, {{{ 85.0f, 300.0f}}}},
3336 {SEGMENT_LINE, {{{120.0f, 300.0f}}}},
3337 {SEGMENT_LINE, {{{120.0f, 20.0f}}}},
3338 {SEGMENT_LINE, {{{155.0f, 20.0f}}}},
3339 {SEGMENT_LINE, {{{155.0f, 160.0f}}}},
3340 {SEGMENT_LINE, {{{ 85.0f, 160.0f}}}},
3341 {SEGMENT_LINE, {{{ 85.0f, 20.0f}}}},
3342 {SEGMENT_LINE, {{{120.0f, 20.0f}}}},
3343 {SEGMENT_LINE, {{{120.0f, 300.0f}}}},
3345 {SEGMENT_LINE, {{{165.0f, 300.0f}}}},
3346 {SEGMENT_LINE, {{{235.0f, 300.0f}}}},
3347 {SEGMENT_LINE, {{{235.0f, 20.0f}}}},
3349 {SEGMENT_LINE, {{{225.0f, 260.0f}}}},
3350 {SEGMENT_LINE, {{{175.0f, 260.0f}}}},
3351 {SEGMENT_LINE, {{{175.0f, 60.0f}}}},
3353 {SEGMENT_LINE, {{{185.0f, 220.0f}}}},
3354 {SEGMENT_LINE, {{{185.0f, 100.0f}}}},
3355 {SEGMENT_LINE, {{{215.0f, 100.0f}}}},
3357 {SEGMENT_LINE, {{{205.0f, 180.0f}}}},
3358 {SEGMENT_LINE, {{{205.0f, 140.0f}}}},
3359 {SEGMENT_LINE, {{{195.0f, 140.0f}}}},
3361 {SEGMENT_LINE, {{{135.0f, 620.0f}}}},
3362 {SEGMENT_LINE, {{{135.0f, 420.0f}}}},
3363 {SEGMENT_LINE, {{{105.0f, 420.0f}}}},
3364 {SEGMENT_LINE, {{{105.0f, 540.0f}}}},
3365 {SEGMENT_LINE, {{{155.0f, 540.0f}}}},
3366 {SEGMENT_LINE, {{{155.0f, 340.0f}}}},
3367 {SEGMENT_LINE, {{{ 85.0f, 340.0f}}}},
3368 {SEGMENT_LINE, {{{ 85.0f, 580.0f}}}},
3369 {SEGMENT_LINE, {{{125.0f, 580.0f}}}},
3370 {SEGMENT_LINE, {{{125.0f, 460.0f}}}},
3371 {SEGMENT_LINE, {{{115.0f, 460.0f}}}},
3372 {SEGMENT_LINE, {{{115.0f, 500.0f}}}},
3373 {SEGMENT_LINE, {{{145.0f, 500.0f}}}},
3374 {SEGMENT_LINE, {{{145.0f, 380.0f}}}},
3375 {SEGMENT_LINE, {{{ 95.0f, 380.0f}}}},
3377 {SEGMENT_LINE, {{{235.0f, 480.0f}}}},
3378 {SEGMENT_LINE, {{{165.0f, 480.0f}}}},
3379 {SEGMENT_LINE, {{{165.0f, 340.0f}}}},
3380 {SEGMENT_LINE, {{{200.0f, 340.0f}}}},
3381 {SEGMENT_LINE, {{{200.0f, 620.0f}}}},
3382 {SEGMENT_LINE, {{{235.0f, 620.0f}}}},
3383 {SEGMENT_LINE, {{{235.0f, 480.0f}}}},
3384 {SEGMENT_LINE, {{{165.0f, 480.0f}}}},
3385 {SEGMENT_LINE, {{{165.0f, 620.0f}}}},
3386 {SEGMENT_LINE, {{{200.0f, 620.0f}}}},
3387 {SEGMENT_LINE, {{{200.0f, 340.0f}}}},
3389 {SEGMENT_LINE, {{{245.0f, 340.0f}}}},
3390 {SEGMENT_LINE, {{{315.0f, 340.0f}}}},
3391 {SEGMENT_LINE, {{{315.0f, 620.0f}}}},
3393 {SEGMENT_LINE, {{{305.0f, 380.0f}}}},
3394 {SEGMENT_LINE, {{{255.0f, 380.0f}}}},
3395 {SEGMENT_LINE, {{{255.0f, 580.0f}}}},
3397 {SEGMENT_LINE, {{{265.0f, 420.0f}}}},
3398 {SEGMENT_LINE, {{{265.0f, 540.0f}}}},
3399 {SEGMENT_LINE, {{{295.0f, 540.0f}}}},
3401 {SEGMENT_LINE, {{{285.0f, 460.0f}}}},
3402 {SEGMENT_LINE, {{{285.0f, 500.0f}}}},
3403 {SEGMENT_LINE, {{{275.0f, 500.0f}}}},
3405 {SEGMENT_BEZIER, {{{2.83333340e+01f, 1.60000000e+02f},
3406 {4.00000000e+01f, 1.13333336e+02f},
3407 {4.00000000e+01f, 2.00000000e+01f}}}},
3408 {SEGMENT_BEZIER, {{{4.00000000e+01f, 1.13333336e+02f},
3409 {5.16666641e+01f, 1.60000000e+02f},
3410 {7.50000000e+01f, 1.60000000e+02f}}}},
3411 {SEGMENT_BEZIER, {{{5.16666641e+01f, 1.60000000e+02f},
3412 {4.00000000e+01f, 2.06666656e+02f},
3413 {4.00000000e+01f, 3.00000000e+02f}}}},
3414 {SEGMENT_BEZIER, {{{4.00000000e+01f, 2.06666656e+02f},
3415 {2.83333340e+01f, 1.60000000e+02f},
3416 {5.00000000e+00f, 1.60000000e+02f}}}},
3418 {SEGMENT_BEZIER, {{{2.00000000e+01f, 1.06666664e+02f},
3419 {2.66666660e+01f, 8.00000000e+01f},
3420 {4.00000000e+01f, 8.00000000e+01f}}}},
3421 {SEGMENT_BEZIER, {{{5.33333321e+01f, 8.00000000e+01f},
3422 {6.00000000e+01f, 1.06666664e+02f},
3423 {6.00000000e+01f, 1.60000000e+02f}}}},
3424 {SEGMENT_BEZIER, {{{6.00000000e+01f, 2.13333328e+02f},
3425 {5.33333321e+01f, 2.40000000e+02f},
3426 {4.00000000e+01f, 2.40000000e+02f}}}},
3427 {SEGMENT_BEZIER, {{{2.66666660e+01f, 2.40000000e+02f},
3428 {2.00000000e+01f, 2.13333328e+02f},
3429 {2.00000000e+01f, 1.60000000e+02f}}}},
3431 {SEGMENT_BEZIER, {{{2.83333340e+01f, 6.12000000e+02f},
3432 {4.00000000e+01f, 6.58666687e+02f},
3433 {4.00000000e+01f, 7.52000000e+02f}}}},
3434 {SEGMENT_BEZIER, {{{4.00000000e+01f, 6.58666687e+02f},
3435 {5.16666641e+01f, 6.12000000e+02f},
3436 {7.50000000e+01f, 6.12000000e+02f}}}},
3437 {SEGMENT_BEZIER, {{{5.16666641e+01f, 6.12000000e+02f},
3438 {4.00000000e+01f, 5.65333313e+02f},
3439 {4.00000000e+01f, 4.72000000e+02f}}}},
3440 {SEGMENT_BEZIER, {{{4.00000000e+01f, 5.65333313e+02f},
3441 {2.83333340e+01f, 6.12000000e+02f},
3442 {5.00000000e+00f, 6.12000000e+02f}}}},
3444 {SEGMENT_BEZIER, {{{2.00000000e+01f, 6.65333313e+02f},
3445 {2.66666660e+01f, 6.92000000e+02f},
3446 {4.00000000e+01f, 6.92000000e+02f}}}},
3447 {SEGMENT_BEZIER, {{{5.33333321e+01f, 6.92000000e+02f},
3448 {6.00000000e+01f, 6.65333313e+02f},
3449 {6.00000000e+01f, 6.12000000e+02f}}}},
3450 {SEGMENT_BEZIER, {{{6.00000000e+01f, 5.58666687e+02f},
3451 {5.33333321e+01f, 5.32000000e+02f},
3452 {4.00000000e+01f, 5.32000000e+02f}}}},
3453 {SEGMENT_BEZIER, {{{2.66666660e+01f, 5.32000000e+02f},
3454 {2.00000000e+01f, 5.58666687e+02f},
3455 {2.00000000e+01f, 6.12000000e+02f}}}},
3457 {SEGMENT_BEZIER, {{{1.91750427e+02f, 1.27275856e+02f},
3458 {2.08249573e+02f, 1.27275856e+02f},
3459 {2.24748734e+02f, 6.12792168e+01f}}}},
3460 {SEGMENT_BEZIER, {{{2.08249573e+02f, 1.27275856e+02f},
3461 {2.08249573e+02f, 1.93272476e+02f},
3462 {2.24748734e+02f, 2.59269104e+02f}}}},
3463 {SEGMENT_BEZIER, {{{2.08249573e+02f, 1.93272476e+02f},
3464 {1.91750427e+02f, 1.93272476e+02f},
3465 {1.75251266e+02f, 2.59269104e+02f}}}},
3466 {SEGMENT_BEZIER, {{{1.91750427e+02f, 1.93272476e+02f},
3467 {1.91750427e+02f, 1.27275856e+02f},
3468 {1.75251266e+02f, 6.12792168e+01f}}}},
3470 {SEGMENT_BEZIER, {{{1.95285950e+02f, 6.59932632e+01f},
3471 {2.04714050e+02f, 6.59932632e+01f},
3472 {2.14142136e+02f, 1.03705627e+02f}}}},
3473 {SEGMENT_BEZIER, {{{2.23570221e+02f, 1.41417984e+02f},
3474 {2.23570221e+02f, 1.79130356e+02f},
3475 {2.14142136e+02f, 2.16842712e+02f}}}},
3476 {SEGMENT_BEZIER, {{{2.04714050e+02f, 2.54555069e+02f},
3477 {1.95285950e+02f, 2.54555069e+02f},
3478 {1.85857864e+02f, 2.16842712e+02f}}}},
3479 {SEGMENT_BEZIER, {{{1.76429779e+02f, 1.79130356e+02f},
3480 {1.76429779e+02f, 1.41417984e+02f},
3481 {1.85857864e+02f, 1.03705627e+02f}}}},
3483 {SEGMENT_BEZIER, {{{1.11847351e+02f, 4.46888092e+02f},
3484 {1.11847351e+02f, 5.12884705e+02f},
3485 {9.53481979e+01f, 5.78881348e+02f}}}},
3486 {SEGMENT_BEZIER, {{{1.11847351e+02f, 5.12884705e+02f},
3487 {1.28346512e+02f, 5.12884705e+02f},
3488 {1.44845673e+02f, 5.78881348e+02f}}}},
3489 {SEGMENT_BEZIER, {{{1.28346512e+02f, 5.12884705e+02f},
3490 {1.28346512e+02f, 4.46888092e+02f},
3491 {1.44845673e+02f, 3.80891479e+02f}}}},
3492 {SEGMENT_BEZIER, {{{1.28346512e+02f, 4.46888092e+02f},
3493 {1.11847351e+02f, 4.46888092e+02f},
3494 {9.53481979e+01f, 3.80891479e+02f}}}},
3496 {SEGMENT_BEZIER, {{{9.65267105e+01f, 4.61030243e+02f},
3497 {9.65267105e+01f, 4.98742584e+02f},
3498 {1.05954803e+02f, 5.36454956e+02f}}}},
3499 {SEGMENT_BEZIER, {{{1.15382889e+02f, 5.74167297e+02f},
3500 {1.24810982e+02f, 5.74167297e+02f},
3501 {1.34239075e+02f, 5.36454956e+02f}}}},
3502 {SEGMENT_BEZIER, {{{1.43667160e+02f, 4.98742584e+02f},
3503 {1.43667160e+02f, 4.61030243e+02f},
3504 {1.34239075e+02f, 4.23317871e+02f}}}},
3505 {SEGMENT_BEZIER, {{{1.24810982e+02f, 3.85605499e+02f},
3506 {1.15382889e+02f, 3.85605499e+02f},
3507 {1.05954803e+02f, 4.23317871e+02f}}}},
3509 {SEGMENT_LINE, {{{ 40.0f, 20.0f}}}},
3510 {SEGMENT_LINE, {{{ 75.0f, 160.0f}}}},
3511 {SEGMENT_LINE, {{{ 40.0f, 300.0f}}}},
3512 {SEGMENT_LINE, {{{ 5.0f, 160.0f}}}},
3514 {SEGMENT_LINE, {{{ 40.0f, 80.0f}}}},
3515 {SEGMENT_LINE, {{{ 60.0f, 160.0f}}}},
3516 {SEGMENT_LINE, {{{ 40.0f, 240.0f}}}},
3517 {SEGMENT_LINE, {{{ 20.0f, 160.0f}}}},
3519 {SEGMENT_LINE, {{{ 40.0f, 752.0f}}}},
3520 {SEGMENT_LINE, {{{ 75.0f, 612.0f}}}},
3521 {SEGMENT_LINE, {{{ 40.0f, 472.0f}}}},
3522 {SEGMENT_LINE, {{{ 5.0f, 612.0f}}}},
3524 {SEGMENT_LINE, {{{ 40.0f, 692.0f}}}},
3525 {SEGMENT_LINE, {{{ 60.0f, 612.0f}}}},
3526 {SEGMENT_LINE, {{{ 40.0f, 532.0f}}}},
3527 {SEGMENT_LINE, {{{ 20.0f, 612.0f}}}},
3529 {SEGMENT_LINE, {{{2.03125019e+01f, 1.51250000e+02f}}}},
3533 {SEGMENT_LINE, {{{4.21875000e+01f, 8.12500076e+01f}}}},
3537 {SEGMENT_LINE, {{{5.96875000e+01f, 1.68750000e+02f}}}},
3541 {SEGMENT_LINE, {{{3.78125000e+01f, 2.38750000e+02f}}}},
3546 {SEGMENT_LINE, {{{2.50000000e+01f, 1.00000000e+02f}}}},
3548 {SEGMENT_LINE, {{{5.50000000e+01f, 1.00000000e+02f}}}},
3550 {SEGMENT_LINE, {{{5.50000000e+01f, 2.20000000e+02f}}}},
3552 {SEGMENT_LINE, {{{2.50000000e+01f, 2.20000000e+02f}}}},
3555 {SEGMENT_LINE, {{{2.03125019e+01f, 6.20750000e+02f}}}},
3559 {SEGMENT_LINE, {{{4.21875000e+01f, 6.90750000e+02f}}}},
3563 {SEGMENT_LINE, {{{5.96875000e+01f, 6.03250000e+02f}}}},
3567 {SEGMENT_LINE, {{{3.78125000e+01f, 5.33250000e+02f}}}},
3572 {SEGMENT_LINE, {{{2.50000000e+01f, 6.72000000e+02f}}}},
3574 {SEGMENT_LINE, {{{5.50000000e+01f, 6.72000000e+02f}}}},
3576 {SEGMENT_LINE, {{{5.50000000e+01f, 5.52000000e+02f}}}},
3578 {SEGMENT_LINE, {{{2.50000000e+01f, 5.52000000e+02f}}}},
3581 {SEGMENT_LINE, {{{ 75.0f, 300.0f}}}},
3582 {SEGMENT_LINE, {{{ 5.0f, 300.0f}}}},
3584 {SEGMENT_LINE, {{{ 40.0f, 100.0f}}}},
3585 {SEGMENT_BEZIER, {{{4.00000000e+01f, 7.66666666e+01f},
3586 {3.33333333e+01f, 7.00000000e+01f},
3587 {2.00000000e+01f, 8.00000000e+01f}}}},
3588 {SEGMENT_LINE, {{{ 60.0f, 40.0f}}}},
3589 {SEGMENT_BEZIER, {{{8.33333333e+01f, 4.00000000e+01f},
3590 {9.00000000e+01f, 3.33333333e+01f},
3591 {8.00000000e+01f, 2.00000000e+01f}}}},
3592 {SEGMENT_LINE, {{{140.0f, 160.0f}}}},
3593 {SEGMENT_BEZIER, {{{1.16666666e+02f, 1.60000000e+02f},
3594 {1.10000000e+02f, 1.66666666e+02f},
3595 {1.20000000e+02f, 1.80000000e+02f}}}},
3596 {SEGMENT_LINE, {{{170.0f, 110.0f}}}},
3597 {SEGMENT_BEZIER, {{{1.70000000e+02f, 1.26666666e+02f},
3598 {1.73333333e+02f, 1.30000000e+02f},
3599 {1.80000000e+02f, 1.20000000e+02f}}}},
3624 {1.75251266e+02f, 6.12792168e+01f}, 4, &expected_segments[92]},
3626 {1.85857864e+02f, 1.03705627e+02f}, 4, &expected_segments[96]},
3628 {9.53481979e+01f, 3.80891479e+02f}, 4, &expected_segments[100]},
3630 {1.05954803e+02f, 4.23317871e+02f}, 4, &expected_segments[104]},
3656 ID2D1RenderTarget_SetDpi(rt, 192.0f, 48.0f);
3659 hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &
color,
NULL, &brush);
3660 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3663 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3664 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3665 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3667 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3669 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3670 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3671 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3673 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3675 hr = ID2D1GeometrySink_Close(
sink);
3676 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3677 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3678 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3679 ok(!
count,
"Got unexpected figure count %u.\n",
count);
3680 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3681 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3682 ok(!
count,
"Got unexpected segment count %u.\n",
count);
3683 hr = ID2D1GeometrySink_Close(
sink);
3685 ID2D1GeometrySink_Release(
sink);
3686 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3687 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3688 ok(!
count,
"Got unexpected figure count %u.\n",
count);
3689 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3690 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3691 ok(!
count,
"Got unexpected segment count %u.\n",
count);
3692 ID2D1PathGeometry_Release(geometry);
3695 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3696 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3697 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3698 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3699 hr = ID2D1GeometrySink_Close(
sink);
3700 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3701 ID2D1GeometrySink_Release(
sink);
3702 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3704 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3705 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3706 ok(!
count,
"Got unexpected figure count %u.\n",
count);
3707 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3708 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3709 ok(!
count,
"Got unexpected segment count %u.\n",
count);
3710 ID2D1PathGeometry_Release(geometry);
3713 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3714 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3715 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3716 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3717 hr = ID2D1PathGeometry_Open(geometry, &tmp_sink);
3719 hr = ID2D1GeometrySink_Close(
sink);
3720 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3721 ID2D1GeometrySink_Release(
sink);
3722 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3723 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3724 ok(!
count,
"Got unexpected figure count %u.\n",
count);
3725 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3726 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3727 ok(!
count,
"Got unexpected segment count %u.\n",
count);
3728 ID2D1PathGeometry_Release(geometry);
3731 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3732 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3733 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3734 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3736 hr = ID2D1GeometrySink_Close(
sink);
3739 hr = ID2D1GeometrySink_Close(
sink);
3741 ID2D1GeometrySink_Release(
sink);
3742 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3744 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3746 ID2D1PathGeometry_Release(geometry);
3749 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3750 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3751 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3752 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3754 hr = ID2D1GeometrySink_Close(
sink);
3756 ID2D1GeometrySink_Release(
sink);
3757 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3759 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3761 ID2D1PathGeometry_Release(geometry);
3764 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3765 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3766 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3767 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3772 hr = ID2D1GeometrySink_Close(
sink);
3775 hr = ID2D1GeometrySink_Close(
sink);
3777 ID2D1GeometrySink_Release(
sink);
3778 ID2D1PathGeometry_Release(geometry);
3781 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3782 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3783 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3784 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3786 hr = ID2D1GeometrySink_Close(
sink);
3789 ID2D1GeometrySink_Release(
sink);
3790 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3792 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3794 ID2D1PathGeometry_Release(geometry);
3797 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3798 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3799 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3800 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3804 hr = ID2D1GeometrySink_Close(
sink);
3805 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3806 ID2D1GeometrySink_Release(
sink);
3807 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3808 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3809 ok(
count == 1,
"Got unexpected figure count %u.\n",
count);
3810 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3811 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3812 ok(
count == 1,
"Got unexpected segment count %u.\n",
count);
3815 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3816 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3818 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3824 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
3825 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3827 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3830 ID2D1PathGeometry_Release(geometry);
3833 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3834 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3835 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3836 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3843 hr = ID2D1GeometrySink_Close(
sink);
3844 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3845 ID2D1GeometrySink_Release(
sink);
3846 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3847 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3848 ok(
count == 1,
"Got unexpected figure count %u.\n",
count);
3849 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3850 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3851 ok(
count == 4,
"Got unexpected segment count %u.\n",
count);
3852 ID2D1PathGeometry_Release(geometry);
3855 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3856 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3860 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3863 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3866 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3867 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3871 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3874 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3877 hr = ID2D1GeometrySink_Close(
sink);
3878 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3879 ID2D1GeometrySink_Release(
sink);
3880 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
3881 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3882 ok(
count == 0,
"Got unexpected figure count %u.\n",
count);
3883 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
3884 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3885 ok(
count == 0,
"Got unexpected segment count %u.\n",
count);
3888 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3889 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3897 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
3898 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3902 ID2D1PathGeometry_Release(geometry);
3905 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3906 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3907 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3908 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3910 hr = ID2D1GeometrySink_Close(
sink);
3911 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3912 ID2D1GeometrySink_Release(
sink);
3915 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3916 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3918 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3925 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
3926 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3928 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3931 ID2D1PathGeometry_Release(geometry);
3934 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3935 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3936 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3937 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3939 hr = ID2D1GeometrySink_Close(
sink);
3940 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3941 ID2D1GeometrySink_Release(
sink);
3944 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3945 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3947 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3954 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
3955 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3957 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3960 ID2D1PathGeometry_Release(geometry);
3963 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3964 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3965 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3966 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3968 hr = ID2D1GeometrySink_Close(
sink);
3969 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3970 ID2D1GeometrySink_Release(
sink);
3973 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
3974 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3976 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3983 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
3984 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3986 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
3989 ID2D1PathGeometry_Release(geometry);
3991 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
3992 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3993 hr = ID2D1PathGeometry_Open(geometry, &
sink);
3994 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
3999 hr = ID2D1GeometrySink_Close(
sink);
4000 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4001 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
4002 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4003 ok(
count == 6,
"Got unexpected figure count %u.\n",
count);
4004 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4005 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4007 ok(
count == 44,
"Got unexpected segment count %u.\n",
count);
4009 ID2D1GeometrySink_Release(
sink);
4014 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4020 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4028 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4033 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4037 ID2D1TransformedGeometry_GetSourceGeometry(transformed_geometry, &tmp_geometry);
4039 "Got unexpected source geometry %p, expected %p.\n", tmp_geometry, geometry);
4040 ID2D1TransformedGeometry_GetTransform(transformed_geometry, &tmp_matrix);
4042 "Got unexpected matrix {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
4043 tmp_matrix.
_11, tmp_matrix.
_12, tmp_matrix.
_21,
4044 tmp_matrix.
_22, tmp_matrix.
_31, tmp_matrix.
_32);
4048 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4051 ID2D1Geometry_Release(tmp_geometry);
4053 ID2D1RenderTarget_BeginDraw(rt);
4055 ID2D1RenderTarget_Clear(rt, &
color);
4058 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
4059 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4061 ok(
match,
"Surface does not match.\n");
4066 hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry,
point,
NULL, 0.0f, &contains);
4067 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4068 ok(!contains,
"Got unexpected contains %#x.\n", contains);
4072 hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry,
point,
NULL, 0.0f, &contains);
4073 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4074 ok(contains ==
TRUE,
"Got unexpected contains %#x.\n", contains);
4081 hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry,
point, &
matrix, 0.0f, &contains);
4082 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4083 ok(contains ==
TRUE,
"Got unexpected contains %#x.\n", contains);
4085 ID2D1TransformedGeometry_Release(transformed_geometry);
4086 ID2D1PathGeometry_Release(geometry);
4088 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4089 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4090 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4091 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4094 hr = ID2D1GeometrySink_Close(
sink);
4095 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4096 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
4097 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4098 ok(
count == 6,
"Got unexpected figure count %u.\n",
count);
4099 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4100 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4101 ok(
count == 44,
"Got unexpected segment count %u.\n",
count);
4102 ID2D1GeometrySink_Release(
sink);
4105 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
4106 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4108 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4116 hr = ID2D1PathGeometry_GetBounds(geometry, &
matrix, &
rect);
4117 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4118 match =
compare_rect(&
rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1);
4119 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4125 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4133 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4135 ID2D1RenderTarget_BeginDraw(rt);
4136 ID2D1RenderTarget_Clear(rt, &
color);
4139 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
4140 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4142 ok(
match,
"Surface does not match.\n");
4143 ID2D1TransformedGeometry_Release(transformed_geometry);
4144 ID2D1PathGeometry_Release(geometry);
4146 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4147 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4148 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4149 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4151 hr = ID2D1GeometrySink_Close(
sink);
4152 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4153 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
4154 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4155 ok(
count == 4,
"Got unexpected figure count %u.\n",
count);
4156 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4157 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4158 ok(
count == 20,
"Got unexpected segment count %u.\n",
count);
4159 ID2D1GeometrySink_Release(
sink);
4164 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4170 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4176 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4191 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4195 ID2D1RenderTarget_BeginDraw(rt);
4196 ID2D1RenderTarget_Clear(rt, &
color);
4199 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
4200 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4202 "7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
4203 "lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
4204 "FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
4205 "EFIOMg5SDTQNUgs4C1IJPAlRCEAIUAZEBlAESARQAU4BTgJQAkgGUAY/C1ALMhNQEyoTUBMyC1AL"
4206 "PwZQBkgCUAJOAU4BUARIBFAGRAZQCEAIUQk8CVILOAtSDTQNUg4yDlIQLhBTECwQVBEqEVQSKBJU"
4207 "EyYTVBQjFFYUIhRWFSAVVxUeFVgWHBZZFhoWWhcYF1sWGBZcFxYWXhcUF18WFBZhFhIWYxUSFWUV"
4208 "EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
4209 "BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
4210 ok(
match,
"Figure does not match.\n");
4212 "7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
4213 "lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
4214 "FBddFxYWXRYYFlsXGBdaFhoWWRYcFlgVHhVXFSAVVhQiFFUUIxRVEyYTVBIoElQRKhFUECwQUxAu"
4215 "EFIOMg5SDTQNUgs4C1IJPAlRCEAIUAZEBlAESARQAU4BTgJQAkgGUAY/C1ALMhNQEyoTUBMyC1AL"
4216 "PwZQBkgCUAJOAU4BUARIBFAGRAZQCEAIUQk8CVILOAtSDTQNUg4yDlIQLhBTECwQVBEqEVQSKBJU"
4217 "EyYTVBQjFFYUIhRWFSAVVxUeFVgWHBZZFhoWWhcYF1sWGBZcFxYWXhcUF18WFBZhFhIWYxUSFWUV"
4218 "EBVnFBAUaRQOFGsTDhJvEgwSchAMEHYPCg96DQoMggEICgiLAQQIBJQBCJgBCJkBBpoBBpoBBpoB"
4219 "BpsBBJwBBJwBBJwBBJwBBJ0BAp4BAp4BAp4BAp4BAp4BAp4BAp4BAgAA");
4220 ok(
match,
"Figure does not match.\n");
4222 "gVQBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQEjDCMB7AECHhQeAu0BAxoYGgPvAQMWHhYD8QEDFCAU"
4223 "A/MBBBAkEAT0AQUOJw0F9QEGCioKBvcBBggsCAb4AQgFLgUI+QEJATIBCfsBCAIwAgj8AQcFLAUH"
4224 "/QEFCCgIBf4BBAwiDAT/AQIQHBAClwISlwIBPgGAAgI8Av8BAzwD/QEEPAT7AQY6BvkBBzoH+AEI"
4225 "OAj3AQk4CfYBCTgK9AELNgvzAQw2DPIBDDYM8QEONA7wAQ40DvABDjQO7wEPNA/uAQ80D+4BEDIQ"
4226 "7QERMhHsAREyEewBETIR7AERMhHsAREyEewBETIR7AERMhHsAREyEewBETIR7AERMhHsAREyEewB"
4227 "ETIR7AERMhHsAREyEe0BEDIQ7gEQMw/uAQ80D+4BDzQP7wEONA7wAQ40DvEBDDYM8gEMNgzzAQs2"
4228 "C/QBCzcK9QEJOAn3AQg4CfcBBzoH+QEGOgb7AQU6BfwBBDwE/QEDPAP/AQE+AZkCDpkCAhIYEgKA"
4229 "AgMNIA0D/wEFCSYJBf4BBgYqBgf8AQgDLgMI+wFG+gEIAzADCPkBBwYuBgf3AQYKKgoG9gEFDCgM"
4230 "BfUBBBAlDwTzAQQSIhIE8QEDFh4WA/ABAhkaGQLvAQIcFhwC7QECIBAgAusBASgEKAHpAQFWAecB"
4231 "AVgB5QEBWgHAAgHhUgAA");
4232 ok(
match,
"Figure does not match.\n");
4234 "/VUB5QEBWAHnAQFWAekBAVQB6wECIQ8hAe0BAh0VHQLuAQIZGhkD7wEDFh4WA/EBBBMhEwPzAQQQ"
4235 "JQ8F9AEFDCgNBfUBBgoqCgb3AQcHLQcG+QEIBC8ECPkBPAEJ+wEIAy8CCP0BBgYrBQf9AQUJJgkF"
4236 "/wEDDSANBP8BAhEaEQKYAhAXAYACAT4BgAICPQL+AQM8BPwBBTsE+wEGOgb6AQc5B/gBCDgJ9gEJ"
4237 "OAn2AQo3CvQBCzcK8wEMNgzyAQ01DPIBDTUN8AEONA7wAQ40D+4BDzQP7gEQMw/uARAzEO0BEDIR"
4238 "7AERMhHsAREyEewBETIR7AERMhLrAREyEusBETIS6wERMhLrAREyEusBETIS6wERMhHsAREyEewB"
4239 "ETIR7QEQMhHtARAzEO0BEDMP7gEPNA/vAQ40D+8BDjQO8QENNQ3xAQ01DPMBCzYM8wELNwr1AQo3"
4240 "CvUBCTgJ9wEIOAn4AQc5B/kBBjoG+wEFOwT9AQM8BP4BAj0C/wEBPgGYAhAXAYACAhEaEQKAAgMN"
4241 "IA0E/gEFCSYJBf4BBgYrBQf8AQgDLwII+wE8AQn6AQgELwQI+AEHBy0HBvcBBgoqCgb2AQUNJw0F"
4242 "9AEEECQQBfIBBBMhEwPxAQMWHhYD8AECGRoZA+4BAh0VHQLsAQIhDiIB6wEBVAHpAQFWAecBAVgB"
4244 ok(
match,
"Figure does not match.\n");
4245 ID2D1TransformedGeometry_Release(transformed_geometry);
4246 ID2D1PathGeometry_Release(geometry);
4248 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4249 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4250 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4251 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4254 hr = ID2D1GeometrySink_Close(
sink);
4255 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4256 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
4257 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4258 ok(
count == 4,
"Got unexpected figure count %u.\n",
count);
4259 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4260 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4261 ok(
count == 20,
"Got unexpected segment count %u.\n",
count);
4262 ID2D1GeometrySink_Release(
sink);
4267 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4273 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4279 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4289 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4291 ID2D1RenderTarget_BeginDraw(rt);
4292 ID2D1RenderTarget_Clear(rt, &
color);
4295 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
4296 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4298 "7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
4299 "lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
4300 "U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
4301 "TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
4302 "mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
4303 ok(
match,
"Figure does not match.\n");
4305 "7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
4306 "lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
4307 "U05STlJOUk5STlFQUFBQUFBQTlRIXD9mMnYqdjJmP1xIVE5QUFBQUFBQUU5STlJOUk5STlNMVExU"
4308 "TFRMVEtWSlZKV0hYSFlGWkZbRFxDXkJfQGE+YzxlOmc4aTZrM28wcix2KHojggEaiwEQlAEImAEI"
4309 "mQEGmgEGmgEGmgEGmwEEnAEEnAEEnAEEnAEEnQECngECngECngECngECngECngECngEC");
4310 ok(
match,
"Figure does not match.\n");
4312 "4VIBwAIBWgHlAQFYAecBAVYB6QEBVAHrAQIhDiIB7QECHRUdAu4BAhkaGQPvAQMWHhYD8QEEEyET"
4313 "A/MBBBAkEAT1AQUMKA0F9QEGCioKBvcBBwctBwb5AQgELwQI+QEJATIBCfsBRP0BQ/0BQv8BQf8B"
4314 "QIECP4ACQIACQf4BQ/wBRPsBRvoBR/gBSPcBSvYBS/QBTPMBTvIBTvIBT/ABUPABUe4BUu4BUu4B"
4315 "U+0BU+wBVOwBVOwBVOwBVOwBVesBVesBVesBVesBVOwBVOwBVOwBVO0BU+0BU+0BUu4BUu8BUe8B"
4316 "UPEBT/EBTvIBTvMBTPUBS/UBSvcBSfcBSPkBRvsBRP0BQ/4BQf8BQIECP4ACQIACQf4BQv4BQ/wB"
4317 "RPsBCQEyAQn6AQgELwQI+AEHBy0GB/cBBgoqCgb2AQUMKA0F9AEEECUPBPMBBBIiEwPxAQMWHhYD"
4318 "8AECGRoZA+4BAh0VHQLsAQIhDiIB6wEBVAHpAQFWAecBAVgB5QEBWgHAAgEA");
4319 ok(
match,
"Figure does not match.\n");
4321 "gVQBXAHjAQFaAeUBAVgB5wEBVgHpAQEpAikB6wECIBAgAu0BAhwWHALvAQIZGhkC8AEDFh4WA/EB"
4322 "BBIiEgTzAQQPJRAE9QEFDCgMBfYBBgoqCgb3AQcGLgYH+QEIAzADCPoBRvsBRPwBRP0BQv8BQIAC"
4323 "QIECPoECQP8BQv0BRPwBRPsBRvkBSPgBSPcBSvUBTPQBTPMBTvIBTvEBUPABUO8BUu4BUu4BUu4B"
4324 "Uu0BVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVOwBVO0BUu4BUu4BUu8BUPAB"
4325 "UPABUPEBTvIBTvMBTPQBS/YBSvcBSPgBSPkBRvsBRP0BQv8BQIACQIECPoECQP8BQv4BQv0BRPwB"
4326 "RPsBCQEyAQn5AQgFLgUI+AEGCCwIBvcBBgoqCgb1AQUNJw4F9AEEECQQBPMBAxQgFAPxAQMWHhYD"
4327 "7wEDGhgaA+0BAh4UHgLsAQEjDCMB6wEBVAHpAQFWAecBAVgB5QEBWgGiVQAA");
4328 ok(
match,
"Figure does not match.\n");
4329 ID2D1TransformedGeometry_Release(transformed_geometry);
4330 ID2D1PathGeometry_Release(geometry);
4332 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4333 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4334 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4335 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4349 hr = ID2D1GeometrySink_Close(
sink);
4350 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4351 hr = ID2D1PathGeometry_GetFigureCount(geometry, &
count);
4352 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4353 ok(
count == 2,
"Got unexpected figure count %u.\n",
count);
4354 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4355 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4356 ok(
count == 6,
"Got unexpected segment count %u.\n",
count);
4357 ID2D1GeometrySink_Release(
sink);
4359 ID2D1RenderTarget_BeginDraw(rt);
4360 ID2D1RenderTarget_Clear(rt, &
color);
4362 hr = ID2D1RenderTarget_EndDraw(rt,
NULL,
NULL);
4363 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4365 ok(
match,
"Surface does not match.\n");
4366 ID2D1PathGeometry_Release(geometry);
4368 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4369 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4370 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4371 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4377 hr = ID2D1GeometrySink_Close(
sink);
4378 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4379 ID2D1GeometrySink_Release(
sink);
4380 hr = ID2D1PathGeometry_GetSegmentCount(geometry, &
count);
4381 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4382 ok(
count == 2,
"Got unexpected segment count %u.\n",
count);
4387 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4391 ID2D1PathGeometry_Release(geometry);
4393 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
4394 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4395 hr = ID2D1PathGeometry_Open(geometry, &
sink);
4396 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4422 hr = ID2D1GeometrySink_Close(
sink);
4423 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4424 ID2D1GeometrySink_Release(
sink);
4427 hr = ID2D1PathGeometry_GetBounds(geometry,
NULL, &
rect);
4428 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4430 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4436 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4440 ID2D1PathGeometry_Release(geometry);
4442 ID2D1SolidColorBrush_Release(brush);
4459 static const struct geometry_segment expected_segments[] =
4462 {SEGMENT_LINE, {{{10.0f, 0.0f}}}},
4463 {SEGMENT_LINE, {{{10.0f, 20.0f}}}},
4464 {SEGMENT_LINE, {{{ 0.0f, 20.0f}}}},
4466 {SEGMENT_LINE, {{{4.42705116e+01f, 1.82442951e+01f}}}},
4467 {SEGMENT_LINE, {{{7.95376282e+01f, 5.06049728e+01f}}}},
4468 {SEGMENT_LINE, {{{5.52671127e+01f, 6.23606796e+01f}}}},
4470 {SEGMENT_LINE, {{{25.0f, 15.0f}}}},
4471 {SEGMENT_LINE, {{{25.0f, 55.0f}}}},
4472 {SEGMENT_LINE, {{{25.0f, 55.0f}}}},
4474 {SEGMENT_LINE, {{{35.0f, 45.0f}}}},
4475 {SEGMENT_LINE, {{{35.0f, 45.0f}}}},
4476 {SEGMENT_LINE, {{{30.0f, 45.0f}}}},
4478 {SEGMENT_LINE, {{{ 1.07179585e+01f, 2.23205078e+02f}}}},
4479 {SEGMENT_LINE, {{{-5.85640755e+01f, 2.73205078e+02f}}}},
4480 {SEGMENT_LINE, {{{-7.85640717e+01f, 2.29903809e+02f}}}},
4482 {SEGMENT_LINE, {{{40.0f, 20.0f}}}},
4483 {SEGMENT_LINE, {{{40.0f, 40.0f}}}},
4484 {SEGMENT_LINE, {{{30.0f, 40.0f}}}},
4486 {SEGMENT_LINE, {{{ 2.14359169e+01f, 0.0f}}}},
4487 {SEGMENT_LINE, {{{-1.17128151e+02f, 0.0f}}}},
4488 {SEGMENT_LINE, {{{-1.57128143e+02f, 0.0f}}}},
4490 {SEGMENT_LINE, {{{0.0f, 1.11602539e+02f}}}},
4491 {SEGMENT_LINE, {{{0.0f, 1.36602539e+02f}}}},
4492 {SEGMENT_LINE, {{{0.0f, 1.14951904e+02f}}}},
4501 3, &expected_segments[12]},
4511 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
4512 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4513 ID2D1RectangleGeometry_GetRect(geometry, &
rect2);
4515 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4517 ID2D1RectangleGeometry_Release(geometry);
4520 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
4521 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4522 ID2D1RectangleGeometry_GetRect(geometry, &
rect2);
4524 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4526 ID2D1RectangleGeometry_Release(geometry);
4529 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
4530 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4531 ID2D1RectangleGeometry_GetRect(geometry, &
rect2);
4533 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4535 ID2D1RectangleGeometry_Release(geometry);
4538 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
4539 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4540 ID2D1RectangleGeometry_GetRect(geometry, &
rect2);
4542 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
4544 ID2D1RectangleGeometry_Release(geometry);
4547 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
4548 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4553 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4554 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4555 ok(!!contains,
"Got wrong hit test result %d.\n", contains);
4560 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4561 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4562 ok(!contains,
"Got wrong hit test result %d.\n", contains);
4565 set_point(&
point, -D2D1_DEFAULT_FLATTENING_TOLERANCE + 0.01f, 0.0f);
4566 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4567 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4568 ok(!!contains,
"Got wrong hit test result %d.\n", contains);
4571 set_point(&
point, -D2D1_DEFAULT_FLATTENING_TOLERANCE - 0.01f, 0.0f);
4572 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4573 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4574 ok(!contains,
"Got wrong hit test result %d.\n", contains);
4577 set_point(&
point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE);
4578 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4579 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4580 ok(!contains,
"Got wrong hit test result %d.\n", contains);
4585 hr = ID2D1RectangleGeometry_FillContainsPoint(geometry,
point,
NULL, 0.0f, &contains);
4586 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4587 ok(!!contains,
"Got wrong hit test result %d.\n", contains);
4590 hr = ID2D1RectangleGeometry_GetBounds(geometry,
NULL, &
rect);
4591 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4593 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4597 NULL, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4598 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4603 NULL, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4604 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4612 hr = ID2D1RectangleGeometry_GetBounds(geometry, &
matrix, &
rect);
4613 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4615 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4619 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4620 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4627 hr = ID2D1RectangleGeometry_GetBounds(geometry, &
matrix, &
rect);
4628 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4630 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4634 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4635 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4642 hr = ID2D1RectangleGeometry_GetBounds(geometry, &
matrix, &
rect);
4643 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4645 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4649 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4650 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4658 hr = ID2D1Factory_CreateTransformedGeometry(
ctx.factory, (
ID2D1Geometry *)geometry, &
matrix, &transformed_geometry);
4659 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4661 hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry,
NULL, &
rect);
4662 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4663 match =
compare_rect(&
rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1);
4664 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4668 NULL, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4669 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4674 NULL, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4675 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4682 hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &
matrix, &
rect);
4683 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4685 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4689 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4690 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4696 hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &
matrix, &
rect);
4697 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4698 match =
compare_rect(&
rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1);
4699 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4703 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4704 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4710 hr = ID2D1TransformedGeometry_GetBounds(transformed_geometry, &
matrix, &
rect);
4711 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4713 ok(
match,
"Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
4717 &
matrix, 0.0f, &
sink.ID2D1SimplifiedGeometrySink_iface);
4718 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4722 ID2D1TransformedGeometry_Release(transformed_geometry);
4723 ID2D1RectangleGeometry_Release(geometry);
4739 hr = ID2D1Factory_CreateRoundedRectangleGeometry(
ctx.factory, &
rect, &geometry);
4740 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4742 ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &
rect2);
4743 ok(!
memcmp(&
rect, &
rect2,
sizeof(
rect)),
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
4745 ID2D1RoundedRectangleGeometry_Release(geometry);
4749 hr = ID2D1Factory_CreateRoundedRectangleGeometry(
ctx.factory, &
rect, &geometry);
4750 ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &
rect2);
4751 ok(!
memcmp(&
rect, &
rect2,
sizeof(
rect)),
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
4753 ID2D1RoundedRectangleGeometry_Release(geometry);
4757 hr = ID2D1Factory_CreateRoundedRectangleGeometry(
ctx.factory, &
rect, &geometry);
4758 ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &
rect2);
4759 ok(!
memcmp(&
rect, &
rect2,
sizeof(
rect)),
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
4761 ID2D1RoundedRectangleGeometry_Release(geometry);
4765 hr = ID2D1Factory_CreateRoundedRectangleGeometry(
ctx.factory, &
rect, &geometry);
4766 ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &
rect2);
4767 ok(!
memcmp(&
rect, &
rect2,
sizeof(
rect)),
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
4769 ID2D1RoundedRectangleGeometry_Release(geometry);
4811 bitmap_desc.
dpiX = 96.0f;
4812 bitmap_desc.
dpiY = 96.0f;
4815 for (
j = 0;
j < 4; ++
j)
4817 if ((bitmap_formats[
i].
mask & (0x80 | (1u <<
j))) == (0x80 | (1u <<
j)))
4823 if (bitmap_formats[
i].
mask & (1u <<
j))
4824 ok(
hr ==
S_OK,
"Got unexpected hr %#lx, for format %#x/%#x.\n",
4830 ID2D1Bitmap_Release(
bitmap);
4859 0x7f7f0000, 0x7f7f7f00, 0x7f007f00, 0x7f007f7f,
4860 0x7f00007f, 0x7f7f007f, 0x7f000000, 0x7f404040,
4861 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f000000,
4862 0x7f7f7f7f, 0x7f000000, 0x7f000000, 0x7f000000,
4874 bitmap_desc.
dpiX = 96.0f / 40.0f;
4875 bitmap_desc.
dpiY = 96.0f / 30.0f;
4877 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4880 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4886 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &color_brush);
4889 ID2D1RenderTarget_BeginDraw(
rt);
4890 ID2D1RenderTarget_Clear(
rt,
NULL);
4892 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4894 ok(
match,
"Surface does not match.\n");
4896 ID2D1RenderTarget_BeginDraw(
rt);
4898 ID2D1RenderTarget_Clear(
rt, &
color);
4900 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4902 ok(
match,
"Surface does not match.\n");
4904 ID2D1RenderTarget_BeginDraw(
rt);
4906 ID2D1RenderTarget_Clear(
rt, &
color);
4908 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4910 ok(
match,
"Surface does not match.\n");
4912 ID2D1RenderTarget_BeginDraw(
rt);
4917 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.75f);
4920 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.25f);
4923 ID2D1Bitmap_Release(
bitmap);
4926 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4927 ID2D1BitmapBrush_SetBitmap(bitmap_brush,
bitmap);
4930 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 1.0f);
4933 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.75f);
4936 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.25f);
4942 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.75f);
4945 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.25f);
4949 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4951 ok(
match,
"Surface does not match.\n");
4956 rt_desc.
dpiX = 0.0f;
4957 rt_desc.
dpiY = 0.0f;
4961 ok(!!
rt,
"Failed to create render target.\n");
4965 ID2D1Bitmap_Release(
bitmap);
4968 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4969 ID2D1BitmapBrush_SetBitmap(bitmap_brush,
bitmap);
4971 ID2D1BitmapBrush_Release(bitmap_brush);
4973 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4978 ID2D1SolidColorBrush_Release(color_brush);
4980 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &color_brush);
4981 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4983 ID2D1RenderTarget_BeginDraw(
rt);
4984 ID2D1RenderTarget_Clear(
rt,
NULL);
4986 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4988 ok(
match,
"Surface does not match.\n");
4990 ID2D1RenderTarget_BeginDraw(
rt);
4992 ID2D1RenderTarget_Clear(
rt, &
color);
4994 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
4996 ok(
match,
"Surface does not match.\n");
4998 ID2D1RenderTarget_BeginDraw(
rt);
5000 ID2D1RenderTarget_Clear(
rt, &
color);
5002 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5004 ok(
match,
"Surface does not match.\n");
5006 ID2D1RenderTarget_BeginDraw(
rt);
5011 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.75f);
5014 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.25f);
5017 ID2D1Bitmap_Release(
bitmap);
5020 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5021 ID2D1BitmapBrush_SetBitmap(bitmap_brush,
bitmap);
5024 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 1.0f);
5027 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.75f);
5030 ID2D1BitmapBrush_SetOpacity(bitmap_brush, 0.25f);
5036 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.75f);
5039 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.25f);
5043 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5045 ok(
match,
"Surface does not match.\n");
5047 refcount = ID2D1Bitmap_Release(
bitmap);
5048 ok(refcount == 1,
"Bitmap has %lu references left.\n", refcount);
5049 ID2D1BitmapBrush_Release(bitmap_brush);
5051 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&
context);
5052 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5055 memset(&bitmap_desc1, 0,
sizeof(bitmap_desc1));
5056 bitmap_desc1.
dpiX = 96.0f;
5057 bitmap_desc1.
dpiY = 96.0f;
5062 &bitmap_desc1, &bitmap1);
5063 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5065 ID2D1DeviceContext_BeginDraw(
context);
5068 ID2D1SolidColorBrush_SetOpacity(color_brush, 1.0f);
5071 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.75f);
5074 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.25f);
5077 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5080 hr = ID2D1Bitmap1_GetSurface(bitmap1, &
ctx.surface);
5081 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5085 IDXGISurface_Release(
ctx.surface);
5089 ID2D1Bitmap1_Release(bitmap1);
5090 ID2D1DeviceContext_Release(
context);
5091 ID2D1SolidColorBrush_Release(color_brush);
5092 ID2D1RenderTarget_Release(
rt);
5113 IDXGIDevice *device2;
5122 hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (
void **)&surface2);
5123 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5127 &IID_IWICImagingFactory, (
void **)&wic_factory);
5128 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5129 hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
5131 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5132 hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
5134 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5135 IWICImagingFactory_Release(wic_factory);
5139 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
5147 bitmap_desc.
dpiX = 96.0f;
5148 bitmap_desc.
dpiY = 96.0f;
5151 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5153 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5156 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory1,
ctx.surface, &
desc, &rt1);
5157 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5158 hr = ID2D1RenderTarget_CreateBitmap(rt1,
size,
NULL, 0, &bitmap_desc, &bitmap1);
5160 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5162 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory1, surface2, &
desc, &rt2);
5163 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5164 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5165 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5170 ID2D1RenderTarget_Release(rt2);
5173 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory2, surface2, &
desc, &rt2);
5174 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5175 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5177 ID2D1RenderTarget_Release(rt2);
5180 IDXGISurface_Release(surface2);
5181 IDXGISwapChain_Release(swapchain2);
5183 ok(!!device2,
"Failed to create device.\n");
5185 hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (
void **)&surface2);
5186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5188 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory1, surface2, &
desc, &rt2);
5189 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5190 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5192 ID2D1RenderTarget_Release(rt2);
5195 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory2, surface2, &
desc, &rt2);
5196 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5197 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5199 ID2D1RenderTarget_Release(rt2);
5202 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
factory1, wic_bitmap2, &
desc, &rt2);
5203 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5204 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5206 ID2D1RenderTarget_Release(rt2);
5209 ID2D1Bitmap_Release(bitmap1);
5210 ID2D1RenderTarget_Release(rt1);
5211 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
factory1, wic_bitmap1, &
desc, &rt1);
5212 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5213 hr = ID2D1RenderTarget_CreateBitmap(rt1,
size,
NULL, 0, &bitmap_desc, &bitmap1);
5214 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5216 hr = ID2D1RenderTarget_QueryInterface(rt1, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
5217 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5218 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (
void **)&rt3);
5219 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5220 ok(rt3 == rt1,
"Unexpected render target\n");
5221 ID2D1RenderTarget_Release(rt3);
5222 ID2D1GdiInteropRenderTarget_Release(interop);
5224 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
factory2, wic_bitmap2, &
desc, &rt2);
5225 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5226 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5228 ID2D1RenderTarget_Release(rt2);
5231 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
factory1, wic_bitmap2, &
desc, &rt2);
5232 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5233 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1,
NULL, &
bitmap2);
5234 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5237 ID2D1RenderTarget_Release(rt2);
5242 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
5248 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory1, surface2, &
desc, &rt2);
5249 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5253 bitmap_desc.
dpiX = 0.0f;
5254 bitmap_desc.
dpiY = 0.0f;
5256 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &
bitmap2);
5261 static const struct bitmap_format_test
5267 bitmap_format_tests[] =
5288 hr = IDXGISurface_GetDesc(surface2, &surface_desc);
5289 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5290 ok(
size.width == surface_desc.
Width &&
size.height == surface_desc.
Height,
"Got wrong bitmap size.\n");
5297 if (IDXGISurface_QueryInterface(surface2, &IID_IDXGISurface1, (
void **)&surface3) ==
S_OK)
5299 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface1, surface3, &bitmap_desc, &
bitmap2);
5300 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5303 IDXGISurface1_Release(surface3);
5308 bitmap_desc.
pixelFormat = bitmap_format_tests[
i].original;
5310 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &
bitmap2);
5312 ok(
hr == bitmap_format_tests[
i].
hr,
"%u: Got unexpected hr %#lx.\n",
i,
hr);
5317 ok(
pixel_format.format == bitmap_format_tests[
i].result.format,
"%u: unexpected pixel format %#x.\n",
5319 ok(
pixel_format.alphaMode == bitmap_format_tests[
i].result.alphaMode,
"%u: unexpected alpha mode %d.\n",
5328 ID2D1Bitmap_Release(bitmap1);
5334 bitmap_desc.
dpiX = 96.0f;
5335 bitmap_desc.
dpiY = 96.0f;
5336 hr = ID2D1RenderTarget_CreateBitmap(rt2,
size,
NULL, 0, &bitmap_desc, &bitmap1);
5337 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5341 static const struct bitmap_format_test
5347 bitmap_format_tests[] =
5371 bitmap_desc.
pixelFormat = bitmap_format_tests[
i].original;
5373 hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, &bitmap_desc, &
bitmap2);
5374 ok(
hr == bitmap_format_tests[
i].
hr,
"%u: Got unexpected hr %#lx.\n",
i,
hr);
5379 ok(
pixel_format.format == bitmap_format_tests[
i].result.format,
"%u: unexpected pixel format %#x.\n",
5381 ok(
pixel_format.alphaMode == bitmap_format_tests[
i].result.alphaMode,
"%u: unexpected alpha mode %d.\n",
5390 ID2D1RenderTarget_Release(rt2);
5392 ID2D1Bitmap_Release(bitmap1);
5393 ID2D1RenderTarget_Release(rt1);
5394 ID2D1Factory_Release(factory2);
5395 ID2D1Factory_Release(factory1);
5396 IWICBitmap_Release(wic_bitmap2);
5397 IWICBitmap_Release(wic_bitmap1);
5398 IDXGISurface_Release(surface2);
5399 IDXGISwapChain_Release(swapchain2);
5400 IDXGIDevice_Release(device2);
5422 0xffff0000, 0xffffff00, 0xff00ff00, 0xff00ffff,
5423 0xff0000ff, 0xffff00ff, 0xff000000, 0xff7f7f7f,
5424 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000,
5425 0xffffffff, 0xff000000, 0xff000000, 0xff000000,
5434 ID2D1RenderTarget_BeginDraw(
rt);
5436 ID2D1RenderTarget_Clear(
rt, &
color);
5441 bitmap_desc.
dpiX = 96.0f;
5442 bitmap_desc.
dpiY = 96.0f;
5444 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5450 ID2D1Bitmap_Release(
bitmap);
5454 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5462 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5465 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5468 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5471 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5474 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5480 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5486 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5489 ok(
match,
"Surface does not match.\n");
5491 ID2D1RenderTarget_BeginDraw(
rt);
5493 ID2D1RenderTarget_Clear(
rt, &
color);
5495 hr = ID2D1RenderTarget_CreateBitmap(
rt,
size,
NULL, 0, &bitmap_desc, &dst_bitmap);
5496 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5499 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5500 dst_point.x = 1; dst_point.y = 1;
5501 hr = ID2D1Bitmap_CopyFromBitmap(dst_bitmap, &dst_point,
bitmap,
NULL);
5502 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5503 dst_point.x = 0; dst_point.y = 1;
5505 hr = ID2D1Bitmap_CopyFromBitmap(dst_bitmap, &dst_point,
bitmap, &src_rect);
5506 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5507 dst_point.x = 1; dst_point.y = 0;
5509 hr = ID2D1Bitmap_CopyFromBitmap(dst_bitmap, &dst_point,
bitmap, &src_rect);
5510 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5512 hr = ID2D1Bitmap_CopyFromBitmap(dst_bitmap,
NULL,
bitmap, &src_rect);
5513 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5516 ID2D1RenderTarget_DrawBitmap(
rt, dst_bitmap, &
rect, 1.0f,
5520 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5522 ok(
match,
"Surface does not match.\n");
5523 ID2D1Bitmap_Release(dst_bitmap);
5525 ID2D1Bitmap_Release(
bitmap);
5549 0xffff0000, 0x40ffff00, 0x4000ff00, 0xff00ffff,
5550 0x7f0000ff, 0x00ff00ff, 0x00000000, 0x7f7f7f7f,
5551 0x7fffffff, 0x00ffffff, 0x00ffffff, 0x7f000000,
5552 0xffffffff, 0x40000000, 0x40000000, 0xff000000,
5561 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
5565 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &color_brush);
5566 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5571 bitmap_desc.
dpiX = 96.0f;
5572 bitmap_desc.
dpiY = 96.0f;
5574 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5576 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5578 refcount = ID2D1Bitmap_Release(
bitmap);
5579 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
5584 bitmap_desc.
dpiX = 96.0f;
5585 bitmap_desc.
dpiY = 96.0f;
5587 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5589 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5591 refcount = ID2D1Bitmap_Release(
bitmap);
5592 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
5594 ID2D1RenderTarget_BeginDraw(
rt);
5597 ID2D1RenderTarget_Clear(
rt, &
color);
5605 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5615 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5617 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5620 ID2D1RectangleGeometry_Release(geometry);
5625 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5627 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5630 ID2D1RectangleGeometry_Release(geometry);
5635 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5637 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5644 ok(
match,
"Surface does not match.\n");
5645 ID2D1RenderTarget_BeginDraw(
rt);
5649 ID2D1RectangleGeometry_Release(geometry);
5651 ID2D1SolidColorBrush_SetOpacity(color_brush, 0.5f);
5655 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5657 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5660 ID2D1RectangleGeometry_Release(geometry);
5662 ID2D1BitmapBrush_SetOpacity(opacity_brush, 0.8f);
5666 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5668 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5671 ID2D1RectangleGeometry_Release(geometry);
5676 ID2D1BitmapBrush_SetTransform(opacity_brush, &
matrix);
5678 ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &geometry);
5681 ID2D1RectangleGeometry_Release(geometry);
5684 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5686 ok(
match,
"Surface does not match.\n");
5688 ID2D1BitmapBrush_Release(bitmap_brush);
5689 ID2D1BitmapBrush_Release(opacity_brush);
5690 ID2D1SolidColorBrush_Release(color_brush);
5702 float rt_dpi_x, rt_dpi_y;
5705 create_dpi_tests[] =
5707 { 0.0f, 0.0f, 96.0f, 96.0f,
S_OK },
5712 { 48.0f, 96.0f, 48.0f, 96.0f,
S_OK },
5729 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
5730 desc.dpiX = create_dpi_tests[
i].dpi_x;
5731 desc.dpiY = create_dpi_tests[
i].dpi_y;
5735 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
ctx.factory,
ctx.surface, &
desc, &
rt);
5736 ok(
hr == create_dpi_tests[
i].
hr,
"Test %u: Got unexpected hr %#lx, expected %#lx.\n",
5737 i,
hr, create_dpi_tests[
i].
hr);
5743 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
5744 ok(unk == (
IUnknown *)
rt,
"Expected same interface pointer.\n");
5745 IUnknown_Release(unk);
5747 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
5748 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
5749 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (
void **)&rt2);
5750 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
5751 ok(rt2 ==
rt,
"Unexpected render target\n");
5752 ID2D1RenderTarget_Release(rt2);
5753 ID2D1GdiInteropRenderTarget_Release(interop);
5755 ID2D1RenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
5756 ok(dpi_x == create_dpi_tests[
i].rt_dpi_x,
"Wrong dpi_x %.8e, expected %.8e, test %u\n",
5757 dpi_x, create_dpi_tests[
i].rt_dpi_x,
i);
5758 ok(dpi_y == create_dpi_tests[
i].rt_dpi_y,
"Wrong dpi_y %.8e, expected %.8e, test %u\n",
5759 dpi_y, create_dpi_tests[
i].rt_dpi_y,
i);
5761 ID2D1RenderTarget_Release(
rt);
5775 antialias_mode_tests[] =
5820 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5825 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
5831 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
ctx.factory,
ctx.surface, &
desc, &
rt);
5832 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5834 hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(
factory2,
ctx.surface, &
desc, &rt2);
5835 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5838 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5842 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5844 hr = IDWriteFactory_CreateTextLayout(dwrite_factory,
L"text", 4, text_format, 100.0f, 100.0f, &text_layout);
5845 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5848 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
5849 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5851 hr = ID2D1RenderTarget_CreateSolidColorBrush(rt2, &
color,
NULL, &brush2);
5852 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5855 range.startPosition = 0;
5857 hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (
IUnknown*)brush2,
range);
5858 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5860 ID2D1RenderTarget_BeginDraw(
rt);
5870 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &geometry);
5871 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5873 range.startPosition = 0;
5875 hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (
IUnknown*)geometry,
range);
5876 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5877 ID2D1RectangleGeometry_Release(geometry);
5879 ID2D1RenderTarget_BeginDraw(
rt);
5885 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
5891 ID2D1RenderTarget_SetTextAntialiasMode(
rt, antialias_mode_tests[
i].aa_mode);
5894 antialias_mode_tests[
i].rendering_mode, &rendering_params);
5895 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
5897 ID2D1RenderTarget_SetTextRenderingParams(
rt, rendering_params);
5899 ID2D1RenderTarget_BeginDraw(
rt);
5904 ok(
hr == antialias_mode_tests[
i].
hr,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
5906 IDWriteRenderingParams_Release(rendering_params);
5909 ID2D1SolidColorBrush_Release(brush2);
5910 ID2D1SolidColorBrush_Release(brush);
5911 IDWriteTextFormat_Release(text_format);
5912 IDWriteTextLayout_Release(text_layout);
5913 IDWriteFactory_Release(dwrite_factory);
5914 ID2D1RenderTarget_Release(
rt);
5915 ID2D1RenderTarget_Release(rt2);
5931 memset(bmi, 0,
sizeof(bmibuf));
5940 ok(
hbm !=
NULL,
"Failed to create a dib section.\n");
5983 desc.pixelFormat = invalid_formats[
i];
5989 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
5995 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6000 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
6001 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6003 hr = ID2D1DCRenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6004 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6005 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (
void **)&rt3);
6006 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6008 ID2D1RenderTarget_Release(rt3);
6009 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1DCRenderTarget, (
void **)&rt2);
6010 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6011 ok(rt2 ==
rt,
"Unexpected render target\n");
6012 ID2D1DCRenderTarget_Release(rt2);
6013 ID2D1GdiInteropRenderTarget_Release(interop);
6015 size = ID2D1DCRenderTarget_GetSize(
rt);
6016 ok(
size.width == 0.0f,
"got width %.08e.\n",
size.width);
6017 ok(
size.height == 0.0f,
"got height %.08e.\n",
size.height);
6019 sizeu = ID2D1DCRenderTarget_GetPixelSize(
rt);
6025 hr = ID2D1DCRenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
6026 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6027 ID2D1SolidColorBrush_Release(brush);
6029 ID2D1DCRenderTarget_BeginDraw(
rt);
6033 ID2D1DCRenderTarget_Release(
rt);
6036 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
6037 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6039 aa_mode = ID2D1DCRenderTarget_GetAntialiasMode(
rt);
6041 text_aa_mode = ID2D1DCRenderTarget_GetTextAntialiasMode(
rt);
6044 ID2D1DCRenderTarget_GetDpi(
rt, &dpi_x, &dpi_y);
6045 ok(dpi_x == 96.0f && dpi_y == 96.0f,
"Got dpi_x %f, dpi_y %f.\n", dpi_x, dpi_y);
6048 ok(
hdc !=
NULL,
"Failed to create an HDC.\n");
6057 ID2D1DCRenderTarget_SetTags(
rt, 1, 2);
6063 ID2D1DCRenderTarget_SetTransform(
rt, &
matrix);
6066 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6068 ID2D1DCRenderTarget_GetTags(
rt, &t1, &t2);
6069 ok(t1 == 1 && t2 == 2,
"Got wrong tags.\n");
6071 aa_mode = ID2D1DCRenderTarget_GetAntialiasMode(
rt);
6074 text_aa_mode = ID2D1DCRenderTarget_GetTextAntialiasMode(
rt);
6077 ID2D1DCRenderTarget_GetTransform(
rt, &matrix2);
6081 ID2D1DCRenderTarget_SetTransform(
rt, &
matrix);
6084 size = ID2D1DCRenderTarget_GetSize(
rt);
6085 ok(
size.width == 32.0f,
"got width %.08e.\n",
size.width);
6086 ok(
size.height == 32.0f,
"got height %.08e.\n",
size.height);
6089 ID2D1DCRenderTarget_BeginDraw(
rt);
6092 ID2D1DCRenderTarget_Clear(
rt, &
color);
6095 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6098 ok(clr ==
RGB(255, 0, 0),
"Got unexpected colour 0x%08lx.\n", clr);
6101 ok(
hdc2 !=
NULL,
"Failed to create an HDC.\n");
6106 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6109 ok(clr == 0,
"Got unexpected colour 0x%08lx.\n", clr);
6112 hr = ID2D1DCRenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
6113 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6115 ID2D1DCRenderTarget_BeginDraw(
rt);
6117 r.left =
r.top = 0.0f;
6120 ID2D1DCRenderTarget_FillRectangle(
rt, &
r, (
ID2D1Brush*)brush);
6123 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6125 ID2D1SolidColorBrush_Release(brush);
6128 ok(clr ==
RGB(0, 255, 0),
"Got unexpected colour 0x%08lx.\n", clr);
6131 ok(clr == 0,
"Got unexpected colour 0x%08lx.\n", clr);
6134 hr = ID2D1DCRenderTarget_BindDC(
rt, (
HDC)0xdeadbeef, &
rect);
6137 ID2D1DCRenderTarget_BeginDraw(
rt);
6140 ID2D1DCRenderTarget_Clear(
rt, &
color);
6143 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6146 ok(clr ==
RGB(255, 0, 0),
"Got unexpected colour 0x%08lx.\n", clr);
6151 ID2D1DCRenderTarget_BeginDraw(
rt);
6154 ID2D1DCRenderTarget_Clear(
rt, &
color);
6157 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6160 ok(clr ==
RGB(0, 0, 255),
"Got unexpected colour 0x%08lx.\n", clr);
6167 ok(!!
hdc,
"Failed to create a device context.\n");
6173 ok(!!hmf,
"Failed to close a metafile, error %ld.\n",
GetLastError());
6178 ok(!!
hdc,
"Failed to create a device context.\n");
6181 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6184 ok(!!hemf,
"Failed to close a metafile, error %ld.\n",
GetLastError());
6188 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 100, 100, 0, 0, 0,
NULL);
6189 ok(!!
hwnd,
"Failed to create a test window.\n");
6192 ok(!!
hdc,
"Failed to get a context.\n");
6195 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6200 ID2D1DCRenderTarget_Release(
rt);
6218 ok(!!target_hdc,
"Failed to create an HDC.\n");
6223 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6228 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
6229 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6232 hr = ID2D1DCRenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6233 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6235 ID2D1DCRenderTarget_BeginDraw(
rt);
6236 hdc = (
void *)0xdeadbeef;
6240 ok(!
hdc,
"Got unexpected DC %p.\n",
hdc);
6247 hr = ID2D1DCRenderTarget_BindDC(
rt, target_hdc, &
rect);
6248 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6250 ID2D1DCRenderTarget_BeginDraw(
rt);
6253 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6254 ok(!!
hdc,
"Got unexpected DC %p.\n",
hdc);
6255 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
6256 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6258 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6260 ID2D1GdiInteropRenderTarget_Release(interop);
6264 ID2D1DCRenderTarget_Release(
rt);
6281 static const struct format_test
6285 BOOL expected_failure;
6304 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6315 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &rt);
6316 ok(
hr !=
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6318 hwnd_rt_desc.
hwnd = (
HWND)0xdeadbeef;
6319 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &rt);
6320 ok(
hr !=
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6322 hwnd_rt_desc.
hwnd =
CreateWindowA(
"static",
"d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
6323 ok(!!hwnd_rt_desc.
hwnd,
"Failed to create target window.\n");
6324 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &rt);
6325 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6327 hr = ID2D1HwndRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6328 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6329 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (
void **)&rt3);
6330 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6332 ID2D1RenderTarget_Release(rt3);
6333 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1HwndRenderTarget, (
void **)&rt2);
6334 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6335 ok(rt2 == rt,
"Unexpected render target\n");
6336 ID2D1HwndRenderTarget_Release(rt2);
6337 ID2D1GdiInteropRenderTarget_Release(interop);
6341 hr = ID2D1HwndRenderTarget_Resize(rt, &
size);
6342 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6344 ID2D1HwndRenderTarget_Release(rt);
6351 desc.pixelFormat = format_tests[
i].format;
6352 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &rt);
6353 if (format_tests[
i].expected_failure)
6359 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6361 pixel_format = ID2D1HwndRenderTarget_GetPixelFormat(rt);
6364 ok(
pixel_format.alphaMode == format_tests[
i].expected_format.alphaMode,
6365 "Got unexpected alpha mode %d.\n",
pixel_format.alphaMode);
6367 ID2D1HwndRenderTarget_Release(rt);
6390 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6401 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &
rt);
6402 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6404 hr = ID2D1HwndRenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6405 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6406 ID2D1HwndRenderTarget_BeginDraw(
rt);
6407 dc = (
void *)0xdeadbeef;
6410 ok(!
dc,
"Got unexpected DC %p.\n",
dc);
6412 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6413 ID2D1GdiInteropRenderTarget_Release(interop);
6415 ID2D1HwndRenderTarget_Release(
rt);
6420 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &
rt);
6421 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6423 hr = ID2D1HwndRenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6424 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6425 ID2D1HwndRenderTarget_BeginDraw(
rt);
6426 dc = (
void *)0xdeadbeef;
6428 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6429 ok(!!
dc,
"Got unexpected DC %p.\n",
dc);
6430 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
6431 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6433 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6434 ID2D1GdiInteropRenderTarget_Release(interop);
6436 ID2D1HwndRenderTarget_Release(
rt);
6464 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6467 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6469 hr = ID3D10Texture2D_QueryInterface(
texture, &IID_IDXGISurface, (
void **)&
surface);
6470 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6473 ID3D10Texture2D_Release(
texture);
6496 ok(!!
surface,
"Failed to create a surface.\n");
6500 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
6507 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6509 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6510 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6511 ID2D1RenderTarget_BeginDraw(
rt);
6512 dc = (
void *)0xdeadbeef;
6515 ok(!
dc,
"Got unexpected DC %p.\n",
dc);
6516 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
6519 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6520 ID2D1GdiInteropRenderTarget_Release(interop);
6521 ID2D1RenderTarget_Release(
rt);
6529 refcount = IDXGISurface_Release(
surface);
6530 ok(!refcount,
"Unexpected refcount %lu.\n", refcount);
6535 ok(!!
surface,
"Failed to create a surface.\n");
6538 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6540 if (
SUCCEEDED(ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context)))
6544 ID2D1Bitmap_Release(
bitmap);
6545 ID2D1DeviceContext_Release(device_context);
6548 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6549 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6550 ID2D1RenderTarget_BeginDraw(
rt);
6551 dc = (
void *)0xdeadbeef;
6553 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6554 ok(!!
dc,
"Got unexpected DC %p.\n",
dc);
6557 ok(!
dc,
"Got unexpected DC %p.\n",
dc);
6558 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
6559 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6561 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6562 ID2D1GdiInteropRenderTarget_Release(interop);
6563 ID2D1RenderTarget_Release(
rt);
6569 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6571 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6572 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6573 ID2D1RenderTarget_BeginDraw(
rt);
6574 dc = (
void *)0xdeadbeef;
6577 ok(!
dc,
"Got unexpected DC %p.\n",
dc);
6578 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
6581 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6582 ID2D1GdiInteropRenderTarget_Release(interop);
6583 ID2D1RenderTarget_Release(
rt);
6585 refcount = IDXGISurface_Release(
surface);
6586 ok(!refcount,
"Unexpected refcount %lu.\n", refcount);
6591#define test_compatible_target_size(r) test_compatible_target_size_(__LINE__, r)
6594 static const D2D1_SIZE_F size_1_0 = { 1.0f, 0.0f };
6595 static const D2D1_SIZE_F size_1_1 = { 1.0f, 1.0f };
6599 static const struct size_test
6606 { &zero_px_size,
NULL },
6607 { &zero_px_size, &zero_size },
6608 {
NULL, &zero_size },
6609 {
NULL, &size_1_0 },
6610 { &px_size_1_1, &size_1_1 },
6612 float dpi_x, dpi_y, rt_dpi_x, rt_dpi_y;
6619 ID2D1RenderTarget_GetDpi(rt, &rt_dpi_x, &rt_dpi_y);
6623 hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, size_tests[
i].
size, size_tests[
i].pixel_size,
6627 if (size_tests[
i].pixel_size)
6629 expected_size = *size_tests[
i].pixel_size;
6631 else if (size_tests[
i].
size)
6633 expected_size.
width =
ceilf((size_tests[
i].
size->width * rt_dpi_x) / 96.0f);
6634 expected_size.
height =
ceilf((size_tests[
i].
size->height * rt_dpi_y) / 96.0f);
6638 expected_size = ID2D1RenderTarget_GetPixelSize(rt);
6641 pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(bitmap_rt);
6642 ok_(__FILE__,
line)(!
memcmp(&pixel_size, &expected_size,
sizeof(pixel_size)),
6643 "%u: unexpected target size %ux%u.\n",
i, pixel_size.width, pixel_size.height);
6645 ID2D1BitmapRenderTarget_GetDpi(bitmap_rt, &dpi_x, &dpi_y);
6646 if (size_tests[
i].pixel_size && size_tests[
i].
size && size_tests[
i].
size->width != 0.0f
6647 && size_tests[
i].size->height != 0.0f)
6649 ok_(__FILE__,
line)(dpi_x == pixel_size.width * 96.0f / size_tests[
i].size->width
6650 && dpi_y == pixel_size.height * 96.0f / size_tests[
i].size->height,
6651 "%u: unexpected target dpi %.8ex%.8e.\n",
i, dpi_x, dpi_y);
6654 ok_(__FILE__,
line)(dpi_x == rt_dpi_x && dpi_y == rt_dpi_y,
6655 "%u: unexpected target dpi %.8ex%.8e.\n",
i, dpi_x, dpi_y);
6656 ID2D1BitmapRenderTarget_Release(bitmap_rt);
6660 hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt,
NULL, &pixel_size,
NULL,
6664 if (
SUCCEEDED(ID2D1BitmapRenderTarget_QueryInterface(bitmap_rt, &IID_ID2D1DeviceContext, (
void **)&
context)))
6668 pixel_size = ID2D1DeviceContext_GetPixelSize(
context);
6669 ok_(__FILE__,
line)(!pixel_size.
width && !pixel_size.
height,
"Unexpected target size %ux%u.\n",
6673 pixel_size = ID2D1Bitmap_GetPixelSize(
bitmap);
6674 ok_(__FILE__,
line)(!pixel_size.
width && !pixel_size.
height,
"Unexpected target size %ux%u.\n",
6676 ID2D1Bitmap_Release(
bitmap);
6678 ID2D1DeviceContext_Release(
context);
6681 ID2D1BitmapRenderTarget_Release(bitmap_rt);
6697 float dpi[2], dpi2[2];
6707 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6713 hwnd_rt_desc.
hwnd =
CreateWindowA(
"static",
"d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
6714 ok(!!hwnd_rt_desc.
hwnd,
"Failed to create target window.\n");
6719 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &hwnd_rt);
6720 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6724 hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt,
NULL,
NULL,
NULL,
6726 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6728 hr = ID2D1BitmapRenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
6729 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6730 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (
void **)&rt3);
6731 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6733 ID2D1RenderTarget_Release(rt3);
6734 hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1BitmapRenderTarget, (
void **)&rt2);
6735 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6736 ok(rt2 ==
rt,
"Unexpected render target\n");
6737 ID2D1BitmapRenderTarget_Release(rt2);
6738 ID2D1GdiInteropRenderTarget_Release(interop);
6741 ID2D1HwndRenderTarget_AddRef(hwnd_rt);
6742 refcount = ID2D1HwndRenderTarget_Release(hwnd_rt);
6743 ok(refcount == 1,
"Target should not have been referenced, got %lu.\n", refcount);
6746 pixel_size = ID2D1HwndRenderTarget_GetPixelSize(hwnd_rt);
6747 pixel_size2 = ID2D1BitmapRenderTarget_GetPixelSize(
rt);
6748 ok(!
memcmp(&pixel_size, &pixel_size2,
sizeof(pixel_size)),
"Got target pixel size mismatch.\n");
6750 size = ID2D1HwndRenderTarget_GetSize(hwnd_rt);
6751 size2 = ID2D1BitmapRenderTarget_GetSize(
rt);
6752 ok(!
memcmp(&
size, &size2,
sizeof(
size)),
"Got target DIP size mismatch.\n");
6754 ID2D1HwndRenderTarget_GetDpi(hwnd_rt,
dpi,
dpi + 1);
6755 ID2D1BitmapRenderTarget_GetDpi(
rt, dpi2, dpi2 + 1);
6758 ID2D1BitmapRenderTarget_Release(
rt);
6762 hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt,
NULL, &pixel_size,
NULL,
6764 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6766 pixel_size2 = ID2D1BitmapRenderTarget_GetPixelSize(
rt);
6767 ok(!
memcmp(&pixel_size, &pixel_size2,
sizeof(pixel_size)),
"Got target pixel size mismatch.\n");
6769 ID2D1BitmapRenderTarget_GetDpi(
rt, dpi2, dpi2 + 1);
6772 ID2D1BitmapRenderTarget_Release(
rt);
6776 hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &
size, &pixel_size,
NULL,
6778 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6781 ID2D1BitmapRenderTarget_GetDpi(
rt, dpi2, dpi2 + 1);
6782 ok(
dpi[0] == dpi2[0] / 2.0f &&
dpi[1] == dpi2[1] / 2.0f,
"Got dpi mismatch.\n");
6784 ID2D1BitmapRenderTarget_Release(
rt);
6788 hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &
size,
NULL,
NULL,
6790 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6792 ID2D1BitmapRenderTarget_GetDpi(
rt, dpi2, dpi2 + 1);
6794 pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(
rt);
6796 && pixel_size.
height ==
ceilf(
size.height *
dpi[1] / 96.0f),
"Wrong pixel size %ux%u\n",
6804 ID2D1HwndRenderTarget_Release(hwnd_rt);
6807 hr = ID2D1BitmapRenderTarget_GetBitmap(
rt, &
bitmap);
6808 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6809 hr = ID2D1BitmapRenderTarget_GetBitmap(
rt, &
bitmap2);
6810 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6814 ID2D1BitmapRenderTarget_BeginDraw(
rt);
6816 ID2D1BitmapRenderTarget_Clear(
rt, &
color);
6818 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6821 hr = ID2D1BitmapRenderTarget_GetBitmap(
rt, &
bitmap2);
6822 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6825 ID2D1Bitmap_Release(
bitmap);
6828 refcount = ID2D1BitmapRenderTarget_Release(
rt);
6829 ok(!refcount,
"Target should be released, got %lu.\n", refcount);
6836 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
6841 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &dc_rt);
6842 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6846 hr = ID2D1DCRenderTarget_CreateCompatibleRenderTarget(dc_rt,
NULL,
NULL,
NULL,
6848 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6850 pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(
rt);
6851 ok(pixel_size.
width == 0 && pixel_size.
height == 0,
"Got wrong size\n");
6853 hr = ID2D1BitmapRenderTarget_GetBitmap(
rt, &
bitmap);
6854 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6855 pixel_size = ID2D1Bitmap_GetPixelSize(
bitmap);
6856 ok(pixel_size.
width == 0 && pixel_size.
height == 0,
"Got wrong size\n");
6857 ID2D1Bitmap_Release(
bitmap);
6859 ID2D1BitmapRenderTarget_Release(
rt);
6860 ID2D1DCRenderTarget_Release(dc_rt);
6872 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6874 dpi_x = dpi_y = 0.0f;
6875 ID2D1Factory_GetDesktopDpi(
factory, &dpi_x, &dpi_y);
6876 ok(dpi_x > 0.0f && dpi_y > 0.0f,
"Got wrong dpi %f x %f.\n", dpi_x, dpi_y);
6878 ID2D1Factory_Release(
factory);
6889 dash_style_tests[] =
6904 float miter_limit, dash_offset;
6916 desc.miterLimit = 1.5f;
6918 desc.dashOffset = -1.0f;
6921 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6923 cap_style = ID2D1StrokeStyle_GetStartCap(
style);
6925 cap_style = ID2D1StrokeStyle_GetEndCap(
style);
6927 cap_style = ID2D1StrokeStyle_GetDashCap(
style);
6929 line_join = ID2D1StrokeStyle_GetLineJoin(
style);
6931 miter_limit = ID2D1StrokeStyle_GetMiterLimit(
style);
6932 ok(miter_limit == 1.5f,
"Unexpected miter limit %f.\n", miter_limit);
6933 dash_style = ID2D1StrokeStyle_GetDashStyle(
style);
6935 dash_offset = ID2D1StrokeStyle_GetDashOffset(
style);
6936 ok(dash_offset == -1.0f,
"Unexpected dash offset %f.\n", dash_offset);
6943 desc.miterLimit = 1.5f;
6945 desc.dashOffset = 0.0f;
6947 ID2D1StrokeStyle_Release(
style);
6952 hr = ID2D1Factory_CreateStrokeStyle(
ctx.factory, &
desc, dashes, 0, &
style);
6955 hr = ID2D1Factory_CreateStrokeStyle(
ctx.factory, &
desc, dashes, 1, &
style);
6956 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
6957 ID2D1StrokeStyle_Release(
style);
6961 hr = ID2D1Factory_CreateStrokeStyle(
ctx.factory, &
desc, dashes, 1, &
style);
6965 desc.dashStyle = 100;
6974 desc.miterLimit = 1.5f;
6975 desc.dashOffset = 0.0f;
6982 desc.dashStyle = dash_style_tests[
i].dash_style;
6985 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
6987 dash_count = ID2D1StrokeStyle_GetDashesCount(
style);
6988 ok(dash_count == dash_style_tests[
i].dash_count,
"%u: unexpected dash count %u, expected %u.\n",
6989 i, dash_count, dash_style_tests[
i].dash_count);
6990 ok(dash_count <
ARRAY_SIZE(dashes),
"%u: unexpectedly large dash count %u.\n",
i, dash_count);
6991 if (dash_count == dash_style_tests[
i].dash_count)
6995 ID2D1StrokeStyle_GetDashes(
style, dashes, dash_count);
6996 ok(!
memcmp(dashes, dash_style_tests[
i].dashes,
sizeof(*dashes) * dash_count),
6997 "%u: unexpected dash array.\n",
i);
7000 memset(dashes, 0xcc,
sizeof(dashes));
7002 ok(!
memcmp(dashes, dash_style_tests[
i].dashes,
sizeof(*dashes) * dash_count),
7003 "%u: unexpected dash array.\n",
i);
7006 ok(dashes[
j] == 0.0f,
"%u: unexpected dash value at %u.\n",
i,
j);
7009 ID2D1StrokeStyle_Release(
style);
7015 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7017 count = ID2D1StrokeStyle_GetDashesCount(
style);
7018 ok(
count == 0,
"Unexpected dashes count %u.\n",
count);
7020 ID2D1StrokeStyle_Release(
style);
7042 stops2[1] = stops2[0];
7045 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7047 count = ID2D1GradientStopCollection_GetGradientStopCount(gradient);
7054 stops[2] = stops[1] = stops[0];
7055 ID2D1GradientStopCollection_GetGradientStops(gradient, stops,
ARRAY_SIZE(stops));
7056 ok(!
memcmp(stops, stops2,
sizeof(*stops) *
count),
"Unexpected gradient stops array.\n");
7059 ok(stops[
i].position == 123.4f,
"%u: unexpected stop position %f.\n",
i, stops[
i].position);
7063 ID2D1GradientStopCollection_Release(gradient);
7094 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
7097 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
7098 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7100 ID2D1RenderTarget_BeginDraw(
rt);
7102 ID2D1RenderTarget_Clear(
rt, &
color);
7126 ID2D1RenderTarget_DrawEllipse(
rt, &ellipse, (
ID2D1Brush *)brush, 10.0f,
NULL);
7127 set_ellipse(&ellipse, 120.0f, 800.0f, 20.0f, 0.0f);
7128 ID2D1RenderTarget_DrawEllipse(
rt, &ellipse, (
ID2D1Brush *)brush, 10.0f,
NULL);
7129 set_ellipse(&ellipse, 200.0f, 800.0f, 0.0f, 80.0f);
7130 ID2D1RenderTarget_DrawEllipse(
rt, &ellipse, (
ID2D1Brush *)brush, 10.0f,
NULL);
7131 set_ellipse(&ellipse, 280.0f, 800.0f, 20.0f, 80.0f);
7132 ID2D1RenderTarget_DrawEllipse(
rt, &ellipse, (
ID2D1Brush *)brush, 10.0f,
NULL);
7135 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7138 ok(
match,
"Figure does not match.\n");
7140 ok(
match,
"Figure does not match.\n");
7142 "xjIUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7143 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7144 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7145 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7146 "jAEUjAEUjAEUjAEUxjIA");
7147 ok(
match,
"Figure does not match.\n");
7149 "zjECnQETjAEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
7150 "igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
7151 "igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
7152 "igEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEVigEV"
7153 "igEVigEVigEVigEVjAETnQECzjEA");
7154 ok(
match,
"Figure does not match.\n");
7157 ok(
match,
"Figure does not match.\n");
7159 ok(
match,
"Figure does not match.\n");
7161 "5i4UjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7162 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7163 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7164 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7165 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUhjAA");
7166 ok(
match,
"Figure does not match.\n");
7168 "vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7169 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7170 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7171 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7172 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7173 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7174 ok(
match,
"Figure does not match.\n");
7181 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7182 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7183 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7184 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7185 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7188 "hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4VGhVbFRwVWRUeFVcVIBVVFCQUUxQmFFEUKBRP"
7189 "FSgVTRUqFUwULBRLFC4USRQwFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
7190 "OBQ/FDoUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7191 "FDwUPBQ8FDwUPBQ8FD0UOhQ+FDoUPhQ6FD4UOhQ+FDoUPxQ4FEAUOBRAFDgUQRQ2FEIUNhRDFDQU"
7192 "RBQ0FEUUMhRGFDIURxQwFEgUMBRJFC4USxQsFEwVKhVNFSgVTxQoFFEUJhRTFCQUVRUgFVcVHhVZ"
7193 "FRwVWxUaFV4VFhVhFhIWZBYOFmgXCBdsMnAudSh7IoMBGIQw");
7196 ID2D1RenderTarget_BeginDraw(
rt);
7198 ID2D1RenderTarget_Clear(
rt, &
color);
7200 set_rounded_rect(&rounded_rect, 40.0f, 160.0f, 40.0f, 160.0f, 10.0f, 10.0f);
7201 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7202 set_rounded_rect(&rounded_rect, 100.0f, 160.0f, 140.0f, 160.0f, 10.0f, 10.0f);
7203 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7204 set_rounded_rect(&rounded_rect, 200.0f, 80.0f, 200.0f, 240.0f, 10.0f, 10.0f);
7205 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7206 set_rounded_rect(&rounded_rect, 260.0f, 240.0f, 300.0f, 80.0f, 10.0f, 10.0f);
7207 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7209 set_rounded_rect(&rounded_rect, 40.0f, 480.0f, 40.0f, 480.0f, 10.0f, 20.0f);
7210 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7211 set_rounded_rect(&rounded_rect, 100.0f, 480.0f, 140.0f, 480.0f, 10.0f, 20.0f);
7212 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7213 set_rounded_rect(&rounded_rect, 200.0f, 400.0f, 200.0f, 560.0f, 10.0f, 20.0f);
7214 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7215 set_rounded_rect(&rounded_rect, 260.0f, 560.0f, 300.0f, 400.0f, 10.0f, 20.0f);
7216 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7218 set_rounded_rect(&rounded_rect, 40.0f, 800.0f, 40.0f, 800.0f, 10.0f, 5.0f);
7219 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7220 set_rounded_rect(&rounded_rect, 100.0f, 800.0f, 140.0f, 800.0f, 10.0f, 5.0f);
7221 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7222 set_rounded_rect(&rounded_rect, 200.0f, 720.0f, 200.0f, 880.0f, 10.0f, 5.0f);
7223 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7224 set_rounded_rect(&rounded_rect, 260.0f, 880.0f, 300.0f, 720.0f, 10.0f, 5.0f);
7225 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7228 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7235 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7236 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7237 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7238 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7239 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7242 "3C4oaUZVUExYRlxCHCgcPxU4FT0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7243 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7244 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7245 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7246 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7247 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FD0VOBU/YEJcRlhMUFVG7S8A");
7255 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7256 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7257 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7258 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7259 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7262 "3C4obT5dSFRQTlRKGCgYRhYwFkMVNBVBFTYVPxU5FD4UOhQ9FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7263 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7264 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7265 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7266 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7267 "PBQ8FDwUPRQ6FD4UOhQ/FTYVQRU0FUMWMBZGWEpVTVBTSltA8C8A");
7275 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7276 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7277 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7278 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7279 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7282 "3C4oZU5NWERgP2I9HigePBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7283 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7284 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7285 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7286 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7287 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZD1iP2BEWE1O6S8A");
7290 ID2D1RenderTarget_BeginDraw(
rt);
7292 ID2D1RenderTarget_Clear(
rt, &
color);
7294 set_rounded_rect(&rounded_rect, 40.0f, 160.0f, 40.0f, 160.0f, 1000.0f, 1000.0f);
7295 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7296 set_rounded_rect(&rounded_rect, 100.0f, 160.0f, 140.0f, 160.0f, 1000.0f, 1000.0f);
7297 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7298 set_rounded_rect(&rounded_rect, 200.0f, 80.0f, 200.0f, 240.0f, 1000.0f, 1000.0f);
7299 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7300 set_rounded_rect(&rounded_rect, 260.0f, 240.0f, 300.0f, 80.0f, 1000.0f, 1000.0f);
7301 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7303 set_rounded_rect(&rounded_rect, 40.0f, 480.0f, 40.0f, 480.0f, 10.0f, 1000.0f);
7304 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7305 set_rounded_rect(&rounded_rect, 100.0f, 480.0f, 140.0f, 480.0f, 10.0f, 1000.0f);
7306 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7307 set_rounded_rect(&rounded_rect, 200.0f, 400.0f, 200.0f, 560.0f, 10.0f, 1000.0f);
7308 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7309 set_rounded_rect(&rounded_rect, 260.0f, 560.0f, 300.0f, 400.0f, 10.0f, 1000.0f);
7310 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7312 set_rounded_rect(&rounded_rect, 40.0f, 800.0f, 40.0f, 800.0f, 1000.0f, 10.0f);
7313 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7314 set_rounded_rect(&rounded_rect, 100.0f, 800.0f, 140.0f, 800.0f, 1000.0f, 10.0f);
7315 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7316 set_rounded_rect(&rounded_rect, 200.0f, 720.0f, 200.0f, 880.0f, 1000.0f, 10.0f);
7317 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7318 set_rounded_rect(&rounded_rect, 260.0f, 880.0f, 300.0f, 720.0f, 1000.0f, 10.0f);
7319 ID2D1RenderTarget_DrawRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush, 10.0f,
NULL);
7322 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7329 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7330 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7331 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7332 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7333 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7336 "hDAYgwEieyh1LnAybBcIF2gWDhZkFhIWYRUWFV4WGRVbFRwVWRUeFVcVIBVVFSMUUxQmFFEVJxRP"
7337 "FSgVTRUqFUwULBRLFC4USRUvFEgUMBRHFDIURhQyFEUUNBREFDQUQxQ2FEIUNhRBFDgUQBQ4FEAU"
7338 "OBQ/FTkUPhQ6FD4UOhQ+FDoUPhQ6FD0UPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7339 "FDwUPBQ8FDwUPBQ8FD0UOhQ+FDoUPhQ6FD4UOhQ+FDoUPxQ4FEAUOBRAFDgUQRQ2FEIUNhRDFDQU"
7340 "RBQ0FEUUMhRGFDIURxQwFEgUMBRJFC4USxQsFEwVKhVNFSgVTxQoFFEUJhRTFCQUVRUgFVcVHhVZ"
7341 "FRwVWxUaFV4VFhVhFhIWZBYOFmgWChZsMnAudCp6IoMBGIQw");
7349 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7350 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7351 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7352 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7353 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7356 "3C4obzpjQF5EWkhXFSAVVRQkFFMUJhRRFCgUTxQqFE0VKhVMFCwUSxQuFEoULhVIFDAUSBQwFUYU"
7357 "MhRGFDIURRQ0FEQUNBRDFTQVQhQ2FEIUNhRCFDYUQRQ4FEAUOBRAFDgUQBQ4FD8UOhQ+FDoUPhQ6"
7358 "FD4UOhQ+FDoUPhQ6FD0VOxQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7359 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBU7FD0UOhQ+FDoUPhQ6FD4UOhQ+FDoUPhQ6FD8UOBRA"
7360 "FDgUQBQ4FEAUOBRBFDYUQhQ2FEIUNhRCFTQVQxQ0FEQUNBRFFDIURhQyFEYVMBVHFDAUSBUuFUkU"
7361 "LhRLFCwUTBUrFE0UKhRPFCgUURQmFFMUJBRVSldIWUZdQWI78i8A");
7369 "iDAQjgEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7370 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7371 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7372 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEUjAEU"
7373 "jAEUjAEUjAEUjAEUjAEUjAEUjAEUjgEQiDAA");
7376 "9i80ZERWUExYRV5AHCocPRY4FjwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7377 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7378 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7379 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7380 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7381 "PBQ8FDwUPBQ8FDwUPBQ8FToVPRssG0BeRFpLUFVGYzT2LwAA");
7384 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
7385 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7386 hr = ID2D1PathGeometry_Open(geometry, &
sink);
7387 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7456 hr = ID2D1GeometrySink_Close(
sink);
7457 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7458 ID2D1GeometrySink_Release(
sink);
7460 ID2D1RenderTarget_BeginDraw(
rt);
7461 ID2D1RenderTarget_Clear(
rt, &
color);
7464 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7465 ID2D1PathGeometry_Release(geometry);
7468 ok(
match,
"Figure does not match.\n");
7470 ok(
match,
"Figure does not match.\n");
7472 ok(
match,
"Figure does not match.\n");
7477 ok(
match,
"Figure does not match.\n");
7479 "qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
7480 "lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
7481 "lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKQQpLCkEKSwqWAQqW"
7482 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
7483 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
7484 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
7485 ok(
match,
"Figure does not match.\n");
7487 ok(
match,
"Figure does not match.\n");
7489 "qyIKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
7490 "lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEK"
7491 "lgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKlgEKSwpBCksKQQqWAQqWAQqW"
7492 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
7493 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqW"
7494 "AQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQqWAQrLIwAA");
7495 ok(
match,
"Figure does not match.\n");
7498 "rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
7499 "jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
7500 "CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
7501 "CnIKGgpxChwKcAocCm8KHgpuCh4KbQogCmwKIAprCiIKagoiCmkKJApoCiQKZwomCmYKJgplCigK"
7502 "ZAooCmMKKgpiCioKYQosCmAKLApfCi4KXgouCl0KMApcCjAKWwoyCloKMgpZCjQKWAo0ClcKNgpW"
7503 "CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
7505 ok(
match,
"Figure does not match.\n");
7507 "ozIKRgpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
7508 "VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
7509 "CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
7510 "HApxChoKcgoaCnMKGAp0ChgKdQoWCnYKFgp3ChQKeAoUCnkKEgp6ChIKewoQCnwKEAp9Cg4KfgoO"
7511 "Cn8KDAqAAQoMCoEBCgoKggEKCgqDAQoICoQBCggKhQEKBgqGAQoGCocBCgQKiAEKBAqJAQoCCooB"
7512 "CgIKiwEUjAEUjQESjgESjwEQkAEQkQEOkgEOkwEMlAEMlQEKlgEKlwEImAEImQEGmgEGmwEEnAEE"
7514 ok(
match,
"Figure does not match.\n");
7516 "rycCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
7517 "jAEUiwEKAgqKAQoCCokBCgQKiAEKBAqHAQoGCoYBCgYKhQEKCAqEAQoICoMBCgoKggEKCgqBAQoM"
7518 "CoABCgwKfwoOCn4KDgp9ChAKfAoQCnsKEgp6ChIKeQoUCngKFAp3ChYKdgoWCnUKGAp0ChgKcwoa"
7519 "CnIKGgpxChwKcAocCm8KHgpuCh4KbQogCmwKIAprCiIKagoiCmkKJApoCiQKZwomCmYKJgplCigK"
7520 "ZAooCmMKKgpiCioKYQosCmAKLApfCi4KXgouCl0KMApcCjAKWwoyCloKMgpZCjQKWAo0ClcKNgpW"
7521 "CjYKVQo4ClQKOApTCjoKUgo6ClEKPApQCjwKTwo+Ck4KPgpNCkAKTApACksKQgpKCkIKSQpECkgK"
7523 ok(
match,
"Figure does not match.\n");
7525 "gzFaRlpHCkQKSApECkkKQgpKCkIKSwpACkwKQApNCj4KTgo+Ck8KPApQCjwKUQo6ClIKOgpTCjgK"
7526 "VAo4ClUKNgpWCjYKVwo0ClgKNApZCjIKWgoyClsKMApcCjAKXQouCl4KLgpfCiwKYAosCmEKKgpi"
7527 "CioKYwooCmQKKAplCiYKZgomCmcKJApoCiQKaQoiCmoKIgprCiAKbAogCm0KHgpuCh4KbwocCnAK"
7528 "HApxChoKcgoaCnMKGAp0ChgKdQoWCnYKFgp3ChQKeAoUCnkKEgp6ChIKewoQCnwKEAp9Cg4KfgoO"
7529 "Cn8KDAqAAQoMCoEBCgoKggEKCgqDAQoICoQBCggKhQEKBgqGAQoGCocBCgQKiAEKBAqJAQoCCooB"
7530 "CgIKiwEUjAEUjQESjgESjwEQkAEQkQEOkgEOkwEMlAEMlQEKlgEKlwEImAEImQEGmgEGmwEEnAEE"
7532 ok(
match,
"Figure does not match.\n");
7535 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &rect_geometry[0]);
7536 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7539 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &rect_geometry[1]);
7540 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7546 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7548 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7553 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7555 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7561 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7563 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7565 ID2D1RenderTarget_BeginDraw(
rt);
7566 ID2D1RenderTarget_Clear(
rt, &
color);
7572 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7573 ID2D1TransformedGeometry_Release(transformed_geometry[2]);
7574 ID2D1TransformedGeometry_Release(transformed_geometry[1]);
7575 ID2D1TransformedGeometry_Release(transformed_geometry[0]);
7576 ID2D1RectangleGeometry_Release(rect_geometry[1]);
7577 ID2D1RectangleGeometry_Release(rect_geometry[0]);
7580 "vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7581 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7582 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7583 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7584 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7585 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7586 ok(
match,
"Figure does not match.\n");
7588 "8XYGtQIOrAIXpAIfmwIokwIwigI4gwJA+gFJ8gFR6QEzAiXhATMKJdgBMxMl0AEzGyXHATMkJb8B"
7589 "MysmtgEzNCWvATM8JaYBM0UlngEzTSWVATNWJY0BM14lhAEzZyV8M28lczN4JWszgAElYjOIASZa"
7590 "M5ABJVgtmQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVgloQElWCWhASVYJaEBJVglmQEtWCWQ"
7591 "ATNaJogBM2IlgAEzayV4M3MlbzN8JWczhAElXjONASVWM5UBJU0zngElRTOmASU8M68BJTQztgEm"
7592 "KzO/ASUkM8cBJRsz0AElEzPYASUKM+EBJQIz6QFR8gFJ+gFAgwI4igIwkwIomwIfpAIXrAIOtQIG"
7594 ok(
match,
"Figure does not match.\n");
7596 "ujEBngECnQEDnQEEmwEFmgEHmQEHmAEIlwEKlgEKlQELlAENkwENkgEOkQEQjwERjwESjQETjAEU"
7597 "jAEKAQqKAQoCCokBCgMKiQEKBAqHAQoFCoYBCgYKhgEKBwqEAQoICoMBCgkKgwEKCgqBAQoLCoAB"
7598 "Cg0KfgsNCn4KDgp9ChAKewsQCnsKEQp6ChMKeAoUCngKFAp3ChYKdQoXCnUKGApzChkKcgoaCnIK"
7599 "GwpwChwKbwodCm4LHgptCh8KbAogCmsLIQpqCiIKaQokCmcKJQpnCiUKZgonCmQKKApkCigKYwoq"
7600 "CmEKKwphCisKYAotCl4KLgpdCy8KXAowClsKMQpaCzIKWQozClgKNApXCjYKVgo2ClUKNwpUCjkK"
7601 "Uwo5ClIKOwpQCjwKTws8Ck8KPgpNCj8KTAs/CkwKQQpKCkIKSQtCCkkKRApHCkUKRgpHCkUKRwpE"
7602 "CkgKQwpKCkIKSgpBCksKQApNCj4LTQo+Ck4KPQpQCjsLUAo7ClIKOQpTCjgLUwo4ClUKNgpWCjUK"
7603 "Vwo1ClgKMwpZCjQKWAo0ClkKMwpZCjQKWQozClkKMwpZCjQKWQozClkKMwpZCjQKWQozClkKNApY"
7604 "CjQKWQozClkKNApZCjMKWQozClkKNApZCjMKWQozClkKNApZCjMKWQo0ClgKNApZCjMKWQo0ClkK"
7605 "MwpZCjMKWQo0ClkKMwpZCjMKWQo0ClkKMwpZCjQKWAo0ClkKMwpYCjUKVwo1ClYKNgpVCjgKUws4"
7606 "ClMKOQpSCjsKUAs7ClAKPQpOCj4KTQs+Ck0KQApLCkEKSgpCCkoKQwpICkQKRwpFCkcKRgpFCkcK"
7607 "RApJCkILSQpCCkoKQQpMCj8LTAo/Ck0KPgpPCjwLTwo8ClAKOwpSCjkKUwo5ClQKNwpVCjYKVgo2"
7608 "ClcKNApYCjMKWQoyC1oKMQpbCjAKXAovC10KLgpeCi0KYAorCmEKKwphCioKYwooCmQKKApkCicK"
7609 "ZgolCmcKJQpnCiQKaQoiCmoKIQtrCiAKbAofCm0KHgtuCh0KbwocCnAKGwpyChoKcgoZCnMKGAp1"
7610 "ChcKdQoWCncKFAp4ChQKeAoTCnoKEQp7ChALewoQCn0KDgp+Cg0LfgoNCoABCgsKgQEKCgqDAQoJ"
7611 "CoMBCggKhAEKBwqGAQoGCoYBCgUKhwEKBAqJAQoDCokBCgIKigEKAQqMARSMARONARKPARGPARCR"
7612 "AQ6SAQ2TAQ2UAQuVAQqWAQqXAQiYAQeZAQeaAQWbAQSdAQOdAQKeAQG6MQAA");
7613 ok(
match,
"Figure does not match.\n");
7615 "82ICvQIEugIHuAIJtgIKtAINsgIPsAIRrQITrAIVqQIYpwIZpgIbowIeoQIgnwIhnQIkmwImmAIp"
7616 "lgIVARSVAhUDFJICFQUVkAIVBxSPAhUJFIwCFQwUigIVDRWHAhYPFIYCFRIUhAIVFBSBAhUWFf8B"
7617 "FRgU/gEVGhT7ARUcFfkBFR4U9wEWIBT1ARUjFPMBFSQV8AEVJxTvARUpFOwBFisU6gEVLRXoARUv"
7618 "FOYBFjEU5AEVMxXiARU1FOABFTgU3gEVOhTbARY7FdkBFT4U2AEVQBTVARZCFNMBFUQV0QEVRhTP"
7619 "ARVJFM0BFUoVygEWTBTJARVPFMcBFVEUxAEVUxXCARVVFMEBFVcUvgEVWRW8ARVbFbkBFl0UuAEV"
7620 "YBS2ARVhFbMBFWQUsgEVZhSwARVoFK0BFWoVqwEVbBSpARZuFKcBFXAVpQEVchWiARV1FKEBFXcU"
7621 "nwEVeBWcARV7FJsBFX0UmAEWfxSWARWBARWUARWDARSSARWGARSQARWHARWOARWJARWLARWMARSK"
7622 "ARWOARSHARaPARWFARWSARSEARWUARSBARWXARR/FZgBFX0VmgEUexWdARR5FZ4BFXYWoAEVdBWj"
7623 "ARRzFaUBFHAVpwEVbhWpARRtFasBFGoVrgEUaBWvARVmFbEBFGcUsgEUZxSxARVmFbEBFWYUsgEU"
7624 "ZxSyARRnFLEBFWYVsQEUZxSyARRnFLIBFGcUsQEVZhWxARRnFLIBFGcUsQEVZhWxARVmFLIBFGcU"
7625 "sgEUZxSxARVmFbEBFGcUsgEUZxSyARRmFbEBFWYVsQEUZxSyARRnFLEBFWYVsQEUZxSyARRnFLIB"
7626 "FGcUsQEVZhWxARRnFLIBFGcUsgEUZhWxARVmFbEBFGcUsgEUZxSxARVmFa8BFWgUrgEVahSrARVt"
7627 "FKkBFW4VpwEVcBSlARVzFKMBFXQVoAEWdhWeARV5FJ0BFXsUmgEVfRWYARV/FJcBFYEBFJQBFYQB"
7628 "FJIBFYUBFY8BFocBFI4BFYoBFIwBFYsBFYkBFY4BFYcBFZABFIYBFZIBFIMBFZQBFYEBFZYBFH8W"
7629 "mAEUfRWbARR7FZwBFXgVnwEUdxWhARR1FaIBFXIVpQEVcBWnARRuFqkBFGwVqwEVahWtARRoFbAB"
7630 "FGYVsgEUZBWzARVhFbYBFGAVuAEUXRa5ARVbFbwBFVkVvgEUVxXBARRVFcIBFVMVxAEUURXHARRP"
7631 "FckBFEwWygEVShXNARRJFc8BFEYV0QEVRBXTARRCFtUBFEAV2AEUPhXZARU7FtsBFDoV3gEUOBXg"
7632 "ARQ1FeIBFTMV5AEUMRbmARQvFegBFS0V6gEUKxbsARQpFe8BFCcV8AEVJBXzARQjFfUBFCAW9wEU"
7633 "HhX5ARUcFfsBFBoV/gEUGBX/ARUWFYECFBQVhAIUEhWGAhQPFocCFQ0VigIUDBWMAhQJFY8CFAcV"
7634 "kAIVBRWSAhQDFZUCFAEVlgIpmAImmwIknQIhnwIgoQIeowIbpgIZpwIYqQIVrAITrQIRsAIPsgIN"
7635 "tAIKtgIJuAIHugIEvQIC82IA");
7636 ok(
match,
"Figure does not match.\n");
7638 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
7639 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7640 hr = ID2D1PathGeometry_Open(geometry, &
sink);
7641 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7739 hr = ID2D1GeometrySink_Close(
sink);
7740 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7741 ID2D1GeometrySink_Release(
sink);
7743 ID2D1RenderTarget_BeginDraw(
rt);
7744 ID2D1RenderTarget_Clear(
rt, &
color);
7747 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7748 ID2D1PathGeometry_Release(geometry);
7751 "vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7752 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7753 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7754 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7755 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7756 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7757 ok(
match,
"Figure does not match.\n");
7759 "vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7760 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7761 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7762 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7763 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7764 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7765 ok(
match,
"Figure does not match.\n");
7767 "vi5kPGQ8ZDxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7768 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7769 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7770 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7771 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7772 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7773 ok(
match,
"Figure does not match.\n");
7775 "yC5aRlpGWjxkPGQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7776 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7777 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7778 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8"
7779 "FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwU"
7780 "PBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8FDwUPBQ8ZDxkPGQ8ZDxk3i8A");
7781 ok(
match,
"Figure does not match.\n");
7784 "3SoDYAM6B1gHOgtQCzoPSA87EkASPBc2FzwcLBw8IiAiPWI+Yj5iPhQBOAEUPhQKJgoUPxQ4FEAU"
7785 "OBRAFDgUQBQ4FEAUOBRBFDYUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRDFDQURBQ0FEQUNBREFDQURBQ0"
7786 "FEQUNBREFDQURBQ0FEQUNBREFDQURRQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIU"
7787 "RhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRG"
7788 "FDIURRQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEMUNhRCFDYUQhQ2FEIU"
7789 "NhRCFDYUQhQ2FEEUOBRAFDgUQBQ4FEAUOBRAFDgUPxQKJgoUPhQBOAEUPmI+Yj5iPSIgIjwcLBw8"
7790 "FzYXPBJAEjsPSA86C1ALOgdYBzoDYAPdKgAA");
7791 ok(
match,
"Figure does not match.\n");
7793 "uxUBnwECngEDnQEEnAEFmwEGmwEGmgEHmQEImAEJlwEKlgELlQEMlQEMlAENkwEOkgEPkQEQkAER"
7794 "VQQ2Ek0KOBJFEDkTPRY6FDUcOxUrJDwYHi09Yj5iP2BAQwkUQDgUFEAUOBRAFDcUQRQ3FEEUNxRC"
7795 "FDYUQhQ2FEIUNhRCFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQU"
7796 "NBREFDQURBQ0FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQ0"
7797 "FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQ0FEQUNBREFDQU"
7798 "RBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNRRDFDUUQxQ1FEMUNRRDFDUUQhQ2FEIUNhRC"
7799 "FDYUQhQ3FEEUNxRBFDcUQBQ4FEAUFDhAFAlDQGA/Yj5iPS0eGDwkKxU7HDUUOhY9EzkQRRI4Ck0S"
7800 "NgRVEZABEJEBD5IBDpMBDZQBDJUBDJUBC5YBCpcBCZgBCJkBB5oBBpsBBpsBBZwBBJ0BA54BAp8B"
7802 ok(
match,
"Figure does not match.\n");
7804 "pBYBngECnQEDnAEEmwEFmgEGmQEGmQEHmAEIlwEJlgEKlQELlAEMkwEMkwENkgEOkQEPkAEQNgRV"
7805 "ETcKTRI4EEUSOhY9EzscNRQ8JCsVPS0eGD5iPmI/YEAUCUNAFBQ4QBQ4FEEUNxRBFDcUQRQ3FEEU"
7806 "NhRCFDYUQhQ2FEMUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0"
7807 "FEQUNBREFDQURBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxREFDQU"
7808 "RBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxREFDQURBQ0FEQUNBRE"
7809 "FDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQUQxQ1FEMUNRRDFDUUQxQ1FEMUNRRDFDYUQhQ2FEIU"
7810 "NhRBFDcUQRQ3FEEUNxRBFDgUQDgUFEBDCRRAYD9iPmI+GB4tPRUrJDwUNRw7Ez0WOhJFEDgSTQo3"
7811 "EVUENhCQAQ+RAQ6SAQ2TAQyTAQyUAQuVAQqWAQmXAQiYAQeZAQaZAQaaAQWbAQScAQOdAQKeAQGk"
7813 ok(
match,
"Figure does not match.\n");
7815 "wCsDmQEHlQELkQEPSwJAEkgLNhc8HCwcPCIgIj1iPmI+Yj4UATgBFD4UCiYKFD8UOBRAFDgUQBQ4"
7816 "FEAUOBRAFDgUQRQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDYUQxQ0FEQUNBREFDQURBQ0FEQUNBREFDQU"
7817 "RBQ0FEQUNBREFDQURBQ0FEUUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRG"
7818 "FDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEUU"
7819 "NBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBRDFDYUQhQ2FEIUNhRCFDYUQhQ2"
7820 "FEIUNhRBFDgUQBQ4FEAUOBRAFDgUQBQ4FD8UCiYKFD4UATgBFD5iPmI+Yj0iICI8HCwcPBc2FzwS"
7821 "QBI7D0gPOgtQCzoHWAc6A2AD3SoA");
7822 ok(
match,
"Figure does not match.\n");
7825 "3SkmcThiRFdOTVhEICAgPhwsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
7826 "QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
7827 "FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
7828 "MhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQz"
7829 "FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNRRCFDYUQhQ2FEIUNhRCFDYU"
7830 "QhQ2FEIUNxRAFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPhQ6FD4UOhQ+FDsUPBQ8FzYXPBws"
7831 "HD4gICBEWE1OV0RiOHEm3SkA");
7832 ok(
match,
"Figure does not match.\n");
7834 "zykoczhkRVhQTlpEFx4tPRUrJDwUNRw7FDwVOxQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUOBRBFDcU"
7835 "QRQ3FEEUNhRCFDYUQhQ2FEIUNhRDFDUUQxQ1FEMUNRRDFDUUQxQ0FEQUNBREFDQURBQ0FEQUNBRE"
7836 "FDQURBQ0FEQUNBREFDQURBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
7837 "MxRFFDMURBQ0FEQUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURBQ0"
7838 "FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEMUNRRDFDUUQxQ1FEMUNRRDFDYU"
7839 "QhQ2FEIUNhRCFDYUQRQ3FEEUNxRBFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDsVPBQ7HDUUPCQr"
7840 "FT0tHhdEWk5QWEVkOHMozykA");
7841 ok(
match,
"Figure does not match.\n");
7843 "6SkobThfRVNQSFpALR4XPSQrFTscNRQ7FTwUOhQ+FDoUPhQ5FEAUOBRAFDgUQBQ4FEAUNxRBFDcU"
7844 "QRQ3FEEUNxRCFDYUQhQ2FEIUNRRDFDUUQxQ1FEMUNRRDFDUUQxQ1FEQUNBREFDQURBQ0FEQUNBRE"
7845 "FDQURBQ0FEQUNBREFDQURBQ0FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUU"
7846 "MxRFFDQURBQ0FEQUNBRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDMURRQzFEUUMxRFFDQURBQ0"
7847 "FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ1FEMUNRRDFDUUQxQ1FEMUNRRDFDUU"
7848 "QhQ2FEIUNhRCFDcUQRQ3FEEUNxRBFDcUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPBU7FDUcOxUr"
7849 "JD0XHi1AWkhQU0VfOG0o6SkA");
7850 ok(
match,
"Figure does not match.\n");
7852 "3SkmcThiRFdOTVhGHiAgRhQsHDwXNhc8FDwUOxQ+FDoUPhQ6FD4UOhQ+FDoUPhQ5FEAUOBRAFDgU"
7853 "QBQ4FEAUOBRAFDcUQhQ2FEIUNhRCFDYUQhQ2FEIUNhRCFDUURBQ0FEQUNBREFDQURBQ0FEQUNBRE"
7854 "FDQURBQ0FEQUNBREFDQURBQzFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYU"
7855 "MhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQyFEYUMhRGFDIURhQz"
7856 "FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNBREFDQURBQ0FEQUNRRCFDYUQhQ2FEIUNhRCFDYU"
7857 "QhQ2FEIUNxRAFDgUQBQ4FEAUOBRAFDgUQBQ5FD4UOhQ+FDoUPhQ6FD4UOhQ+FDsUPBQ8FzYXPBws"
7858 "HD4gICBEWE1OV0RiOHEm3SkA");
7859 ok(
match,
"Figure does not match.\n");
7861 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
7862 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7863 hr = ID2D1PathGeometry_Open(geometry, &
sink);
7864 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7882 hr = ID2D1GeometrySink_Close(
sink);
7883 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7884 ID2D1GeometrySink_Release(
sink);
7889 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7891 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7897 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7899 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7900 ID2D1PathGeometry_Release(geometry);
7905 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7907 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7913 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
7915 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7917 ID2D1RenderTarget_BeginDraw(
rt);
7918 ID2D1RenderTarget_Clear(
rt, &
color);
7924 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7925 ID2D1TransformedGeometry_Release(transformed_geometry[3]);
7926 ID2D1TransformedGeometry_Release(transformed_geometry[2]);
7927 ID2D1TransformedGeometry_Release(transformed_geometry[1]);
7928 ID2D1TransformedGeometry_Release(transformed_geometry[0]);
7931 "yjIJkQEHBwaIAQUSBYMBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQWBIIBBBYEggEEFgSCAQQW"
7932 "BIIBBBYEggEEFgSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSDAQQVBIMBBBUEgwEEFQSD"
7933 "AQQVBIQBBBQEhAEEFASEAQQTBIUBBBMEhQEEEwSFAQQTBIUBBBMEhQEEEwSGAQQSBIYBBBIEhgEE"
7934 "EgSGAQQSBIYBBBIEhgEEEgSGAQQRBIgBBBAEiAEEEASIAQQQBIkBBA4EigEEDgSLAQQMBIwBBAwE"
7935 "jQEECgSOAQQJBJABBAgEkAEFBgSSAQQGBJMBBAQElAEEBASVAQQDBJUBBAIElwEEAQSXAQiZAQeZ"
7936 "AQaaAQaaAQaaAQabAQWbAQWbAQWbAQWaAQeZAQeZAQeZAQiXAQQBBJYBBAMElQEEAwWRAQUGBY0B"
7937 "BQwFhwEFEgSCAQUXBYABBBoFfgUYBIIBBhEFiAEUpTEA");
7938 ok(
match,
"Figure does not match.\n");
7940 "yJIBArkCDa4CGKMCIZoCK5ECM4gCO4ECQ/gBS/EBUesBLAYl5QEsDiPeASwWIdkBLBwh0wEsISHO"
7941 "ASsgKMsBKR4vyAEnHDPIASUaNMsBIxg1mQEFMCIUN54BCygiDzijAREhIgY9qAEYGWGuAR4RXbMB"
7942 "JAhbuQGAAcABesYBc84Ba9YBTvQBP4MCOIoCNI4CM5ACMZICL5QCLZYCK5kCKJsCJ54CI6MCHq8C"
7944 ok(
match,
"Figure does not match.\n");
7946 "xWkCmwEFmAEJlQELlAENkgEOkQEPjwESjQETjAEVigELAQqJAQsCCogBCwQKhwEKBQqGAQoGCoYB"
7947 "CgcKhAEKCAqEAQoIC4IBCgoKggEKCgqBAQoMCoABCgwKfwoNCn8KDgp9Cg8KfQoPCnwKEQp7ChEK"
7948 "egoSCnoKEwp4ChQKeAoUCncLFQp2ChYKdgoWCnYKFwp2ChYKdgoWCncKFgp2ChYKdgoWCncKFQt2"
7949 "ChYKdwoVCncKFQp4ChUKdwoVCncKFQp4ChUKdwoVCngKFAp4ChUKeAoUCngKFAp4CxMKeQoUCngK"
7950 "FAp5ChMKeQoUCnkKEwp5ChMKegoSC3kKEwp6ChIKegoSCnoLEgp6ChIKegoSCnsKEQp7ChEKfAoQ"
7951 "CnwKEAp9Cg8KfQoPCn4KDgp+Cg4KfwoOCn4KDgp/Cg0KfwoNCoABCgwKgAEKDAqBAQoLCoEBCgsK"
7952 "gQELCgqCAQoKCoIBCwkKgwEKCQqDAQoJCoQBCggKhAEKCQqEAQsHCoUBCwYKhgELBQqHAQsECogB"
7953 "CwMKiQELAgqLAQoBCowBFI0BE44BE44BEo8BEZABEJEBD5IBDpMBDpMBDZMBDZQBDJQBDZQBDJQB"
7954 "DBUCfgwSBH4MEQV/DA4GgAEMDAiAAQ0KCYEBDAgLgQENBQ2BAQ0EDoIBDQEPgwEdgwEdgwEdgwEc"
7955 "hAEKAgQCCoUBCgYKhgEKBgqGAQoFC4YBCgUKhwEKBAqIAQoECogBCgMKiQEKAwqIAQoDCokBCgMK"
7956 "iQEKAgqJAQoCCooBCgIKiQEKAgqKAQoBCosBCgEKigEKAQqLARSMARSLARSMAROMARONARKOARGO"
7957 "ARGPARCQAQ6RAQ2YAQTEZAAA");
7958 ok(
match,
"Figure does not match.\n");
7960 "ytABA7gCCbICD60CFKkCF6cCGqMCHqACIZ0CJJoCJpgCKZUCFgIUkgIWBBWPAhYHFI4CFQoUjAIV"
7961 "DBSKAhUNFYgCFQ8UhwIVERSFAhUTFIMCFRQVgQIUFxSAAhQZFP4BFBoV/AEUHBT7ARQeFPkBFB8V"
7962 "9wEUIRT2ARQjFPQBFSMV8gEVJRTxARUnFPABFCgV7gEUKhTtARQsFOwBFCwV7AEULBTsARUsFOwB"
7963 "FSsV7AEULBTtARQsFO0BFCsU7QEVKxTtARUqFe0BFSoU7gEUKxTuARQqFe4BFCoU7wEUKhTuARUp"
7964 "FO8BFSkU7wEVKBXvARUoFPABFCkU8AEUKBTxARQoFPEBFCcV8QEUJxTxARUnFPEBFSYU8gEVJhTy"
7965 "ARUlFfIBFSUU8wEUJRXzARQlFPQBFCUU9AEUJBT1ARQkFPUBFCMU9gEUIhT2ARUhFPcBFSAU+AEV"
7966 "HxT5ARUeFPoBFR4U+gEVHRT7ARUcFPwBFRsU/QEVGhT+ARUZFP8BFBkUgAIUGBSBAhQXFIICFBcU"
7967 "ggIUFhSDAhQVFIQCFBQUhQIUExSGAhQSFIcCFBIUhwIUERSIAhUPFIkCFg0UigIXCxSNAhYJFI8C"
7968 "FggUkAIXBRSSAhcDFJQCFwEUlgIrlwIpmgImnAIkngIjnwIhoQIfowIepAIcpgIbpgIaqAIZqAIZ"
7969 "qAIYKwP7ARgnBf0BGCMI/QEZHgz+ARgbD/8BGBcSgAIYEhaAAhoNGIICGggcgwIaBB+DAjyEAjyF"
7970 "AjqGAjmIAjiIAiECFIkCFAIIBBSKAhQNFIsCFAwUjAIUCxSNAhQKFI4CFAkUjwIUBxWQAhQGFZEC"
7971 "FAUVkQIUBRWRAhQFFZECFQMVkwIUAxWTAhQDFZMCFAIVlAIVARWVAiqVAimWAimWAiiYAiaZAiaZ"
7972 "AiWaAiScAiKdAiGeAh+hAhyjAhmuAg3GxgEA");
7973 ok(
match,
"Figure does not match.\n");
7975 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
7976 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7977 hr = ID2D1PathGeometry_Open(geometry, &
sink);
7978 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7990 hr = ID2D1GeometrySink_Close(
sink);
7991 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7992 ID2D1GeometrySink_Release(
sink);
7994 ID2D1RenderTarget_BeginDraw(
rt);
7995 ID2D1RenderTarget_Clear(
rt, &
color);
7998 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
7999 ID2D1PathGeometry_Release(geometry);
8002 "3iUCngEEnAEGmgEImAEKlgEMlAEOkgEQkAESjgEUjAEWigEYiAEahgEchAEeggEggQEhfyN9JXsn"
8003 "eih4KnYUAhZ1FAMWcxQFFnIUBhZwFQcWbxQJFm4UChZsFQsWaxUMFmoVDRZpFQ4WaBUPFmcVEBZm"
8004 "FREWZhURFmUVEhZkFhIWZBYSFmQXERZkFxEWZBgQFmQaDhZlGwwWZh0JFmchBBZpOWw2bzN0Lnsn"
8006 ok(
match,
"Figure does not match.\n");
8009 "njIUjAEUjAEUjAEUjAEUjAEUjQEUjAEUjAEUjAEUjQEUjAEUjAEUjQEUjAEUjQEUjAEVjAEUjQEU"
8010 "jAEVjAEVjAEVjAEVjAEVjAEVjAEVjQEVjAEVjAEWjAEWjAEXiwEXiwEYigEaiQEbiAEdhgEhgwEz"
8011 "ci53KX4ihwEZ6GEA");
8012 ok(
match,
"Figure does not match.\n");
8014 ID2D1SolidColorBrush_Release(brush);
8043 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
8046 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
8047 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8049 ID2D1RenderTarget_BeginDraw(
rt);
8051 ID2D1RenderTarget_Clear(
rt, &
color);
8063 ID2D1RenderTarget_FillEllipse(
rt, &ellipse, (
ID2D1Brush *)brush);
8064 set_ellipse(&ellipse, 120.0f, 800.0f, 20.0f, 0.0f);
8065 ID2D1RenderTarget_FillEllipse(
rt, &ellipse, (
ID2D1Brush *)brush);
8066 set_ellipse(&ellipse, 200.0f, 800.0f, 0.0f, 80.0f);
8067 ID2D1RenderTarget_FillEllipse(
rt, &ellipse, (
ID2D1Brush *)brush);
8068 set_ellipse(&ellipse, 280.0f, 800.0f, 20.0f, 80.0f);
8069 ID2D1RenderTarget_FillEllipse(
rt, &ellipse, (
ID2D1Brush *)brush);
8072 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8075 ok(
match,
"Figure does not match.\n");
8077 ok(
match,
"Figure does not match.\n");
8079 ok(
match,
"Figure does not match.\n");
8081 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8082 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8083 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8084 ok(
match,
"Figure does not match.\n");
8087 ok(
match,
"Figure does not match.\n");
8089 ok(
match,
"Figure does not match.\n");
8091 ok(
match,
"Figure does not match.\n");
8093 "yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
8094 "TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
8095 "VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
8096 ok(
match,
"Figure does not match.\n");
8098 ID2D1RenderTarget_BeginDraw(
rt);
8100 ID2D1RenderTarget_Clear(
rt, &
color);
8102 set_rounded_rect(&rounded_rect, 40.0f, 160.0f, 40.0f, 160.0f, 10.0f, 10.0f);
8103 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8104 set_rounded_rect(&rounded_rect, 100.0f, 160.0f, 140.0f, 160.0f, 10.0f, 10.0f);
8105 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8106 set_rounded_rect(&rounded_rect, 200.0f, 80.0f, 200.0f, 240.0f, 10.0f, 10.0f);
8107 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8108 set_rounded_rect(&rounded_rect, 260.0f, 240.0f, 300.0f, 80.0f, 10.0f, 10.0f);
8109 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8111 set_rounded_rect(&rounded_rect, 40.0f, 480.0f, 40.0f, 480.0f, 10.0f, 20.0f);
8112 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8113 set_rounded_rect(&rounded_rect, 100.0f, 480.0f, 140.0f, 480.0f, 10.0f, 20.0f);
8114 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8115 set_rounded_rect(&rounded_rect, 200.0f, 400.0f, 200.0f, 560.0f, 10.0f, 20.0f);
8116 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8117 set_rounded_rect(&rounded_rect, 260.0f, 560.0f, 300.0f, 400.0f, 10.0f, 20.0f);
8118 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8120 set_rounded_rect(&rounded_rect, 40.0f, 800.0f, 40.0f, 800.0f, 10.0f, 5.0f);
8121 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8122 set_rounded_rect(&rounded_rect, 100.0f, 800.0f, 140.0f, 800.0f, 10.0f, 5.0f);
8123 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8124 set_rounded_rect(&rounded_rect, 200.0f, 720.0f, 200.0f, 880.0f, 10.0f, 5.0f);
8125 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8126 set_rounded_rect(&rounded_rect, 260.0f, 880.0f, 300.0f, 720.0f, 10.0f, 5.0f);
8127 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8130 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8133 ok(
match,
"Figure does not match.\n");
8135 ok(
match,
"Figure does not match.\n");
8137 ok(
match,
"Figure does not match.\n");
8139 "szI6YURZSlROUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8140 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8141 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5USllEYTqzMgAA");
8142 ok(
match,
"Figure does not match.\n");
8145 ok(
match,
"Figure does not match.\n");
8147 ok(
match,
"Figure does not match.\n");
8149 ok(
match,
"Figure does not match.\n");
8151 "tjI0aDxhQlxGWEpVTFNOUk5RUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8152 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8153 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFOUk5TTFVKWEZcQmA+ZzS2MgAA");
8154 ok(
match,
"Figure does not match.\n");
8157 ok(
match,
"Figure does not match.\n");
8159 ok(
match,
"Figure does not match.\n");
8161 ok(
match,
"Figure does not match.\n");
8163 "sDJAWkxSUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8164 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8165 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFJMWkCwMgAA");
8166 ok(
match,
"Figure does not match.\n");
8168 ID2D1RenderTarget_BeginDraw(
rt);
8170 ID2D1RenderTarget_Clear(
rt, &
color);
8172 set_rounded_rect(&rounded_rect, 40.0f, 160.0f, 40.0f, 160.0f, 1000.0f, 1000.0f);
8173 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8174 set_rounded_rect(&rounded_rect, 100.0f, 160.0f, 140.0f, 160.0f, 1000.0f, 1000.0f);
8175 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8176 set_rounded_rect(&rounded_rect, 200.0f, 80.0f, 200.0f, 240.0f, 1000.0f, 1000.0f);
8177 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8178 set_rounded_rect(&rounded_rect, 260.0f, 240.0f, 300.0f, 80.0f, 1000.0f, 1000.0f);
8179 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8181 set_rounded_rect(&rounded_rect, 40.0f, 480.0f, 40.0f, 480.0f, 10.0f, 1000.0f);
8182 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8183 set_rounded_rect(&rounded_rect, 100.0f, 480.0f, 140.0f, 480.0f, 10.0f, 1000.0f);
8184 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8185 set_rounded_rect(&rounded_rect, 200.0f, 400.0f, 200.0f, 560.0f, 10.0f, 1000.0f);
8186 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8187 set_rounded_rect(&rounded_rect, 260.0f, 560.0f, 300.0f, 400.0f, 10.0f, 1000.0f);
8188 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8190 set_rounded_rect(&rounded_rect, 40.0f, 800.0f, 40.0f, 800.0f, 1000.0f, 10.0f);
8191 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8192 set_rounded_rect(&rounded_rect, 100.0f, 800.0f, 140.0f, 800.0f, 1000.0f, 10.0f);
8193 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8194 set_rounded_rect(&rounded_rect, 200.0f, 720.0f, 200.0f, 880.0f, 1000.0f, 10.0f);
8195 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8196 set_rounded_rect(&rounded_rect, 260.0f, 880.0f, 300.0f, 720.0f, 1000.0f, 10.0f);
8197 ID2D1RenderTarget_FillRoundedRectangle(
rt, &rounded_rect, (
ID2D1Brush *)brush);
8200 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8203 ok(
match,
"Figure does not match.\n");
8205 ok(
match,
"Figure does not match.\n");
8207 ok(
match,
"Figure does not match.\n");
8209 "yjIMjwEWhwEcggEgfiR6KHYscy5xMG40azZpOGc6ZTxjPmI+YUBfQl1EXERbRlpGWUhYSFdKVkpV"
8210 "TFRMVExTTlJOUk5STlJOUVBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUU5STlJOUk5STlNMVExUTFVK"
8211 "VkpXSFhIWUZaRltEXERdQl9AYT5iPmM8ZTpnOGk2azRuMHEucyx2KHokfiCCARyHARaPAQzKMgAA");
8212 ok(
match,
"Figure does not match.\n");
8215 ok(
match,
"Figure does not match.\n");
8217 ok(
match,
"Figure does not match.\n");
8219 ok(
match,
"Figure does not match.\n");
8221 "uTIucDJsNmk4ZzplPGM+YUBgQF9CXkJdRFxEW0ZaRllIWEhXSlZKVkpWSlVMVExUTFRMU05STlJO"
8222 "Uk5STlJOUk9QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFPUU5STlJOUk5STlJOU0xU"
8223 "TFRMVExVSlZKVkpWSldIWEhZRlpGW0RcRF1CXkJfQGBAYT5jPGU6ZzhpNmwycC65MgAA");
8224 ok(
match,
"Figure does not match.\n");
8227 ok(
match,
"Figure does not match.\n");
8229 ok(
match,
"Figure does not match.\n");
8231 ok(
match,
"Figure does not match.\n");
8233 "vzIiczhhRldMUlBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8234 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8235 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUkxXRmA6cSS+MgAA");
8236 ok(
match,
"Figure does not match.\n");
8238 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
8239 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8240 hr = ID2D1PathGeometry_Open(geometry, &
sink);
8241 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8310 hr = ID2D1GeometrySink_Close(
sink);
8311 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8312 ID2D1GeometrySink_Release(
sink);
8314 ID2D1RenderTarget_BeginDraw(
rt);
8315 ID2D1RenderTarget_Clear(
rt, &
color);
8318 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8319 ID2D1PathGeometry_Release(geometry);
8322 ok(
match,
"Figure does not match.\n");
8324 ok(
match,
"Figure does not match.\n");
8326 ok(
match,
"Figure does not match.\n");
8328 ok(
match,
"Figure does not match.\n");
8331 ok(
match,
"Figure does not match.\n");
8333 ok(
match,
"Figure does not match.\n");
8335 ok(
match,
"Figure does not match.\n");
8337 ok(
match,
"Figure does not match.\n");
8340 "7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
8341 "jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
8342 "dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
8343 "RllIWEhXSlZKVUxUTFNOUk5RUKgy");
8344 ok(
match,
"Figure does not match.\n");
8346 "qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
8347 "bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
8348 "GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
8349 "CJkBBpoBBpsBBJwBBJ0BAp4BAu8z");
8350 ok(
match,
"Figure does not match.\n");
8352 "7zMCngECnQEEnAEEmwEGmgEGmQEImAEIlwEKlgEKlQEMlAEMkwEOkgEOkQEQkAEQjwESjgESjQEU"
8353 "jAEUiwEWigEWiQEYiAEYhwEahgEahQEchAEcgwEeggEegQEggAEgfyJ+In0kfCR7JnomeSh4KHcq"
8354 "dip1LHQscy5yLnEwcDBvMm4ybTRsNGs2ajZpOGg4ZzpmOmU8ZDxjPmI+YUBgQF9CXkJdRFxEW0Za"
8355 "RllIWEhXSlZKVUxUTFNOUk5RUKgy");
8356 ok(
match,
"Figure does not match.\n");
8358 "qDJQUU5STlNMVExVSlZKV0hYSFlGWkZbRFxEXUJeQl9AYEBhPmI+YzxkPGU6ZjpnOGg4aTZqNms0"
8359 "bDRtMm4ybzBwMHEuci5zLHQsdSp2KncoeCh5JnomeyR8JH0ifiJ/IIABIIEBHoIBHoMBHIQBHIUB"
8360 "GoYBGocBGIgBGIkBFooBFosBFIwBFI0BEo4BEo8BEJABEJEBDpIBDpMBDJQBDJUBCpYBCpcBCJgB"
8361 "CJkBBpoBBpsBBJwBBJ0BAp4BAu8z");
8362 ok(
match,
"Figure does not match.\n");
8365 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &rect_geometry[0]);
8366 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8369 hr = ID2D1Factory_CreateRectangleGeometry(
factory, &
rect, &rect_geometry[1]);
8370 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8376 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8378 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8383 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8385 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8391 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8393 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8395 ID2D1RenderTarget_BeginDraw(
rt);
8396 ID2D1RenderTarget_Clear(
rt, &
color);
8402 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8403 ID2D1TransformedGeometry_Release(transformed_geometry[2]);
8404 ID2D1TransformedGeometry_Release(transformed_geometry[1]);
8405 ID2D1TransformedGeometry_Release(transformed_geometry[0]);
8406 ID2D1RectangleGeometry_Release(rect_geometry[1]);
8407 ID2D1RectangleGeometry_Release(rect_geometry[0]);
8410 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8411 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8412 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8413 ok(
match,
"Figure does not match.\n");
8415 "sIMBA7cCDK8CFKYCHZ4CJJYCLY4CNYUCPv0BRvQBT+wBV+MBYNsBaNIBccoBecEBgQG6AYkBsQGS"
8416 "AakBmgGgAaMBmAGrAY8BtAGHAbwBfsUBfcYBfcYBfcUBfsUBfcYBfcYBfcYBfcYBfcUBfr0BhgG0"
8417 "AY8BrAGXAaMBoAGbAagBkgGwAYsBuAGCAcEBeskBcdIBadoBYOMBWOsBT/QBR/wBPoUCNowCLpUC"
8418 "Jp0CHaYCFa4CDLcCBK+DAQAA");
8419 ok(
match,
"Figure does not match.\n");
8421 "+D0BngEDnQEDnAEEmwEGmgEGmQEHmAEJlwEJlgELlAEMkwENkwEOkQEPkAEQkAERjgESjQETjQEU"
8422 "iwEVigEXiQEXiAEYhwEahgEahQEbhAEdggEeggEegQEgfyF/In0jfCR8JXomeSd5KHcpdip2K3Qs"
8423 "cy5xL3EvcDFuMm4ybTRrNWs1ajdoOGg5ZjplO2U8Yz1iPmFAYEBfQV5DXUNcRVpGWkZZSFdJV0lW"
8424 "S1RMVExTTlFPUFFPUU5STVRMVEtVSldJV0hYR1pGWkVcQ11CXkJfQGA/YT9iPWM+Yj5jPWM+Yz1j"
8425 "PWM+Yz1jPmI+Yz1jPmI+Yz1jPmM9Yz1jPmM9Yz5iPmM9Yz5iPmM9Yz5jPWM9Yz5jPWM+Yj5jPWM+"
8426 "Yj5jPWI/YT9gQF9CXkJdRFtFW0VaR1hIV0lXSlVLVExUTVJOUVBQUE9RTlNNU0xUS1ZKVklXSFlG"
8427 "WkZaRVxDXUNeQV9AYEBhPmI9Yz1kO2U6ZjpnOGg3ajVrNWs0bTJuMm4xcC9xL3Eucyx0LHUqdil3"
8428 "KXgneSZ6JXwkfCN9In8hfyCBAR6CAR6CAR2EARuFARuFARqHARiIAReJAReKARWLARSNARONARKO"
8429 "ARGQARCQAQ+RAQ6TAQ2TAQyUAQuWAQqWAQmYAQeZAQaaAQabAQScAQOdAQOeAQH4PQAA");
8430 ok(
match,
"Figure does not match.\n");
8432 "sXkBvgIDvAIEugIHuAIJtgILswINsgIPrwISrQITrAIVqQIYpwIapQIbowIeoQIgngIjnAIkmwIm"
8433 "mAIplgIqlQIskgIvkAIxjQIzjAI1igI3hwI5hgI7hAI9gQJA/wFB/QFE+wFG+QFI9gFK9QFM8wFO"
8434 "8AFQ7wFS7AFV6gFX6AFY5gFb5AFd4gFf3wFh3gFj2wFm2QFn2AFp1QFs0wFu0QFvzwFyzQF0ygF3"
8435 "yAF4xwF6xAF9wgF+wAGBAb4BgwG8AYUBuQGHAbgBiQG2AYsBswGOAbEBjwGvAZIBrQGUAasBlQGp"
8436 "AZgBpwGaAaUBnAGiAZ4BoQGgAZ4BowGcAaUBmgGmAZgBqQGWAasBlAGsAZIBrwGQAbEBjQG0AYsB"
8437 "tQGKAbcBhwG6AYUBvAGDAb0BgQHAAX/CAXzEAXvGAXvGAXvGAXvFAXvGAXvGAXvGAXvFAXvGAXvG"
8438 "AXvFAXvGAXvGAXvGAXvFAXvGAXvGAXvFAXzFAXvGAXvGAXvFAXvGAXvGAXvGAXvFAXvGAXvGAXvF"
8439 "AXzFAXvGAXvGAXvFAXvGAXvGAXvGAXvEAXzCAX/AAYEBvgGCAbwBhQG6AYcBtwGKAbUBiwG0AY0B"
8440 "sQGQAa8BkgGtAZMBqwGWAakBmAGmAZoBpQGcAaMBngGgAaEBngGiAZ0BpAGaAacBmAGpAZUBqwGU"
8441 "Aa0BkgGvAY8BsQGOAbMBjAG1AYkBuAGHAbkBhQG8AYMBvgGBAcABfsIBfcQBe8YBeMgBd8oBdM0B"
8442 "cs8BcNABbtMBbNUBatcBZ9kBZtsBY94BYd8BYOEBXeQBW+YBWOgBV+oBVewBUu8BUPABT/IBTPUB"
8443 "SvYBSPkBRvsBRP0BQf8BQIECPoMCO4YCOYcCN4oCNYwCM40CMZACL5ICLZQCKpYCKZgCJpsCJJ0C"
8444 "Ip4CIKECHqMCHKQCGqcCGKkCFawCE60CEq8CD7ICDbMCDLUCCbgCB7oCBLwCA74CAbF5");
8445 ok(
match,
"Figure does not match.\n");
8447 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
8448 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8449 hr = ID2D1PathGeometry_Open(geometry, &
sink);
8450 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8548 hr = ID2D1GeometrySink_Close(
sink);
8549 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8550 ID2D1GeometrySink_Release(
sink);
8552 ID2D1RenderTarget_BeginDraw(
rt);
8553 ID2D1RenderTarget_Clear(
rt, &
color);
8556 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8557 ID2D1PathGeometry_Release(geometry);
8560 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8561 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8562 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8563 ok(
match,
"Figure does not match.\n");
8565 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8566 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8567 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8569 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8570 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8571 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8572 ok(
match,
"Figure does not match.\n");
8574 "qDJQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8575 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ"
8576 "UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFCoMgAA");
8577 ok(
match,
"Figure does not match.\n");
8580 "qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
8581 "WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
8582 "RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
8583 "OAtRB0IHUAJMAqgy");
8584 ok(
match,
"Figure does not match.\n");
8586 "qDIBSwRQAkMKUQQ5EVIIKxtTDRkmVExUTFRMVEtVS1VLVkpWSlZKVklXSVdJV0lXSVhIWEhYSFhI"
8587 "WEhYSFhIWEhYSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZSFhIWUdZR1lHWUdZR1lHWUdZR1lHWUdZ"
8588 "SFhIWEhYSFhIWEhYSFhIWEhYSFhJV0lXSVdJV0lWSlZKVkpWS1VLVUtUTFRMVExUJhkNUxsrCFIR"
8589 "OQRRCkMCUARLAagy");
8590 ok(
match,
"Figure does not match.\n");
8592 "qDIESwFRCkMCUhE5BFIbKwhTJhkNVExUTFRMVUtVS1VLVUpWSlZKV0lXSVdJV0lXSVdIWEhYSFhI"
8593 "WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdY"
8594 "SFhIWEhYSFhIWEhYSFhIWEhYSFdJV0lXSVdJV0lXSlZKVkpVS1VLVUtVTFRMVExUDRkmUwgrG1IE"
8595 "ORFSAkMKUQFLBKgy");
8596 ok(
match,
"Figure does not match.\n");
8598 "qDICTAJQB0IHUQs4C1IRLBFSGxgbUk5STlNMVExUTFRMVExVSlZKVkpWSlZKVkpXSFhIWEhYSFhI"
8599 "WEhYSFhIWEhYSFlGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZa"
8600 "RllIWEhYSFhIWEhYSFhIWEhYSFhIV0pWSlZKVkpWSlZKVUxUTFRMVExUTFNOUk5SGxgbUhEsEVIL"
8601 "OAtRB0IHUAJMAqgy");
8602 ok(
match,
"Figure does not match.\n");
8605 "pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
8606 "SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
8607 "WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
8608 "UkxZQmM4bix+GKQs");
8609 ok(
match,
"Figure does not match.\n");
8611 "liwZgQErcTllQ1xLVFBQUU9STlJNVExUTFRMVExVS1VLVUpWSlZKVkpXSVdJV0lXSVdIWEhYSFhI"
8612 "WEhYSFhIWEhYSFhIWEdZR1lHWUdZR1lHWUdZR1lHWUdZR1hIWEdZR1lHWUdZR1lHWUdZR1lHWUdZ"
8613 "R1hIWEhYSFhIWEhYSFhIWEhYSFhIV0lXSVdJV0lXSlZKVkpWSlVLVUtVTFRMVExUTFRNUk5ST1FQ"
8614 "UFRLXENlOXErgQEZliwA");
8615 ok(
match,
"Figure does not match.\n");
8617 "sSwZeytrOV9DVktRUE9RTlJOUk1UTFRMVExUS1VLVUtVS1ZKVkpWSVdJV0lXSVdJV0lYSFhIWEhY"
8618 "SFhIWEhYSFhIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lIWEhYSFlHWUdZR1lHWUdZR1lHWUdZR1lI"
8619 "WEhYSFhIWEhYSFhIWEhYSFhIWElXSVdJV0lXSVdJVkpWSlZLVUtVS1VLVExUTFRMVE1STlJOUU9Q"
8620 "UUtWQ185ayt7GbEs");
8621 ok(
match,
"Figure does not match.\n");
8623 "pCwYfixuOGNCWUxSUFBQT1JOUk5STlJOUk1UTFRMVExUTFRLVkpWSlZKVkpWSlZJWEhYSFhIWEhY"
8624 "SFhIWEhYSFhIWEdaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpGWkZaRlpG"
8625 "WkdYSFhIWEhYSFhIWEhYSFhIWEhYSVZKVkpWSlZKVkpWS1RMVExUTFRMVE1STlJOUk5STlJPUFBQ"
8626 "UkxZQmM4bix+GKQs");
8627 ok(
match,
"Figure does not match.\n");
8629 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
8630 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8631 hr = ID2D1PathGeometry_Open(geometry, &
sink);
8632 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8650 hr = ID2D1GeometrySink_Close(
sink);
8651 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8652 ID2D1GeometrySink_Release(
sink);
8657 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8659 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8665 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8667 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8668 ID2D1PathGeometry_Release(geometry);
8673 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8675 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8681 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8683 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8685 ID2D1RenderTarget_BeginDraw(
rt);
8686 ID2D1RenderTarget_Clear(
rt, &
color);
8692 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8693 ID2D1TransformedGeometry_Release(transformed_geometry[3]);
8694 ID2D1TransformedGeometry_Release(transformed_geometry[2]);
8695 ID2D1TransformedGeometry_Release(transformed_geometry[1]);
8696 ID2D1TransformedGeometry_Release(transformed_geometry[0]);
8699 "6DMNjgEWiAEahgEahgEahgEahgEahgEahgEahgEahgEahgEahgEahwEZhwEZhwEZhwEZhwEZhwEZ"
8700 "hwEZhwEZhwEZiAEYiAEYiAEYiAEYiAEXiQEXiQEXiQEXigEWigEWigEWigEWigEWigEWigEWiwEU"
8701 "jAEUjAEUjAEUjQESjgESjwEQkAEQkQEOkgENlAEMlQEKlgEKlwEImAEImQEHmQEGmwEFmwEEnQED"
8702 "nQECngECngECnwEBnwEBnwEBnwEBnwEBnwECnQEDnQEDnQEEmwEFmgEHmQEHlwELkQERjAEXhgEd"
8703 "hAEfgwEchgEXjwEMqTEA");
8704 ok(
match,
"Figure does not match.\n");
8706 "h58BBrYCDq0CF6QCIJwCKJMCMIwCNoUCPf8BQ/kBSPQBTu4BTe8BTPEBSfUBRvgBQf0BPYECOYUC"
8707 "NIoCMI4CK+UBAS0W/AEHIwiPAgsaBZcCEAwIngIepAIaqAIWrAITsAIRsgIPtQIMtwILugIHwAIB"
8709 ok(
match,
"Figure does not match.\n");
8711 "wW4DnAEEmwEFmgEHmAEIlwEKlQELlAEMkwEOkQEPkAEQkAERjgESjgETjAEUjAEUiwEWigEWiQEX"
8712 "iQEYhwEZhwEZhgEbhQEbhAEchAEdggEeggEeggEfgAEggAEggAEhgAEggAEggQEggAEggAEggQEg"
8713 "gAEggQEfgQEfggEfgQEfgQEfggEfgQEfggEeggEfggEeggEegwEdgwEeggEegwEdgwEegwEdgwEd"
8714 "hAEchAEdhAEchAEchAEdhAEchAEchQEbhQEbhgEahgEahwEZhwEZiAEYiAEYiQEYiAEYiQEXiQEX"
8715 "igEWigEWiwEViwEViwEVjAEUjAEUjQETjQETjgESjgETjgESjwERkAEQkQEPkwENlAEMlQELlgEK"
8716 "lwEKlwEJmAEImQEHmgEGmwEFnAEEnQEEnQEDnQEDngECngEDngECngECnwECngECnwECngECngED"
8717 "ngECEgGLAQMQAosBAw4EjAEDCwaMAQQJBo0BBQYIjQEHAgqNARKOARKPARCQARCQARCQAQ+RAQ6S"
8718 "AQ6SAQ2TAQ2SAQ2TAQ2TAQyTAQyUAQyUAQuUAQuVAQuUAQuVAQqWAQmWAQqWAQmXAQiXAQiYAQeY"
8719 "AQeZAQWbAQSDZwAA");
8720 ok(
match,
"Figure does not match.\n");
8722 "g90BBLkCCLYCC7ICDrACEa0CFKoCF6cCGqQCHKMCHqECIJ8CIpwCJJsCJpkCKJcCKZYCK5QCLZIC"
8723 "L5ACMI8CMo0CNIsCNYoCN4gCOYcCOYYCO4QCPYICPoECQIACQYACQIECQIACQIECQIECQIECP4IC"
8724 "P4ICP4ECP4ICP4ICPoMCPoMCPoMCPYQCPYMCPYQCPYQCPYQCPIUCPIUCPIUCO4YCO4YCOoYCO4YC"
8725 "OocCOocCOocCOYgCOYgCOIkCOIkCN4oCNosCNYwCNI0CM44CMo4CM44CMo8CMZACMJECL5ICLpMC"
8726 "LZQCLJUCK5YCK5YCKpcCKZgCKJkCJ5oCJpsCJpsCJZwCJJ4CIqACIKICH6MCHaUCG6cCGakCF6wC"
8727 "Fa0CE68CEbECD7MCDrQCDLYCCrgCCbkCB7sCBrsCBbwCBbwCBL0CBL0CBL0CBL0CA70CBL0CBL0C"
8728 "BLwCBSUBlgIFIQSXAgYbCJcCBxcKmQIIEQ6ZAgoMEJoCDQUTnAIknAIjnQIingIhnwIgoAIfoQIe"
8729 "ogIdowIcpAIbpQIapQIZpgIZpgIZpwIYpwIXqAIXqAIXqQIVqgIVqgIUqwITrQISrQIRrgIQsAIO"
8730 "sQIMswILtQIIhs4B");
8731 ok(
match,
"Figure does not match.\n");
8733 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
8734 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8735 hr = ID2D1PathGeometry_Open(geometry, &
sink);
8736 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8754 hr = ID2D1GeometrySink_Close(
sink);
8755 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8756 ID2D1GeometrySink_Release(
sink);
8761 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8763 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8769 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8771 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8772 ID2D1PathGeometry_Release(geometry);
8777 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8779 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8785 hr = ID2D1Factory_CreateTransformedGeometry(
factory,
8787 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8789 ID2D1RenderTarget_BeginDraw(
rt);
8790 ID2D1RenderTarget_Clear(
rt, &
color);
8796 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8797 ID2D1TransformedGeometry_Release(transformed_geometry[3]);
8798 ID2D1TransformedGeometry_Release(transformed_geometry[2]);
8799 ID2D1TransformedGeometry_Release(transformed_geometry[1]);
8800 ID2D1TransformedGeometry_Release(transformed_geometry[0]);
8803 ok(
match,
"Figure does not match.\n");
8805 ok(
match,
"Figure does not match.\n");
8807 ok(
match,
"Figure does not match.\n");
8809 ok(
match,
"Figure does not match.\n");
8811 ID2D1SolidColorBrush_Release(brush);
8835 &IID_IWICImagingFactory, (
void **)&wic_factory);
8836 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8837 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
8839 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8840 IWICImagingFactory_Release(wic_factory);
8845 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
8851 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
ctx.factory, wic_bitmap, &
desc, &
rt);
8852 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8854 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
8855 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8857 ID2D1RenderTarget_BeginDraw(
rt);
8858 dc = (
void *)0xdeadbeef;
8861 ok(!
dc,
"Got unexpected DC %p.\n",
dc);
8862 ID2D1GdiInteropRenderTarget_Release(interop);
8864 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8866 ID2D1RenderTarget_Release(
rt);
8871 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
ctx.factory, wic_bitmap, &
desc, &
rt);
8872 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8874 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1GdiInteropRenderTarget, (
void **)&interop);
8875 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8877 ID2D1RenderTarget_BeginDraw(
rt);
8880 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8881 ok(
dc !=
NULL,
"Expected NULL dc, got %p.\n",
dc);
8882 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
8883 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8885 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8887 ID2D1RenderTarget_BeginDraw(
rt);
8889 ID2D1RenderTarget_Clear(
rt, &
color);
8891 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8894 ok(
match,
"Bitmap does not match.\n");
8897 ID2D1RenderTarget_BeginDraw(
rt);
8900 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8904 hr = ID2D1GdiInteropRenderTarget_ReleaseDC(interop,
NULL);
8905 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8908 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8911 ok(
match,
"Bitmap does not match.\n");
8915 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8916 IWICBitmapLock_Release(wic_lock);
8918 ID2D1RenderTarget_BeginDraw(
rt);
8922 IWICBitmapLock_Release(wic_lock);
8924 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8928 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8929 ID2D1RenderTarget_BeginDraw(
rt);
8932 IWICBitmapLock_Release(wic_lock);
8934 ID2D1GdiInteropRenderTarget_Release(interop);
8935 ID2D1RenderTarget_Release(
rt);
8937 IWICBitmap_Release(wic_bitmap);
8958 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
8962 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8963 ID2D1Layer_GetFactory(
layer, &layer_factory);
8964 ok(layer_factory ==
factory,
"Got unexpected layer factory %p, expected %p.\n", layer_factory,
factory);
8965 ID2D1Factory_Release(layer_factory);
8967 ok(
size.width == 0.0f,
"Got unexpected width %.8e.\n",
size.width);
8968 ok(
size.height == 0.0f,
"Got unexpected height %.8e.\n",
size.height);
8969 ID2D1Layer_Release(
layer);
8973 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
8975 ok(
size.width == 800.0f,
"Got unexpected width %.8e.\n",
size.width);
8976 ok(
size.height == 600.0f,
"Got unexpected height %.8e.\n",
size.height);
8977 ID2D1Layer_Release(
layer);
9001 ID2D1RenderTarget_SetDpi(
rt, 192.0f, 48.0f);
9004 hr = ID2D1RenderTarget_CreateSolidColorBrush(
rt, &
color,
NULL, &brush);
9005 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9007 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
9008 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9009 hr = ID2D1PathGeometry_Open(geometry, &
sink);
9010 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9014 cubic_to(
sink, 119.0f, 720.0f, 83.0f, 600.0f, 80.0f, 474.0f);
9015 cubic_to(
sink, 78.0f, 349.0f, 108.0f, 245.0f, 135.0f, 240.0f);
9016 cubic_to(
sink, 163.0f, 235.0f, 180.0f, 318.0f, 176.0f, 370.0f);
9017 cubic_to(
sink, 171.0f, 422.0f, 149.0f, 422.0f, 144.0f, 370.0f);
9018 cubic_to(
sink, 140.0f, 318.0f, 157.0f, 235.0f, 185.0f, 240.0f);
9019 cubic_to(
sink, 212.0f, 245.0f, 242.0f, 349.0f, 240.0f, 474.0f);
9020 cubic_to(
sink, 238.0f, 600.0f, 201.0f, 720.0f, 160.0f, 720.0f);
9030 hr = ID2D1GeometrySink_Close(
sink);
9031 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9032 ID2D1GeometrySink_Release(
sink);
9034 ID2D1RenderTarget_BeginDraw(
rt);
9036 ID2D1RenderTarget_Clear(
rt, &
color);
9039 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9040 ID2D1PathGeometry_Release(geometry);
9043 "aRQjIxRpYiIcHCJiXSwXFyxdWTQTEzRZVTsQEDtVUkIMDEJST0cKCkdPTUsICEtNSlEFBVFKSFUD"
9044 "A1VIRlkBAVlGRFsBAVtEQlwCAlxCQFwEBFxAPl0FBV0+PF0HB108Ol4ICF46OV0KCl05N14LC143"
9045 "Nl4MDF42NF8NDV80M14PD14zMV8QEF8xMF8REV8wL18SEl8vLWATE2AtLGAUFGAsK2EUFGErKWIV"
9046 "FWIpKGIWFmIoJ2IXF2InJmIYGGImJWMYGGMlJGMZGWMkI2MaGmMjImQaGmQiIWQbG2QhIGQcHGQg"
9047 "H2UcHGUfHmUdHWUeHWYdHWYdHGcdHWccG2ceHmcbGmgeHmgaGWgfH2gZGWgfH2gZGGkfH2kYF2kg"
9048 "IGkXFmogIGoWFmogIGoWFWsgIGsVFGshIWsUE2whIWwTE2whIWwTEm0hIW0SEW4hIW4REW4hIW4R"
9049 "EG8hIW8QD3AhIXAPD3AhIXAPDnEhIXEODnEhIXEODXIhIXINDHQgIHQMDHQgIHQMC3UgIHULC3Yf"
9050 "H3YLCncfH3cKCngeHngKCXkeHnkJCXodHXoJCXscHHsJCHwcHHwICH0bG30IB38aGn8HB4ABGRmA"
9051 "AQcHgQEYGIEBBwaEARYWhAEGBoUBFRWFAQYFiAETE4gBBQWKARERigEFBYwBDw+MAQUEkAEMDJAB"
9052 "BASTAQkJkwEEBJwBnAEEA50BnQEDA50BnQEDA50BnQEDA50BnQEDAp4BngECAp4BngECAp4BngEC"
9053 "Ap4BngECAp4BngECAZ8BnwEBAZ8BnwEBAZ8BnwEBAZ8BnwEBAZ8BnwEBAZ8BnwEBAZ8BnwGhAaAB"
9054 "oAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGg"
9055 "AaABoAGgAaABoAGgAaABoAGhAZ8BoQGfAZ8BAQGfAZ8BAQGfAZ8BAQGfAZ8BAQGfAZ8BAQKeAZ8B"
9056 "AQKeAZ4BAgKeAZ4BAgKeAZ4BAgOdAZ4BAgOdAZ4BAgOdAZ0BAwScAZ0BAwScAZ0BAwScAZ0BAwSc"
9057 "AZwBBAWbAZwBBAWbAZwBBAWbAZsBBQaaAZsBBQaaAZoBBgeZAZoBBgeZAZoBBgeZAZkBBwiYAZkB"
9058 "BwiYAZgBCAmXAZgBCAmXAZgBCAmXAZcBCQqWAZcBCQqWAZYBCguVAZYBCguVAZUBCwyUAZUBCw2T"
9059 "AZQBDA2TAZQBDA6SAZMBDQ6SAZMBDQ+RAZIBDg+RAZIBDhCQAZEBDxCQAZABEBGPAZABEBKOAY8B"
9060 "ERONAY4BEhONAY4BEhSMAY0BExWLAYwBFBWLAYwBFBaKAYsBFReJAYoBFheJAYoBFhiIAYkBFxmH"
9061 "AYgBGBqGAYcBGRuFAYYBGhuFAYUBGxyEAYUBGx2DAYQBHB6CAYMBHR+BAYIBHiCAAYEBHyF/gAEg"
9062 "In5/ISJ+fiIjfX0jJHx8JCV7eyUmenomJ3l5Jyh4eCgpd3cpK3V2Kix0dSstc3QsLnJzLS9xci4w"
9063 "cHAwMm5vMTNtbjI0bG0zNWtrNTdpajY4aGk3OmZnOTtlZjo8ZGQ8PmJjPT9hYj5BX2BAQl5eQkRc"
9064 "XUNGWltFR1lZR0lXWEhLVVZKTVNUTE9RUk5RT1BQUk5OUlRMTFRWSkpWWUdIWFtFRVteQkNdYEBA"
9065 "YGI+PmJlOztlaDg4aGs1NWtuMjJuci4vcXUrK3V6JiZ6fiIifoMBHR2DAYsBFRWLAZUBCwuVAQAA");
9066 ok(
match,
"Figure does not match.\n");
9068 hr = ID2D1Factory_CreatePathGeometry(
factory, &geometry);
9069 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9070 hr = ID2D1PathGeometry_Open(geometry, &
sink);
9071 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9075 cubic_to(
sink, 152.0f, 720.0f, 80.0f, 613.0f, 80.0f, 480.0f);
9076 cubic_to(
sink, 80.0f, 347.0f, 152.0f, 240.0f, 240.0f, 240.0f);
9077 cubic_to(
sink, 152.0f, 339.0f, 134.0f, 528.0f, 200.0f, 660.0f);
9078 cubic_to(
sink, 212.0f, 683.0f, 225.0f, 703.0f, 240.0f, 720.0f);
9081 hr = ID2D1GeometrySink_Close(
sink);
9082 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9083 ID2D1GeometrySink_Release(
sink);
9085 ID2D1RenderTarget_BeginDraw(
rt);
9086 ID2D1RenderTarget_Clear(
rt, &
color);
9089 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9090 ID2D1PathGeometry_Release(geometry);
9093 "pQIZkgIrhAI5/QE/9gFH7wFO6wFS5wFW4gFb3gFf2wFi2AFl1gFn1AFp0gFszwFuzQFxywFyyQF1"
9094 "xwF2xgF4xAF5xAF6wgF8wAF+vwF+vwF/vQGBAbwBggG7AYMBugGEAbkBhQG4AYYBtwGHAbcBiAG1"
9095 "AYkBtAGKAbQBigGzAYsBswGMAbEBjQGxAY0BsQGOAa8BjwGvAZABrgGQAa4BkQGtAZEBrQGSAawB"
9096 "kgGsAZMBqwGTAasBlAGrAZQBqgGVAakBlQGqAZUBqQGWAagBlwGoAZYBqAGXAagBlwGnAZgBpwGY"
9097 "AaYBmQGmAZkBpgGZAaUBmgGlAZoBpQGaAaUBmgGkAZsBpAGbAaQBmwGkAZsBpAGcAaMBnAGjAZwB"
9098 "owGcAaMBnAGjAZ0BogGdAaIBnQGiAZ4BoQGeAaEBngGiAZ4BoQGeAaEBnwGgAZ8BoQGeAaEBnwGh"
9099 "AZ4BoQGfAaABnwGhAZ8BoAGgAaABnwGgAaABoAGfAaABoAGgAaABnwGgAaABoAGgAaABnwGgAaAB"
9100 "oAGgAaABnwGhAZ8BoQGfAaABoAGgAaABoAGfAaEBnwGhAZ8BoQGfAaEBnwGhAZ8BoQGfAaABoAGg"
9101 "AaABoAGgAaEBnwGhAZ8BoQGfAaEBnwGhAaABoAGgAaABoAGgAaABoAGgAaEBoAGgAaABoAGgAaAB"
9102 "oQGgAaABoAGgAaABoQGfAaEBoAGhAZ8BoQGfAaIBnwGhAZ8BogGfAaEBnwGiAZ8BogGeAaIBnwGi"
9103 "AZ4BogGfAaIBngGjAZ4BowGdAaMBngGjAZ4BowGdAaQBnQGkAZ0BpAGcAaUBnAGlAZwBpQGcAaUB"
9104 "mwGmAZsBpgGbAaYBmwGmAZsBpgGbAacBmgGnAZkBqAGZAagBmQGpAZgBqQGZAagBmQGpAZgBqQGY"
9105 "AaoBlwGqAZcBqwGWAasBlgGsAZUBrQGVAawBlQGtAZQBrgGUAa0BlAGuAZMBrwGTAa8BkgGwAZEB"
9106 "sQGRAbEBkAGyAZABsgGPAbMBjwG0AY4BtAGNAbUBjQG2AYwBtgGLAbgBigG4AYoBuQGJAboBhwG7"
9107 "AYcBvAGGAb0BhQG+AYQBvwGDAcABggHBAYIBwgGAAcMBf8QBfsYBfMgBe8gBesoBeMwBd80BddAB"
9108 "c9EBcdQBb9YBbNkBatsBaN0BZeEBYuQBX+gBW+0BVvEBUvUBTvwBR4QCQIoCOZgCK6oCGQIA");
9109 ok(
match,
"Figure does not match.\n");
9111 ID2D1SolidColorBrush_Release(brush);
9128 win_skip(
"ID2D1Factory1 is not supported.\n");
9133 hr = ID2D1Factory1_CreateDevice(
ctx.factory1,
ctx.device, &
device);
9134 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9139 ID2D1Device_Release(
device);
9141 if (pD2D1CreateDevice)
9144 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9145 ID2D1Device_Release(
device);
9148 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9149 ID2D1Device_Release(
device);
9152 win_skip(
"D2D1CreateDevice() is unavailable.\n");
9157#define check_rt_bitmap_surface(r, s, o) check_rt_bitmap_surface_(__LINE__, r, s, o)
9180 bitmap_desc.
dpiX = 96.0f;
9181 bitmap_desc.
dpiY = 96.0f;
9183 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap, hr %#lx.\n",
hr);
9187 ID2D1Bitmap_Release(
bitmap);
9192 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap, hr %#lx.\n",
hr);
9194 ID2D1Bitmap_Release(
bitmap);
9198 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap, hr %#lx.\n",
hr);
9200 ID2D1Bitmap_Release(
bitmap);
9204 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap, hr %#lx.\n",
hr);
9206 ID2D1Bitmap_Release(
bitmap);
9212 &IID_IWICImagingFactory, (
void **)&wic_factory);
9213 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create WIC imaging factory, hr %#lx.\n",
hr);
9215 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
9217 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create WIC bitmap, hr %#lx.\n",
hr);
9218 IWICImagingFactory_Release(wic_factory);
9221 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap from WIC source, hr %#lx.\n",
hr);
9225 ID2D1Bitmap_Release(
bitmap);
9230 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&
context);
9231 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get device context, hr %#lx.\n",
hr);
9234 ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DCRenderTarget, (
void **)&dc_rt);
9241 ID2D1Image_Release(
target);
9248 rt_format = ID2D1RenderTarget_GetPixelFormat(
rt);
9249 bitmap_format = ID2D1Bitmap_GetPixelFormat(
bitmap);
9250 ok_(__FILE__,
line)(!
memcmp(&rt_format, &bitmap_format,
sizeof(rt_format)),
"Unexpected bitmap format.\n");
9252 ID2D1Bitmap_Release(
bitmap);
9265 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create compatible render target, hr %#lx.\n",
hr);
9267 hr = ID2D1BitmapRenderTarget_QueryInterface(compatible_rt, &IID_ID2D1DeviceContext, (
void **)&context2);
9268 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get device context, hr %#lx.\n",
hr);
9270 ID2D1DeviceContext_GetDevice(context2, &device2);
9271 ok_(__FILE__,
line)(
device == device2,
"Unexpected device.\n");
9273 ID2D1Device_Release(
device);
9274 ID2D1Device_Release(device2);
9276 hr = ID2D1BitmapRenderTarget_CreateBitmap(compatible_rt,
size,
9278 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to create bitmap, hr %#lx.\n",
hr);
9280 ID2D1Bitmap_Release(
bitmap);
9282 hr = ID2D1BitmapRenderTarget_GetBitmap(compatible_rt, &
bitmap);
9283 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get compatible target bitmap, hr %#lx.\n",
hr);
9291 ID2D1Bitmap_Release(
bitmap);
9293 ID2D1BitmapRenderTarget_Release(compatible_rt);
9294 ID2D1DeviceContext_Release(context2);
9303 ID2D1DeviceContext_Release(
context);
9305 ID2D1Image_Release(
target);
9307 ID2D1DCRenderTarget_Release(dc_rt);
9312 static const struct bitmap_format_test
9318 bitmap_format_tests[] =
9361 win_skip(
"ID2D1Factory1 is not supported.\n");
9367 hr = ID2D1RenderTarget_QueryInterface(
ctx.rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9368 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9372 ok(!!
bitmap,
"Unexpected target.\n");
9374 ID2D1Bitmap1_Release(
bitmap);
9378 ID2D1DeviceContext_Release(device_context);
9381 hr = ID2D1Factory1_CreateDevice(
ctx.factory1,
ctx.device, &
device);
9382 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9385 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9389 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
9390 bitmap_desc.
pixelFormat = bitmap_format_tests[
i].original;
9393 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context,
ctx.surface, &bitmap_desc, &
bitmap);
9395 ok(
hr == bitmap_format_tests[
i].
hr,
"%u: Got unexpected hr %#lx.\n",
i,
hr);
9401 ok(
pixel_format.format == bitmap_format_tests[
i].result.format,
"%u: unexpected pixel format %#x.\n",
9403 ok(
pixel_format.alphaMode == bitmap_format_tests[
i].result.alphaMode,
"%u: unexpected alpha mode %d.\n",
9408 ID2D1Bitmap1_Release(
bitmap);
9414 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface2,
NULL, &
bitmap);
9416 "Got unexpected hr %#lx.\n",
hr);
9422 "Unexpected alpha mode %#x.\n",
pixel_format.alphaMode);
9424 ID2D1Bitmap1_Release(
bitmap);
9427 IDXGISurface_Release(surface2);
9429 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context,
ctx.surface,
NULL, &
bitmap);
9430 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9434 "Unexpected alpha mode %#x.\n",
pixel_format.alphaMode);
9440 ID2D1DeviceContext_GetTarget(device_context, &
target);
9442 ID2D1Image_Release(
target);
9446 ID2D1Bitmap1_Release(
bitmap);
9449 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
9450 bitmap_desc.
pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
9452 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
9453 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9455 ID2D1DeviceContext_SetTags(device_context, 1, 2);
9457 ID2D1DeviceContext_BeginDraw(device_context);
9459 hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
9463 ID2D1Bitmap1_Release(
bitmap);
9466 ok(!!
bitmap,
"Expected target bitmap.\n");
9467 ID2D1Bitmap1_Release(
bitmap);
9470 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
9471 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9473 ID2D1DeviceContext_SetTarget(device_context,
NULL);
9474 ID2D1DeviceContext_SetTags(device_context, 3, 4);
9476 ID2D1DeviceContext_BeginDraw(device_context);
9478 hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
9479 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9482 ID2D1Bitmap1_Release(
bitmap);
9484 ID2D1DeviceContext_Release(device_context);
9486 ID2D1Device_Release(
device);
9492 rt_desc.
dpiX = 96.0f;
9493 rt_desc.
dpiY = 96.0f;
9497 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9499 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9500 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9503 ok(!
bitmap,
"Unexpected target.\n");
9505 ID2D1DeviceContext_Release(device_context);
9506 ID2D1RenderTarget_Release(
rt);
9513 hwnd_rt_desc.
hwnd =
CreateWindowA(
"static",
"d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
9514 ok(!!hwnd_rt_desc.
hwnd,
"Failed to create target window.\n");
9517 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9520 ID2D1RenderTarget_Release(
rt);
9527 &IID_IWICImagingFactory, (
void **)&wic_factory);
9528 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9529 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
9531 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9532 IWICImagingFactory_Release(wic_factory);
9534 hr = ID2D1Factory1_CreateWicBitmapRenderTarget(
ctx.factory1, wic_bitmap, &rt_desc, &
rt);
9535 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9536 IWICBitmap_Release(wic_bitmap);
9539 ID2D1RenderTarget_Release(
rt);
9572 win_skip(
"ID2D1Factory1 is not supported.\n");
9577 hr = ID2D1Factory1_CreateDevice(
ctx.factory1,
ctx.device, &
device);
9578 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9581 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9583 ID2D1DeviceContext_GetDevice(device_context, &device2);
9584 ok(device2 ==
device,
"Unexpected device instance.\n");
9585 ID2D1Device_Release(device2);
9587 target = (
void *)0xdeadbeef;
9588 ID2D1DeviceContext_GetTarget(device_context, &
target);
9591 unit_mode = ID2D1DeviceContext_GetUnitMode(device_context);
9594 ID2D1DeviceContext_Release(device_context);
9601 hr = ID2D1Factory2_CreateDevice(
ctx.factory2,
ctx.device, &device1);
9602 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9605 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9607 ID2D1DeviceContext1_Release(device_context1);
9608 ID2D1Device1_Release(device1);
9613 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9614 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9618 "Unexpected bitmap options %#x.\n",
options);
9619 hr = ID2D1Bitmap1_GetSurface(
bitmap, &surface2);
9620 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9621 ok(surface2 ==
ctx.surface,
"Unexpected surface instance.\n");
9622 IDXGISurface_Release(surface2);
9624 ID2D1DeviceContext_BeginDraw(device_context);
9625 hr = ID2D1Bitmap1_GetSurface(
bitmap, &surface2);
9626 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9627 ok(surface2 ==
ctx.surface,
"Unexpected surface instance.\n");
9628 IDXGISurface_Release(surface2);
9629 ID2D1DeviceContext_EndDraw(device_context,
NULL,
NULL);
9630 ID2D1Bitmap1_Release(
bitmap);
9632 ID2D1DeviceContext_SetTarget(device_context,
NULL);
9636 ID2D1DeviceContext_Release(device_context);
9642 &IID_IWICImagingFactory, (
void **)&wic_factory);
9643 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9644 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
9646 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9647 IWICImagingFactory_Release(wic_factory);
9652 rt_desc.
dpiX = 96.0f;
9653 rt_desc.
dpiY = 96.0f;
9656 hr = ID2D1Factory1_CreateWicBitmapRenderTarget(
ctx.factory1, wic_bitmap, &rt_desc, &
rt);
9657 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9659 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9660 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9664 "Unexpected bitmap options %#x.\n",
options);
9667 ID2D1Bitmap1_Release(
bitmap);
9669 ID2D1DeviceContext_SetTarget(device_context,
NULL);
9673 ID2D1DeviceContext_Release(device_context);
9674 ID2D1RenderTarget_Release(
rt);
9683 hwnd_rt_desc.
hwnd =
CreateWindowA(
"static",
"d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
9684 ok(!!hwnd_rt_desc.
hwnd,
"Failed to create target window.\n");
9687 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9689 hr = ID2D1RenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9690 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9694 "Unexpected bitmap options %#x.\n",
options);
9697 ID2D1Bitmap1_Release(
bitmap);
9699 ID2D1DeviceContext_SetTarget(device_context,
NULL);
9703 ID2D1DeviceContext_Release(device_context);
9704 ID2D1RenderTarget_Release(
rt);
9708 hr = ID2D1Factory1_CreateDCRenderTarget(
ctx.factory1, &rt_desc, &dc_rt);
9709 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9711 hr = ID2D1DCRenderTarget_QueryInterface(dc_rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
9712 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9717 ok(
hdc !=
NULL,
"Failed to create an HDC.\n");
9722 hr = ID2D1DCRenderTarget_BindDC(dc_rt,
hdc, &
rect);
9723 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9728 "Unexpected bitmap options %#x.\n",
options);
9731 ID2D1Bitmap1_Release(
bitmap);
9733 ID2D1DeviceContext_SetTarget(device_context,
NULL);
9737 ID2D1DeviceContext_Release(device_context);
9738 ID2D1DCRenderTarget_Release(dc_rt);
9741 ID2D1Device_Release(
device);
9755 { {{{ 0 }}}, {{{ 0 }}},
FALSE },
9816 m = invert_tests[
i].matrix;
9818 ok(
ret == invert_tests[
i].invertible,
"%u: unexpected return value %d.\n",
i,
ret);
9819 ok(!
memcmp(&
m, &invert_tests[
i].inverse,
sizeof(
m)),
9820 "%u: unexpected matrix value {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
i,
9821 m._11,
m._12,
m._21,
m._22,
m._31,
m._32);
9824 ok(
ret == invert_tests[
i].invertible,
"%u: unexpected return value %d.\n",
i,
ret);
9839 { 0.0f, 0.0f, { 0.0f, 0.0f }, {{{ 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }}} },
9840 { 45.0f, 0.0f, { 0.0f, 0.0f }, {{{ 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f }}} },
9841 { 0.0f, 0.0f, { 10.0f, -3.0f }, {{{ 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }}} },
9842 { -45.0f, 45.0f, { 0.1f, 0.5f }, {{{ 1.0f, 1.0f, -1.0f, 1.0f, 0.5f, -0.1f }}} },
9843 { -45.0f, 45.0f, { 1.0f, 2.0f }, {{{ 1.0f, 1.0f, -1.0f, 1.0f, 2.0f, -1.0f }}} },
9844 { 45.0f, -45.0f, { 1.0f, 2.0f }, {{{ 1.0f, -1.0f, 1.0f, 1.0f, -2.0f, 1.0f }}} },
9845 { 30.0f, -60.0f, { 12.0f, -5.0f }, {{{ 1.0f, -1.7320509f, 0.577350259f, 1.0f, 2.88675117f, 20.7846107f }}} },
9860 ok(
ret,
"%u: unexpected matrix value {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}, expected "
9861 "{%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
i,
m._11,
m._12,
m._21,
m._22,
m._31,
m._32,
9873 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9876 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9877 ID2D1Device_Release(
device);
9879 return device_context;
9886 0xffff0000, 0xffffff00, 0xff00ff00, 0xff00ffff,
9890 {0.0f, {1.0f, 0.0f, 0.0f, 1.0f}},
9891 {0.5f, {0.0f, 1.0f, 0.0f, 1.0f}},
9892 {1.0f, {0.0f, 0.0f, 1.0f, 1.0f}},
9921 win_skip(
"Command lists are not supported.\n");
9926 device_context =
ctx.context;
9928 hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
9929 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9931 ID2D1DeviceContext_SetTarget(device_context, (
ID2D1Image *)command_list);
9933 size = ID2D1DeviceContext_GetPixelSize(device_context);
9934 ok(!
size.width,
"Got unexpected width %u.\n",
size.width);
9935 ok(!
size.height,
"Got unexpected height %u.\n",
size.height);
9937 format = ID2D1DeviceContext_GetPixelFormat(device_context);
9939 "Unexpected format %u, alpha mode %u.\n",
format.format,
format.alphaMode);
9941 ID2D1DeviceContext_BeginDraw(device_context);
9943 hr = ID2D1DeviceContext_QueryInterface(device_context, &IID_ID2D1RenderTarget, (
void **)&
rt);
9944 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9952 bitmap_desc.
dpiX = 96.0f;
9953 bitmap_desc.
dpiY = 96.0f;
9955 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9959 refcount = ID2D1Bitmap_Release(
bitmap);
9960 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
9965 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9968 ID2D1RenderTarget_FillRectangle(
rt, &
rect, brush);
9970 refcount = ID2D1Brush_Release(brush);
9971 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
9975 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9978 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9981 ID2D1RenderTarget_FillRectangle(
rt, &
rect, brush);
9983 refcount = ID2D1Brush_Release(brush);
9984 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
9986 refcount = ID2D1Bitmap_Release(
bitmap);
9987 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
9990 hr = ID2D1RenderTarget_CreateGradientStopCollection(
rt, stops,
ARRAY_SIZE(stops),
9992 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
9996 hr = ID2D1RenderTarget_CreateLinearGradientBrush(
rt, &linear_gradient_properties,
NULL, gradient,
9998 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10002 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10004 ID2D1RenderTarget_FillGeometry(
rt, geometry, brush,
NULL);
10006 refcount = ID2D1Brush_Release(brush);
10007 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
10009 refcount = ID2D1Geometry_Release(geometry);
10010 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10012 refcount = ID2D1GradientStopCollection_Release(gradient);
10013 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10016 hr = ID2D1RenderTarget_CreateGradientStopCollection(
rt, stops,
ARRAY_SIZE(stops),
10018 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10022 radial_gradient_properties.
radiusX = 160.0f;
10023 radial_gradient_properties.
radiusY = 480.0f;
10024 hr = ID2D1RenderTarget_CreateRadialGradientBrush(
rt, &radial_gradient_properties,
NULL, gradient,
10026 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10030 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10032 ID2D1RenderTarget_FillGeometry(
rt, geometry, brush,
NULL);
10034 refcount = ID2D1Brush_Release(brush);
10035 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
10037 refcount = ID2D1Geometry_Release(geometry);
10038 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10040 refcount = ID2D1GradientStopCollection_Release(gradient);
10041 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10046 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10050 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10052 ID2D1RenderTarget_FillGeometry(
rt, geometry, brush,
NULL);
10054 refcount = ID2D1Brush_Release(brush);
10055 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
10057 refcount = ID2D1Geometry_Release(geometry);
10058 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10069 hr = ID2D1Factory_CreateStrokeStyle(
ctx.factory, &stroke_desc,
NULL, 0, &stroke_style);
10070 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10074 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10078 ID2D1RenderTarget_DrawLine(
rt, p0, p1, brush, 1.0f, stroke_style);
10080 refcount = ID2D1Brush_Release(brush);
10081 ok(refcount == 0,
"Got unexpected refcount %lu.\n", refcount);
10083 refcount = ID2D1StrokeStyle_Release(stroke_style);
10084 ok(refcount == 1,
"Got unexpected refcount %lu.\n", refcount);
10087 ID2D1DeviceContext_GetTarget(device_context, &
target);
10089 ID2D1Image_Release(
target);
10091 hr = ID2D1CommandList_Close(command_list);
10092 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10094 ID2D1DeviceContext_GetTarget(device_context, &
target);
10099 hr = ID2D1CommandList_Close(command_list);
10102 ID2D1CommandList_Release(command_list);
10105 hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
10106 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10108 hr = ID2D1CommandList_Close(command_list);
10110 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10112 ID2D1CommandList_Release(command_list);
10116 ok(device_context2 !=
NULL,
"Failed to create device context.\n");
10118 hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
10119 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10121 ID2D1DeviceContext_SetTarget(device_context2, (
ID2D1Image *)command_list);
10122 ID2D1DeviceContext_GetTarget(device_context2, &
target);
10127 ID2D1CommandList_Release(command_list);
10128 ID2D1DeviceContext_Release(device_context2);
10130 ID2D1RenderTarget_Release(
rt);
10149 static const struct
10160 static const struct
10179 skip(
"Failed to create %s d3d device, hr %#lx.\n", device_types[
i].
name,
hr);
10186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10194 desc.type = target_types[
j].type;
10196 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
10203 ok(
hr ==
S_OK,
"%s/%s: Got unexpected hr %#lx.\n", device_types[
i].
name, target_types[
j].
name,
hr);
10205 bitmap_size = ID2D1RenderTarget_GetMaximumBitmapSize(
rt);
10207 device_types[
i].
name, target_types[
j].
name, bitmap_size);
10209 bitmap_desc.
dpiX = 96.0f;
10210 bitmap_desc.
dpiY = 96.0f;
10214 size.width = bitmap_size;
10217 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10218 ID2D1Bitmap_Release(
bitmap);
10220 ID2D1RenderTarget_Release(
rt);
10222 texture_desc.
Width = bitmap_size;
10223 texture_desc.
Height = 1;
10236 "%s/%s: Got unexpected hr %#lx.\n", device_types[
i].
name, target_types[
j].
name,
hr);
10238 ID3D10Texture2D_Release(
texture);
10241 IDXGISurface_Release(
surface);
10245 ID3D10Device1_Release(
device);
10258 float dpi_x, dpi_y;
10261 static const struct
10263 float dpi_x, dpi_y;
10266 create_dpi_tests[] =
10268 { 0.0f, 0.0f,
S_OK},
10274 { 48.0f, 96.0f,
S_OK},
10275 { 96.0f, 48.0f,
S_OK},
10277 static const float init_dpi_x = 60.0f, init_dpi_y = 288.0f;
10278 static const float dc_dpi_x = 120.0f, dc_dpi_y = 144.0f;
10286 win_skip(
"ID2D1Factory1 is not supported.\n");
10292 ok(!!device_context,
"Failed to create device context.\n");
10294 ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
10295 ok(dpi_x == 96.0f,
"Got unexpected dpi_x %.8e.\n", dpi_x);
10296 ok(dpi_y == 96.0f,
"Got unexpected dpi_y %.8e.\n", dpi_y);
10301 ID2D1DeviceContext_SetDpi(device_context, init_dpi_x, init_dpi_y);
10305 bitmap_desc.
dpiX = create_dpi_tests[
i].dpi_x;
10306 bitmap_desc.
dpiY = create_dpi_tests[
i].dpi_y;
10309 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context,
ctx.surface, &bitmap_desc, &
bitmap);
10311 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10313 ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
10315 ID2D1Bitmap1_GetDpi(
bitmap, &dpi_x, &dpi_y);
10317 ok(dpi_x == bitmap_desc.
dpiX,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
10318 i, dpi_x, bitmap_desc.
dpiX);
10320 ok(dpi_y == bitmap_desc.
dpiY,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
10321 i, dpi_y, bitmap_desc.
dpiY);
10323 ID2D1DeviceContext_BeginDraw(device_context);
10325 hr = ID2D1DeviceContext_EndDraw(device_context,
NULL,
NULL);
10326 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10329 ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
10330 ok(dpi_x == dc_dpi_x,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
i, dpi_x, dc_dpi_x);
10331 ok(dpi_y == dc_dpi_y,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
i, dpi_y, dc_dpi_y);
10333 ID2D1Bitmap1_Release(
bitmap);
10339 &IID_IWICImagingFactory, (
void **)&wic_factory);
10340 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10346 ID2D1DeviceContext_SetDpi(device_context, init_dpi_x, init_dpi_y);
10348 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
10350 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10351 hr = IWICBitmap_QueryInterface(wic_bitmap, &IID_IWICBitmapSource, (
void **)&wic_bitmap_src);
10352 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10353 IWICBitmap_Release(wic_bitmap);
10357 bitmap_desc.
dpiX = create_dpi_tests[
i].dpi_x;
10358 bitmap_desc.
dpiY = create_dpi_tests[
i].dpi_y;
10361 hr = ID2D1DeviceContext_CreateBitmapFromWicBitmap(device_context, wic_bitmap_src, &bitmap_desc, &
bitmap);
10362 ok(
hr == create_dpi_tests[
i].
hr,
"Test %u: Got unexpected hr %#lx, expected %#lx.\n",
10363 i,
hr, create_dpi_tests[
i].
hr);
10364 IWICBitmapSource_Release(wic_bitmap_src);
10369 ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
10371 ID2D1Bitmap1_GetDpi(
bitmap, &dpi_x, &dpi_y);
10372 if (bitmap_desc.
dpiX == 0.0f && bitmap_desc.
dpiY == 0.0f)
10375 ok(dpi_x == init_dpi_x,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
i, dpi_x, init_dpi_x);
10376 ok(dpi_y == init_dpi_y,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
i, dpi_y, init_dpi_y);
10380 ok(dpi_x == bitmap_desc.
dpiX,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
10381 i, dpi_x, bitmap_desc.
dpiX);
10382 ok(dpi_y == bitmap_desc.
dpiY,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
10383 i, dpi_y, bitmap_desc.
dpiY);
10386 ID2D1DeviceContext_BeginDraw(device_context);
10388 hr = ID2D1DeviceContext_EndDraw(device_context,
NULL,
NULL);
10389 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10392 ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
10393 ok(dpi_x == dc_dpi_x,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
i, dpi_x, dc_dpi_x);
10394 ok(dpi_y == dc_dpi_y,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
i, dpi_y, dc_dpi_y);
10396 ID2D1Bitmap1_Release(
bitmap);
10398 IWICImagingFactory_Release(wic_factory);
10406 ID2D1DeviceContext_SetDpi(device_context, init_dpi_x, init_dpi_y);
10410 bitmap_desc.
dpiX = create_dpi_tests[
i].dpi_x;
10411 bitmap_desc.
dpiY = create_dpi_tests[
i].dpi_y;
10414 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
10415 ok(
hr == create_dpi_tests[
i].
hr,
"Test %u: Got unexpected hr %#lx, expected %#lx.\n",
10416 i,
hr, create_dpi_tests[
i].
hr);
10421 ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
10423 ID2D1Bitmap1_GetDpi(
bitmap, &dpi_x, &dpi_y);
10424 if (bitmap_desc.
dpiX == 0.0f && bitmap_desc.
dpiY == 0.0f)
10427 ok(dpi_x == init_dpi_x,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
i, dpi_x, init_dpi_x);
10428 ok(dpi_y == init_dpi_y,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
i, dpi_y, init_dpi_y);
10432 ok(dpi_x == bitmap_desc.
dpiX,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
10433 i, dpi_x, bitmap_desc.
dpiX);
10434 ok(dpi_y == bitmap_desc.
dpiY,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
10435 i, dpi_y, bitmap_desc.
dpiY);
10438 ID2D1DeviceContext_BeginDraw(device_context);
10440 hr = ID2D1DeviceContext_EndDraw(device_context,
NULL,
NULL);
10441 ok(
hr ==
S_OK,
"Test %u: Got unexpected hr %#lx.\n",
i,
hr);
10444 ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
10445 ok(dpi_x == dc_dpi_x,
"Test %u: Got unexpected dpi_x %.8e, expected %.8e.\n",
i, dpi_x, dc_dpi_x);
10446 ok(dpi_y == dc_dpi_y,
"Test %u: Got unexpected dpi_y %.8e, expected %.8e.\n",
i, dpi_y, dc_dpi_y);
10448 ID2D1Bitmap1_Release(
bitmap);
10451 ID2D1DeviceContext_SetTarget(device_context,
NULL);
10452 ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
10453 ok(dpi_x == dc_dpi_x,
"Got unexpected dpi_x %.8e, expected %.8e.\n", dpi_x, dc_dpi_x);
10454 ok(dpi_y == dc_dpi_y,
"Got unexpected dpi_y %.8e, expected %.8e.\n", dpi_y, dc_dpi_y);
10456 ID2D1DeviceContext_Release(device_context);
10471 unit_mode = ID2D1DeviceContext_GetUnitMode(
context);
10474 ID2D1DeviceContext_SetUnitMode(
context, 0xdeadbeef);
10475 unit_mode = ID2D1DeviceContext_GetUnitMode(
context);
10479 unit_mode = ID2D1DeviceContext_GetUnitMode(
context);
10482 ID2D1DeviceContext_SetUnitMode(
context, 0xdeadbeef);
10483 unit_mode = ID2D1DeviceContext_GetUnitMode(
context);
10500 static const struct
10520 &IID_IWICImagingFactory, (
void **)&wic_factory);
10521 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10525 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
10533 ok(
format.format ==
tests[
i].d2d.format,
"%s: Got unexpected DXGI format %#x.\n",
10535 ok(
format.alphaMode ==
tests[
i].d2d.alphaMode,
"%s: Got unexpected alpha mode %#x.\n",
10538 ID2D1Bitmap_Release(
bitmap);
10539 IWICBitmap_Release(wic_bitmap);
10542 IWICImagingFactory_Release(wic_factory);
10552 static const struct
10560 {0.0f, 0.0f, 1.0f},
10561 {1.0f, 8.41470957e-001f, 5.40302277e-001f},
10562 {2.0f, 9.09297407e-001f, -4.16146845e-001f},
10563 {
M_PI / 2.0f, 1.0f, -4.37113883e-008f},
10564 {
M_PI, -8.74227766e-008f, -1.0f},
10567 static const struct
10575 {1.0f, 1.55740774f},
10576 {2.0f, -2.18503976f},
10577 {
M_PI / 2.0f, -2.28773320e+007f},
10578 {
M_PI, 8.74227766e-008f},
10581 static const struct
10590 {0.0f, 0.0f, 0.0f, 0.0f},
10591 {1.0f, 0.0f, 0.0f, 1.0f},
10592 {0.0f, 1.0f, 0.0f, 1.0f},
10593 {0.0f, 0.0f, 1.0f, 1.0f},
10594 {1.0f, 1.0f, 1.0f, 1.73205078f},
10595 {1.0f, 2.0f, 2.0f, 3.0f},
10596 {1.0f, 2.0f, 3.0f, 3.74165750f},
10599 if (!pD2D1SinCos || !pD2D1Tan || !pD2D1Vec3Length)
10601 win_skip(
"D2D1SinCos/D2D1Tan/D2D1Vec3Length not available, skipping test.\n");
10607 pD2D1SinCos(sc_data[
i].
x, &
s, &
c);
10609 "Test %u: Got unexpected sin %.8e, expected %.8e.\n",
i,
s, sc_data[
i].
s);
10611 "Test %u: Got unexpected cos %.8e, expected %.8e.\n",
i,
c, sc_data[
i].
c);
10616 t = pD2D1Tan(t_data[
i].
x);
10618 "Test %u: Got unexpected tan %.8e, expected %.8e.\n",
i,
t, t_data[
i].
t);
10623 l = pD2D1Vec3Length(l_data[
i].
x, l_data[
i].
y, l_data[
i].
z);
10625 "Test %u: Got unexpected length %.8e, expected %.8e.\n",
i,
l, l_data[
i].
l);
10648 {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}},
10649 {{0.0f, 0.0f, 0.0f, 1.0f}, {0.0f, 0.0f, 0.0f, 1.0f}},
10650 {{1.0f, 1.0f, 1.0f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}},
10652 {{0.2f, 0.4f, 0.6f, 0.8f}, {0.0331047624f, 0.132868335f, 0.318546832f, 0.8f}},
10653 {{0.3f, 0.5f, 0.7f, 0.9f}, {0.0732389688f, 0.214041144f, 0.447988421f, 0.9f}},
10655 {{0.0002f, 0.0004f, 0.0006f, 0.0008f}, {1.54798763e-005f, 3.09597526e-005f, 4.64396289e-005f, 0.0008f}},
10656 {{0.0003f, 0.0005f, 0.0007f, 0.0009f}, {2.32198145e-005f, 3.86996908e-005f, 5.41795634e-005f, 0.0009f}},
10658 {{-0.3f, 1.5f, -0.7f, 2.0f}, { 0.0f, 1.0f, 0.0f, 2.0f}},
10659 {{ 1.5f, -0.3f, 2.0f, -0.7f}, { 1.0f, 0.0f, 1.0f, -0.7f}},
10660 {{ 0.0f, 1.0f, 0.0f, 1.5f}, {-0.7f, 2.0f, -0.3f, 1.5f}},
10661 {{ 1.0f, 0.0f, 1.0f, -0.3f}, { 2.0f, -0.7f, 1.5f, -0.3f}},
10664 if (!pD2D1ConvertColorSpace)
10666 win_skip(
"D2D1ConvertColorSpace() not available, skipping test.\n");
10672 src_space = colour_spaces[
i];
10675 dst_space = colour_spaces[
j];
10692 else if (src_space != dst_space)
10699 dst_colour = pD2D1ConvertColorSpace(src_space, dst_space, &src_colour);
10701 "Got unexpected destination colour {%.8e, %.8e, %.8e, %.8e}, "
10702 "expected destination colour {%.8e, %.8e, %.8e, %.8e} for "
10703 "source colour {%.8e, %.8e, %.8e, %.8e}, "
10704 "source colour space %#x, destination colour space %#x.\n",
10705 dst_colour.
r, dst_colour.
g, dst_colour.
b, dst_colour.
a,
10707 src_colour.
r, src_colour.
g, src_colour.
b, src_colour.
a,
10708 src_space, dst_space);
10729 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10733 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10736 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10740 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10742 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
10749 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10751 ok(
match,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
10754 ID2D1GeometryGroup_Release(
group);
10756 ID2D1Geometry_Release(geometries[0]);
10757 ID2D1Geometry_Release(geometries[1]);
10766 ID2D1Multithread_Enter(multithread);
10777 ID2D1RenderTarget_BeginDraw(
rt);
10779 ID2D1RenderTarget_Clear(
rt, &
color);
10781 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10799 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10801 hr = ID2D1Factory_QueryInterface(
factory, &IID_ID2D1Multithread, (
void **)&multithread);
10804 win_skip(
"ID2D1Multithread is not supported.\n");
10805 ID2D1Factory_Release(
factory);
10808 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10810 ret = ID2D1Multithread_GetMultithreadProtected(multithread);
10811 ok(!
ret,
"Unexpected return value.\n");
10813 ID2D1Multithread_Enter(multithread);
10815 ok(!!
thread,
"Failed to create a thread.\n");
10819 ID2D1Multithread_Release(multithread);
10820 ID2D1Factory_Release(
factory);
10823 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10825 hr = ID2D1Factory_QueryInterface(
factory, &IID_ID2D1Multithread, (
void **)&multithread);
10826 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10828 ret = ID2D1Multithread_GetMultithreadProtected(multithread);
10829 ok(!!
ret,
"Unexpected return value.\n");
10831 ID2D1Multithread_Enter(multithread);
10833 ok(!!
thread,
"Failed to create a thread.\n");
10836 ID2D1Multithread_Leave(multithread);
10840 ID2D1Multithread_Release(multithread);
10842 ID2D1Factory_Release(
factory);
10847 hr = ID2D1Factory_QueryInterface(
ctx.factory, &IID_ID2D1Multithread, (
void **)&multithread);
10848 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10850 ID2D1Multithread_Enter(multithread);
10852 ok(!!
thread,
"Failed to create a thread.\n");
10855 ID2D1Multithread_Leave(multithread);
10859 ID2D1Multithread_Release(multithread);
10865 hr = ID2D1Factory_QueryInterface(
ctx.factory, &IID_ID2D1Multithread, (
void **)&multithread);
10866 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
10868 ID2D1Multithread_Enter(multithread);
10870 ok(!!
thread,
"Failed to create a thread.\n");
10873 ID2D1Multithread_Leave(multithread);
10877 ID2D1Multithread_Release(multithread);
10881#define check_system_properties(effect) check_system_properties_(__LINE__, effect)
10884 UINT i, value_size, str_size;
10890 static const struct system_property_test
10897 system_property_tests[] =
10911 hr = ID2D1Effect_GetPropertyName(effect, 0xdeadbeef,
name,
sizeof(
name));
10913 type = ID2D1Effect_GetType(effect, 0xdeadbeef);
10915 value_size = ID2D1Effect_GetValueSize(effect, 0xdeadbeef);
10916 ok_(__FILE__,
line)(value_size == 0,
"Got unexpected value size %u for 0xdeadbeef.\n", value_size);
10920 const struct system_property_test *
test = &system_property_tests[
i];
10925 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get property name, hr %#lx\n",
hr);
10933 count = ID2D1Effect_GetPropertyNameLength(effect,
test->index);
10941 hr = ID2D1Effect_GetPropertyName(effect,
test->index,
name,
count + 1);
10942 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get property name, hr %#lx\n",
hr);
10944 type = ID2D1Effect_GetType(effect,
test->index);
10945 ok_(__FILE__,
line)(
type ==
test->type,
"Got unexpected property type %#x, expected %#x.\n",
10949 value_size = ID2D1Effect_GetValueSize(effect,
test->index);
10950 if (
test->value_size != 0)
10952 ok_(__FILE__,
line)(value_size ==
test->value_size,
"Got unexpected value size %u, expected %u.\n",
10953 value_size,
test->value_size);
10958 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get value, hr %#lx.\n",
hr);
10960 ok_(__FILE__,
line)(value_size == str_size,
"Got unexpected value size %u, expected %u.\n",
10961 value_size, str_size);
10969 unsigned int i,
j, min_inputs, max_inputs, str_size, input_count;
10985 const struct effect_test
10989 UINT32 default_input_count;
10995 {&CLSID_D2D12DAffineTransform, 1, 1, 1, 1},
10996 {&CLSID_D2D13DPerspectiveTransform, 1, 1, 1, 1},
10997 {&CLSID_D2D1Composite, 1, 2, 1, 0xffffffff},
10998 {&CLSID_D2D1Crop, 1, 1, 1, 1},
10999 {&CLSID_D2D1Shadow, 1, 1, 1, 1},
11000 {&CLSID_D2D1Grayscale, 3, 1, 1, 1},
11009 win_skip(
"ID2D1Factory1 is not supported.\n");
11014 win_skip(
"ID2D1Factory3 is not supported.\n");
11020 const struct effect_test *
test = effect_tests +
i;
11022 if (
test->factory_version == 3 && !
ctx.factory3)
11027 hr = ID2D1DeviceContext_CreateEffect(
context,
test->clsid, &effect);
11028 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11031 hr = ID2D1Effect_QueryInterface(effect, &IID_ID2D1Image, (
void **)&image_a);
11032 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11033 ID2D1Effect_GetOutput(effect, &image_b);
11034 ok(image_b == image_a,
"Got unexpected image_b %p, expected %p.\n", image_b, image_a);
11036 hr = ID2D1Image_QueryInterface(image_a, &IID_ID2D1Effect, (
void **)&effect2);
11037 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11038 ok(effect2 == effect,
"Unexpected pointer.\n");
11039 ID2D1Effect_Release(effect2);
11041 hr = ID2D1Image_QueryInterface(image_a, &
IID_IUnknown, (
void **)&unk);
11042 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11043 ok(unk == (
IUnknown *)effect,
"Unexpected pointer.\n");
11044 IUnknown_Release(unk);
11046 ID2D1Image_Release(image_b);
11047 ID2D1Image_Release(image_a);
11058 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11061 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11064 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11071 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11079 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11085 (
BYTE *)&cached,
sizeof(cached));
11086 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11087 ok(cached ==
FALSE,
"Got unexpected cached %d.\n", cached);
11091 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11096 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11097 ok(min_inputs ==
test->min_inputs,
"Got unexpected min inputs %u, expected %u.\n",
11098 min_inputs,
test->min_inputs);
11102 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11103 ok(max_inputs ==
test->max_inputs,
"Got unexpected max inputs %u, expected %u.\n",
11104 max_inputs,
test->max_inputs);
11107 input_count = ID2D1Effect_GetInputCount(effect);
11108 ok(input_count ==
test->default_input_count,
"Got unexpected input count %u, expected %u.\n",
11109 input_count,
test->default_input_count);
11112 input_count = (
test->max_inputs < 16 ?
test->max_inputs : 16);
11113 for (
j = 0;
j < input_count + 4; ++
j)
11116 hr = ID2D1Effect_SetInputCount(effect,
j);
11117 if (j < test->min_inputs ||
j >
test->max_inputs)
11120 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11125 input_count = ID2D1Effect_GetInputCount(effect);
11126 for (
j = 0;
j < input_count + 4; ++
j)
11129 ID2D1Effect_GetInput(effect,
j, &image_a);
11130 ok(image_a ==
NULL,
"Got unexpected image_a %p.\n", image_a);
11138 bitmap_desc.
dpiX = 96.0f;
11139 bitmap_desc.
dpiY = 96.0f;
11141 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11144 for (
j = 0;
j < input_count + 4; ++
j)
11148 ID2D1Effect_GetInput(effect,
j, &image_a);
11152 ID2D1Image_Release(image_a);
11156 ok(image_a ==
NULL,
"Got unexpected image_a %p.\n", image_a);
11162 for (
j = input_count;
j < input_count + 4; ++
j)
11167 ID2D1Effect_GetInput(effect,
j, &image_a);
11168 ok(image_a ==
NULL,
"Got unexpected image_a %p.\n", image_a);
11171 ID2D1Bitmap_Release(
bitmap);
11173 ID2D1Effect_Release(effect);
11197 ID2D1EffectImpl_AddRef(iface);
11201 else if (
IsEqualGUID(iid, &IID_ID2D1DrawTransform)
11205 ID2D1EffectImpl_AddRef(iface);
11277 if (!(
object =
calloc(1,
sizeof(*
object))))
11281 object->refcount = 1;
11282 object->integer = 10;
11283 object->effect_context =
NULL;
11284 object->transform_graph =
NULL;
11391 WCHAR display_name[64];
11396 const struct xml_test
11435 const WCHAR *effect_xml;
11457 device_context =
ctx.context;
11461 win_skip(
"ID2D1Factory1 is not supported.\n");
11474 const struct xml_test *
test = &xml_tests[
i];
11478 ok(
hr ==
test->hr,
"Got unexpected hr %#lx, expected %#lx.\n",
hr,
test->hr);
11481 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11482 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11483 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11484 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11485 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11487 ID2D1Effect_Release(effect);
11496 const struct xml_test *
test = &xml_tests[
i];
11504 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11506 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11507 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11508 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11509 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11510 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11511 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11518 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11520 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11521 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11522 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11526 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11527 ok(!
wcscmp(display_name,
L"TestEffectA"),
"Got unexpected display name %s.\n",
debugstr_w(display_name));
11528 ID2D1Effect_Release(effect);
11530 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11532 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11533 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11534 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11538 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11539 ok(!
wcscmp(display_name,
L"TestEffectA"),
"Got unexpected display name %s.\n",
debugstr_w(display_name));
11540 ID2D1Effect_Release(effect);
11542 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11543 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11544 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11545 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11553 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11555 ok(
hr ==
test->hr,
"Got unexpected hr %#lx, expected %#lx.\n",
hr,
test->hr);
11558 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11559 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11566 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11568 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11569 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11570 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11574 hr = ID2D1Effect_GetValueByName(effect,
L"Integer",
11576 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11577 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
11579 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11581 ok(effect_context ==
NULL,
"Got unexpected effect context %p.\n", effect_context);
11582 ID2D1Effect_Release(effect);
11584 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11586 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11587 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11588 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11592 hr = ID2D1Effect_GetValueByName(effect,
L"Integer",
11594 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11595 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
11597 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11599 ok(effect_context ==
NULL,
"Got unexpected effect context %p.\n", effect_context);
11600 ID2D1Effect_Release(effect);
11602 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11603 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11604 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11605 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11608 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_D2D1Composite);
11612 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11614 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11615 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
11616 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11617 integer = ID2D1Effect_GetInputCount(effect);
11621 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11623 count = ID2D1TransformGraph_GetInputCount(
graph);
11624 ok(
count == 3,
"Unexpected input count %u.\n",
count);
11629 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11633 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11637 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11639 hr = ID2D1Effect_SetInputCount(effect, 4);
11640 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11643 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11647 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11648 count = ID2D1TransformGraph_GetInputCount(
graph);
11649 ok(
count == 4,
"Unexpected input count %u.\n",
count);
11651 ID2D1Effect_Release(effect);
11653 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11654 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11679 win_skip(
"ID2D1Factory1 is not supported.\n");
11685 "main",
"vs_4_0", 0, 0, &
vs,
NULL);
11686 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11689 "main",
"ps_4_0", 0, 0, &ps,
NULL);
11690 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
11692 binding.propertyName =
L"Context";
11695 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
11697 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11699 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
11700 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11702 effect_context =
NULL;
11703 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
11705 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11708 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestVertexShader);
11709 ok(!
loaded,
"Unexpected shader loaded state.\n");
11710 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader);
11711 ok(!
loaded,
"Unexpected shader loaded state.\n");
11713 hr = ID2D1EffectContext_LoadVertexShader(effect_context,
11714 &GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
11716 hr = ID2D1EffectContext_LoadVertexShader(effect_context,
11717 &GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(
vs), ID3D10Blob_GetBufferSize(
vs));
11718 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11719 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestVertexShader);
11720 ok(
loaded,
"Unexpected shader loaded state.\n");
11722 hr = ID2D1EffectContext_LoadVertexShader(effect_context,
11723 &GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
11724 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11725 hr = ID2D1EffectContext_LoadVertexShader(effect_context,
11726 &GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(
vs), ID3D10Blob_GetBufferSize(
vs));
11727 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11729 hr = ID2D1EffectContext_LoadPixelShader(effect_context,
11730 &GUID_TestPixelShader, ID3D10Blob_GetBufferPointer(
vs), ID3D10Blob_GetBufferSize(
vs));
11732 hr = ID2D1EffectContext_LoadPixelShader(effect_context,
11733 &GUID_TestPixelShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
11734 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11735 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader);
11736 ok(
loaded,
"Unexpected shader loaded state.\n");
11739 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect2);
11740 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11742 effect_context2 =
NULL;
11743 hr = ID2D1Effect_GetValueByName(effect2,
L"Context",
11745 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11747 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context2, &GUID_TestPixelShader);
11748 ok(
loaded,
"Unexpected shader loaded state.\n");
11750 ID2D1Effect_Release(effect2);
11754 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11757 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11759 hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect2);
11760 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11762 effect_context =
NULL;
11763 hr = ID2D1Effect_GetValueByName(effect2,
L"Context",
11765 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11767 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader);
11768 ok(!
loaded,
"Unexpected shader loaded state.\n");
11770 ID2D1Effect_Release(effect2);
11772 ID2D1DeviceContext_Release(device_context);
11773 ID2D1Device_Release(
device);
11776 refcount = ID2D1Effect_Release(effect);
11777 ok(!refcount,
"Unexpected refcount %lu.\n", refcount);
11779 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
11780 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11782 effect_context =
NULL;
11783 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
11785 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11787 loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader);
11788 ok(
loaded,
"Unexpected shader loaded state.\n");
11790 ID2D1Effect_Release(effect);
11792 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
11793 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11795 ID3D10Blob_Release(
vs);
11796 ID3D10Blob_Release(ps);
11801#define check_zero_buffer(a, b) check_zero_buffer_(a, b, __LINE__)
11808 for (
i = 0;
i <
size /
sizeof(*ptr); ++
i)
11810 for (
i = 0;
i <
size %
sizeof(*ptr); ++
i)
11811 ok_(__FILE__,
line)(!ptr2[
size -
i - 1],
"Expected zero value %#x.\n", ptr2[
i]);
11840 static const WCHAR *effect_author =
L"The Wine Project";
11841 static const WCHAR *effect_category =
L"Test";
11842 static const WCHAR *effect_description =
L"Test effect.";
11850 const struct system_property_test
11853 const WCHAR *display_name;
11854 const WCHAR *author;
11860 system_property_tests[] =
11862 {
effect_xml_a,
L"TestEffectA", effect_author, effect_category, effect_description, 1, 1},
11863 {
effect_xml_b,
L"TestEffectB", effect_author, effect_category, effect_description, 1, 1},
11864 {
effect_xml_c,
L"TestEffectC", effect_author, effect_category, effect_description, 1, 1},
11874 win_skip(
"ID2D1Factory1 is not supported.\n");
11882 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11884 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
11885 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11888 ok(
size == 4,
"Unexpected size %u.\n",
size);
11892 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11899 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11900 ok(
data == 1,
"Unexpected data %u.\n",
data);
11903 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11905 count = ID2D1Properties_GetPropertyCount(subproperties);
11909 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11913 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11918 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11922 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11925 ID2D1Properties_Release(subproperties);
11928 index = ID2D1Effect_GetPropertyIndex(effect,
L"Int32Prop");
11930 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11932 prop_type = ID2D1Effect_GetType(effect,
index);
11935 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11936 ok(
val == -2,
"Unexpected value %d.\n",
val);
11939 index = ID2D1Effect_GetPropertyIndex(effect,
L"Int32PropHex");
11941 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11943 prop_type = ID2D1Effect_GetType(effect,
index);
11946 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11947 ok(
val == -65535,
"Unexpected value %d.\n",
val);
11950 index = ID2D1Effect_GetPropertyIndex(effect,
L"Int32PropOct");
11952 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11954 prop_type = ID2D1Effect_GetType(effect,
index);
11957 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11958 ok(
val == 10,
"Unexpected value %d.\n",
val);
11961 index = ID2D1Effect_GetPropertyIndex(effect,
L"UInt32Prop");
11963 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11965 prop_type = ID2D1Effect_GetType(effect,
index);
11968 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11972 index = ID2D1Effect_GetPropertyIndex(effect,
L"UInt32PropHex");
11974 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11976 prop_type = ID2D1Effect_GetType(effect,
index);
11979 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11983 index = ID2D1Effect_GetPropertyIndex(effect,
L"Vec2Prop");
11985 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11987 prop_type = ID2D1Effect_GetType(effect,
index);
11990 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11991 ok(
vec2.
x == 3.0f,
"Unexpected value %.8e.\n",
vec2.
x);
11992 ok(
vec2.
y == 4.0f,
"Unexpected value %.8e.\n",
vec2.
y);
11995 index = ID2D1Effect_GetPropertyIndex(effect,
L"Vec3Prop");
11997 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
11999 prop_type = ID2D1Effect_GetType(effect,
index);
12002 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12003 ok(
vec3.
x == 5.0f,
"Unexpected value %.8e.\n",
vec3.
x);
12004 ok(
vec3.
y == 6.0f,
"Unexpected value %.8e.\n",
vec3.
y);
12005 ok(
vec3.
z == 7.0f,
"Unexpected value %.8e.\n",
vec3.
z);
12008 index = ID2D1Effect_GetPropertyIndex(effect,
L"Vec4Prop");
12010 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12012 prop_type = ID2D1Effect_GetType(effect,
index);
12015 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12016 ok(
vec4.
x == 8.0f,
"Unexpected value %.8e.\n",
vec4.
x);
12017 ok(
vec4.
y == 9.0f,
"Unexpected value %.8e.\n",
vec4.
y);
12018 ok(
vec4.
z == 10.0f,
"Unexpected value %.8e.\n",
vec4.
z);
12019 ok(
vec4.
w == 11.0f,
"Unexpected value %.8e.\n",
vec4.
w);
12022 index = ID2D1Effect_GetPropertyIndex(effect,
L"Mat3x2Prop");
12024 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12026 prop_type = ID2D1Effect_GetType(effect,
index);
12029 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12030 for (
i = 0,
ptr = (
float *)&mat3x2;
i <
sizeof(mat3x2) /
sizeof(*
ptr); ++
i, ++
ptr)
12031 ok(*
ptr == 1.0f +
i,
"Unexpected value %.8e.\n", *
ptr);
12034 index = ID2D1Effect_GetPropertyIndex(effect,
L"Mat4x3Prop");
12036 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12038 prop_type = ID2D1Effect_GetType(effect,
index);
12041 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12042 for (
i = 0,
ptr = (
float *)&mat4x3;
i <
sizeof(mat4x3) /
sizeof(*
ptr); ++
i, ++
ptr)
12043 ok(*
ptr == 1.0f +
i,
"Unexpected value %.8e.\n", *
ptr);
12046 index = ID2D1Effect_GetPropertyIndex(effect,
L"Mat4x4Prop");
12048 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12050 prop_type = ID2D1Effect_GetType(effect,
index);
12053 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12054 for (
i = 0,
ptr = (
float *)&mat4x4;
i <
sizeof(mat4x4) /
sizeof(*
ptr); ++
i, ++
ptr)
12055 ok(*
ptr == 1.0f +
i,
"Unexpected value %.8e.\n", *
ptr);
12058 index = ID2D1Effect_GetPropertyIndex(effect,
L"Mat5x4Prop");
12060 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12062 prop_type = ID2D1Effect_GetType(effect,
index);
12065 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12066 for (
i = 0,
ptr = (
float *)&mat5x4;
i <
sizeof(mat5x4) /
sizeof(*
ptr); ++
i, ++
ptr)
12067 ok(*
ptr == 1.0f +
i,
"Unexpected value %.8e.\n", *
ptr);
12069 ID2D1Effect_Release(effect);
12071 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12072 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12078 const struct system_property_test *
test = &system_property_tests[
i];
12082 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12085 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
12086 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12092 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12093 ok(
IsEqualGUID(&
clsid, &CLSID_TestEffect),
"Got unexpected clsid %s, expected %s.\n",
12098 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12099 ok(!
wcscmp(
buffer,
test->display_name),
"Got unexpected display name %s, expected %s.\n",
12104 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12110 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12116 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12117 ok(!
wcscmp(
buffer,
test->description),
"Got unexpected description %s, expected %s.\n",
12122 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12123 ok(cached ==
FALSE,
"Got unexpected cached %d.\n", cached);
12127 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12132 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12133 ok(min_inputs ==
test->min_inputs,
"Got unexpected min inputs %u, expected %u.\n",
12134 min_inputs,
test->min_inputs);
12138 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12139 ok(max_inputs ==
test->max_inputs,
"Got unexpected max inputs %u, expected %u.\n",
12140 max_inputs,
test->max_inputs);
12159 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12162 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12170 ID2D1Effect_Release(effect);
12171 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12172 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12178 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
12180 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12183 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
12184 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12186 count = ID2D1Effect_GetPropertyCount(effect);
12187 ok(
count == 3,
"Got unexpected property count %u.\n",
count);
12189 index = ID2D1Effect_GetPropertyIndex(effect,
L"Context");
12191 index = ID2D1Effect_GetPropertyIndex(effect,
L"Integer");
12211 effect_context =
NULL;
12212 hr = ID2D1Effect_GetValueByName(effect,
12214 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12215 ok(!!effect_context,
"Got unexpected effect context %p.\n", effect_context);
12227 effect_context =
NULL;
12229 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12230 ok(!!effect_context,
"Got unexpected effect context %p.\n", effect_context);
12247 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12262 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12267 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12269 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12273 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12276 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12279 ID2D1Effect_Release(effect);
12280 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12281 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12286 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12287 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
12288 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12290 index = ID2D1Effect_GetPropertyIndex(effect,
L"Context");
12292 index = ID2D1Effect_GetPropertyIndex(effect,
L"Integer");
12300 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12301 ok(effect_context ==
NULL,
"Got unexpected effect context %p.\n", effect_context);
12305 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12313 ID2D1Effect_Release(effect);
12314 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12315 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12323 ID2D1Properties *subproperties, *fields_subproperties, *field_subproperties;
12330 prop_type = ID2D1Effect_GetType(effect,
property);
12333 hr = ID2D1Effect_GetSubProperties(effect,
property, &subproperties);
12334 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12342 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12345 prop_count = ID2D1Properties_GetPropertyCount(subproperties);
12346 ok(!prop_count,
"Got unexpected property count %u.\n",
count);
12350 &fields_subproperties);
12351 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12352 prop_count = ID2D1Properties_GetPropertyCount(fields_subproperties);
12353 ok(prop_count ==
count,
"Got unexpected property count %u.\n",
count);
12355 for (
i = 0;
i < prop_count; ++
i)
12359 prop_type = ID2D1Properties_GetType(fields_subproperties,
i);
12363 hr = ID2D1Properties_GetSubProperties(fields_subproperties,
i, &field_subproperties);
12364 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12365 prop_count = ID2D1Properties_GetPropertyCount(field_subproperties);
12366 ok(prop_count == 1,
"Got unexpected property count %u.\n",
count);
12368 prop_type = ID2D1Properties_GetType(field_subproperties, 0);
12371 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12374 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12377 ID2D1Properties_Release(field_subproperties);
12382 ID2D1Properties_Release(fields_subproperties);
12383 ID2D1Properties_Release(subproperties);
12404 static const DWORD image_4x4[] =
12406 0xfdcba987, 0xffff0000, 0x98765432, 0xffffffff,
12407 0x4b4b4b4b, 0x89abcdef, 0xdeadbeef, 0xabcdef01,
12408 0x7f000011, 0x40ffffff, 0x12345678, 0xaabbccdd,
12409 0x44444444, 0xff7f7f7f, 0x1221abba, 0x00000000
12411 DWORD image_16x16[16 * 16];
12413 const struct effect_2d_affine_test
12415 const DWORD *img_data;
12416 unsigned int img_width;
12417 unsigned int img_height;
12424 effect_2d_affine_tests[] =
12426 {image_4x4, 4, 4, &
rotate, {-6.0f, -3.0f, 2.0f, 4.0f},
12427 "ASgBAQkBAQEBBwEBAQEBAQYBAQEBAQEHAQEBASgA"},
12428 {image_4x4, 4, 4, &
scale, {-2.0f, -3.0f, 1.0f, 9.0f},
12429 "AQ8BAQEEAQEBBAEBAQQBAQEEAQEBBAEBAQQBAQEEAQEBBAEBAQQBAQEEAQEBBAEBARAA/"},
12430 {image_4x4, 4, 4, &skew, {-7.0f, -3.0f, 3.0f, 7.0f},
12431 "AS8CCwEBAQEJAQEBAQEBBwEBAQEBAQEBBgEBAQEBAQEBBwEBAQEBAQkCAj0A"},
12432 {image_16x16, 16, 16, &
rotate, {-14.0f, -3.0f, 10.0f, 21.0f},
12433 "AWACGQECARcBBAEVAQYBEwEIAREBCgEPAQwBDQEOAQsBEAEJARIBBwEUAQUBARQBAQUBARIBAQcB"
12434 "ARABAQkBAQ4BAQsBAQwBAQ0BAQoBAQ8BAQgBAREBAQYBARMBAQQBARUBAQIBARcBAgEZAkUA"},
12435 {image_16x16, 16, 16, &
scale, {-2.0f, -3.0f, 10.0f, 39.0f},
12436 "ASEMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQM"
12437 "BAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDCIA"},
12438 {image_16x16, 16, 16, &skew, {-19.0f, -3.0f, 15.0f, 31.0f},
12439 "AYMBAiMBAgEhAQQBHwEGAR0BCAEbAQoBGQEMARcBDgEVARABEwESAREBFAEPARYBDQEYAQsBGgEJ"
12440 "ARwBBwEeAQYBHgEHARwBCQEaAQsBGAENARYBDwEUAREBEgETARABFQEOARcBDAEZAQoBGwEIAR0B"
12441 "BgEfAQQBIQECASMChAEA"},
12444 static const unsigned int border_modes[] =
12450 static const unsigned int interp_modes[] =
12460 memset(image_16x16, 0xff,
sizeof(image_16x16));
12477 win_skip(
"ID2D1Factory1 is not supported.\n");
12484 hr = ID2D1DeviceContext_CreateEffect(
context, &CLSID_D2D12DAffineTransform, &effect);
12485 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12489 count = ID2D1Effect_GetPropertyCount(effect);
12495 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12506 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12516 const struct effect_2d_affine_test *
test = &effect_2d_affine_tests[
i];
12522 bitmap_desc.
dpiX = 96.0f;
12523 bitmap_desc.
dpiY = 96.0f;
12526 hr = ID2D1DeviceContext_CreateBitmap(
context, input_size,
test->img_data,
12527 sizeof(*
test->img_data) *
test->img_width, &bitmap_desc, &
bitmap);
12528 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12534 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12537 ID2D1Bitmap1_Release(
bitmap);
12541 ID2D1Effect_GetOutput(effect, &output);
12543 hr = ID2D1DeviceContext_GetImageLocalBounds(
context, output, &output_bounds);
12544 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12547 "Got unexpected output bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n",
12549 test->bounds.left,
test->bounds.top,
test->bounds.right,
test->bounds.bottom);
12550 if (output_bounds.
left == output_bounds.
right || output_bounds.
top == output_bounds.
bottom)
12552 ID2D1Image_Release(output);
12553 ID2D1Bitmap1_Release(
bitmap);
12558 ID2D1DeviceContext_BeginDraw(
context);
12559 ID2D1DeviceContext_Clear(
context, 0);
12564 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12568 w = (output_bounds.
right - output_bounds.
left) + 4.0f;
12569 h = (output_bounds.
bottom - output_bounds.
top) + 4.0f;
12572 ok(
match,
"Figure does not match.\n");
12574 ID2D1Image_Release(output);
12575 ID2D1Bitmap1_Release(
bitmap);
12579 ID2D1Effect_Release(effect);
12598 const struct crop_effect_test
12603 crop_effect_tests[] =
12605 {{0.0f, 0.0f, 8.0f, 8.0f}, {0.0f, 0.0f, 8.0f, 8.0f}},
12606 {{4.0f, 4.0f, 8.0f, 8.0f}, {4.0f, 4.0f, 8.0f, 8.0f}},
12607 {{10.0f, 10.0f, 20.0f, 20.0f}, {10.0f, 10.0f, 16.0f, 16.0f}},
12608 {{-10.0f, 10.0f, 20.0f, 12.0f}, {0.0f, 10.0f, 16.0f, 12.0f}},
12609 {{3.0f, -2.0f, 5.0f, 1.0f}, {3.0f, 0.0f, 5.0f, 1.0f}},
12610 {{-1.0f, -1.0f, 20.0f, 20.0f}, {0.0f, 0.0f, 16.0f, 16.0f}},
12611 {{-5.0f, -5.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 0.0f, 0.0f}},
12621 win_skip(
"ID2D1Factory1 is not supported.\n");
12628 hr = ID2D1DeviceContext_CreateEffect(
context, &CLSID_D2D1Crop, &effect);
12629 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12633 count = ID2D1Effect_GetPropertyCount(effect);
12638 const struct crop_effect_test *
test = &crop_effect_tests[
i];
12644 bitmap_desc.
dpiX = 96.0f;
12645 bitmap_desc.
dpiY = 96.0f;
12648 hr = ID2D1DeviceContext_CreateBitmap(
context, input_size,
image,
12650 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12654 (
const BYTE *)&
test->crop_rect,
sizeof(
test->crop_rect));
12656 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12659 ID2D1Bitmap1_Release(
bitmap);
12663 ID2D1Effect_GetOutput(effect, &output);
12665 set_rect(&output_bounds, -1.0f, -1.0f, -1.0f, -1.0f);
12666 hr = ID2D1DeviceContext_GetImageLocalBounds(
context, output, &output_bounds);
12668 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12671 "Got unexpected output bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n",
12673 test->bounds.left,
test->bounds.top,
test->bounds.right,
test->bounds.bottom);
12675 ID2D1Image_Release(output);
12676 ID2D1Bitmap1_Release(
bitmap);
12680 ID2D1Effect_Release(effect);
12699 const DWORD test_pixels[] = {0xffffffff, 0x12345678, 0x89abcdef, 0x77777777, 0xdeadbeef};
12707 win_skip(
"ID2D1Factory3 is not supported.\n");
12714 hr = ID2D1DeviceContext_CreateEffect(
context, &CLSID_D2D1Grayscale, &effect);
12715 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12719 count = ID2D1Effect_GetPropertyCount(effect);
12720 ok(!
count,
"Got unexpected property count %u.\n",
count);
12724 DWORD pixel = test_pixels[
i];
12730 bitmap_desc.
dpiX = 96.0f;
12731 bitmap_desc.
dpiY = 96.0f;
12734 hr = ID2D1DeviceContext_CreateBitmap(
context, input_size, &pixel,
sizeof(pixel), &bitmap_desc, &
bitmap);
12735 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12738 ID2D1Effect_GetOutput(effect, &output);
12740 ID2D1DeviceContext_BeginDraw(
context);
12741 ID2D1DeviceContext_Clear(
context, 0);
12744 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12748 luminance = (
DWORD)(0.299f * ((pixel >> 16) & 0xff)
12749 + 0.587f * ((pixel >> 8) & 0xff)
12750 + 0.114f * ((pixel >> 0) & 0xff) + 0.5f);
12751 expected_colour = (pixel & 0xff000000) | (luminance << 16) | (luminance << 8) | luminance;
12753 "Got unexpected colour %#lx, expected %#lx.\n",
colour, expected_colour);
12756 ID2D1Image_Release(output);
12757 ID2D1Bitmap1_Release(
bitmap);
12761 ID2D1Effect_Release(effect);
12780 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12781 ok(
count > 0,
"Unexpected effect count %u.\n",
count);
12785 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12789 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12790 ok(count2 ==
count + 1,
"Unexpected effect count %u.\n", count2);
12792 effects =
calloc(count2,
sizeof(*effects));
12795 hr = ID2D1Factory1_GetRegisteredEffects(
factory, effects, 0,
NULL, &count3);
12797 ok(count2 == count3,
"Unexpected effect count %u.\n", count3);
12802 ok(!
ret,
"Unexpected count %u.\n",
ret);
12807 ok(
ret == 1,
"Unexpected count %u.\n",
ret);
12808 ok(!
IsEqualGUID(effects, &CLSID_TestEffect),
"Unexpected clsid.\n");
12811 hr = ID2D1Factory1_GetRegisteredEffects(
factory, effects, count2, &
ret,
NULL);
12812 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12813 ok(
ret == count2,
"Unexpected count %u.\n",
ret);
12814 ok(
IsEqualGUID(&effects[
ret - 1], &CLSID_TestEffect),
"Unexpected clsid.\n");
12818 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12819 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12823 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
12824 ok(count2 ==
count,
"Unexpected effect count %u.\n", count2);
12855 win_skip(
"ID2D1Factory1 is not supported.\n");
12860 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
12862 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12864 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
12865 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12868 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12869 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
12871 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12873 count = ID2D1TransformGraph_GetInputCount(
graph);
12874 ok(
count == 1,
"Unexpected input count %u.\n",
count);
12877 hr = ID2D1EffectContext_CreateOffsetTransform(effect_context,
point, &offset_transform);
12878 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12879 hr = ID2D1EffectContext_CreateBlendTransform(effect_context, 2, &blend_desc, &blend_transform);
12880 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12890 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12897 ID2D1TransformGraph_Clear(
graph);
12900 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12904 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12913 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12915 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12919 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12923 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12926 ID2D1TransformGraph_Clear(
graph);
12927 hr = ID2D1TransformGraph_ConnectNode(
graph,
12933 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12934 hr = ID2D1TransformGraph_ConnectNode(
graph,
12939 ID2D1TransformGraph_Clear(
graph);
12941 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12942 hr = ID2D1TransformGraph_ConnectNode(
graph,
12947 ID2D1TransformGraph_Clear(
graph);
12949 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12951 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12952 count = ID2D1BlendTransform_GetInputCount(blend_transform);
12955 hr = ID2D1TransformGraph_ConnectNode(
graph,
12957 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12961 hr = ID2D1TransformGraph_ConnectNode(
graph,
12966 hr = ID2D1TransformGraph_SetPassthroughGraph(
graph, 100);
12969 hr = ID2D1TransformGraph_SetPassthroughGraph(
graph, 0);
12970 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12972 ID2D1BlendTransform_Release(blend_transform);
12973 ID2D1OffsetTransform_Release(offset_transform);
12974 ID2D1Effect_Release(effect);
12975 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
12976 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
12998 win_skip(
"ID2D1Factory1 is not supported.\n");
13003 binding.propertyName =
L"Context";
13006 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
13008 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13010 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
13011 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13013 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
13015 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13020 hr = ID2D1EffectContext_CreateOffsetTransform(effect_context,
offset, &
transform);
13021 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13029 input_count = ID2D1OffsetTransform_GetInputCount(
transform);
13030 ok(input_count == 1,
"Got unexpected input count %u.\n", input_count);
13039 ID2D1OffsetTransform_Release(
transform);
13040 ID2D1Effect_Release(effect);
13041 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
13042 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13046#define check_blend_desc(blend_desc, expected) check_blend_desc_(__LINE__, blend_desc, expected)
13051 "Got unexpected source blend %u, expected %u.\n",
13054 "Got unexpected destination blend %u, expected %u.\n",
13057 "Got unexpected blend operation %u, expected %u.\n",
13060 "Got unexpected source blend alpha %u, expected %u.\n",
13063 "Got unexpected destination blend alpha %u, expected %u.\n",
13066 "Got unexpected blend operation alpha %u, expected %u.\n",
13069 "Got unexpected blendFactor[0] %.8e, expected %.8e.\n",
13072 "Got unexpected blendFactor[1] %.8e, expected %.8e.\n",
13075 "Got unexpected blendFactor[2] %.8e, expected %.8e.\n",
13078 "Got unexpected blendFactor[3] %.8e, expected %.8e.\n",
13100 win_skip(
"ID2D1Factory1 is not supported.\n");
13105 binding.propertyName =
L"Context";
13108 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
13110 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13112 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
13113 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13115 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
13117 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13125 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13126 ID2D1BlendTransform_Release(
transform);
13129 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13136 ID2D1BlendTransform_GetDescription(
transform, &blend_desc);
13140 input_count = ID2D1BlendTransform_GetInputCount(
transform);
13141 ok(input_count == 4,
"Got unexpected input count %u.\n", input_count);
13152 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13158 expected.sourceBlendAlpha = 0xdeadbeef;
13159 expected.destinationBlendAlpha = 0;
13160 expected.blendOperationAlpha = 12345678;
13166 ID2D1BlendTransform_GetDescription(
transform, &blend_desc);
13169 ID2D1BlendTransform_Release(
transform);
13170 ID2D1Effect_Release(effect);
13171 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
13172 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13194 win_skip(
"ID2D1Factory1 is not supported.\n");
13199 binding.propertyName =
L"Context";
13202 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
13204 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13206 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
13207 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13209 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
13211 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13214 hr = ID2D1EffectContext_CreateBorderTransform(effect_context, 0xdeadbeef, 0xdeadbeef, &
transform);
13215 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13222 ok(
mode == 0xdeadbeef,
"Got unexpected extend mode %u.\n",
mode);
13224 ok(
mode == 0xdeadbeef,
"Got unexpected extend mode %u.\n",
mode);
13225 ID2D1BorderTransform_Release(
transform);
13229 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13238 input_count = ID2D1BorderTransform_GetInputCount(
transform);
13239 ok(input_count == 1,
"Got unexpected input count %u.\n", input_count);
13250 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13261 ID2D1BorderTransform_SetExtendModeX(
transform, 0xdeadbeef);
13264 ID2D1BorderTransform_SetExtendModeY(
transform, 0xdeadbeef);
13268 ID2D1BorderTransform_Release(
transform);
13269 ID2D1Effect_Release(effect);
13270 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
13271 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13293 win_skip(
"ID2D1Factory1 is not supported.\n");
13298 binding.propertyName =
L"Context";
13301 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
13303 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13305 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
13306 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13308 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
13310 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13313 hr = ID2D1EffectContext_CreateBoundsAdjustmentTransform(effect_context, &
rect, &
transform);
13314 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13320 ID2D1BoundsAdjustmentTransform_GetOutputBounds(
transform, &
rect);
13322 "Unexpected rectangle.\n");
13325 ID2D1BoundsAdjustmentTransform_SetOutputBounds(
transform, &
rect);
13327 ID2D1BoundsAdjustmentTransform_GetOutputBounds(
transform, &
rect);
13329 "Unexpected rectangle.\n");
13332 input_count = ID2D1BoundsAdjustmentTransform_GetInputCount(
transform);
13333 ok(input_count == 1,
"Got unexpected input count %u.\n", input_count);
13335 ID2D1BoundsAdjustmentTransform_Release(
transform);
13336 ID2D1Effect_Release(effect);
13337 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
13338 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13356 static const struct contains_point_test
13361 float stroke_width;
13365 rectangle_tests[] =
13368 {{{{0.0f}}}, { 0.4f, 10.0f}, 0.0f, 1.0f,
FALSE,
TRUE},
13369 {{{{0.0f}}}, { 0.5f, 10.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13370 {{{{0.0f}}}, { 0.6f, 10.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13373 {{{{0.0f}}}, {-0.6f, 10.0f}, -1.0f, 1.0f,
FALSE,
TRUE},
13374 {{{{0.0f}}}, { 0.6f, 10.0f}, -1.0f, 1.0f,
FALSE,
TRUE},
13375 {{{{0.0f}}}, { 1.4f, 10.0f}, -1.0f, 1.0f,
FALSE,
TRUE},
13376 {{{{0.0f}}}, { 1.5f, 10.0f}, -1.0f, 1.0f,
FALSE,
FALSE},
13379 {{{{0.0f}}}, {-D2D1_DEFAULT_FLATTENING_TOLERANCE - 1.00f, 0.0f}, 0.0f, 2.0f,
FALSE,
FALSE},
13380 {{{{0.0f}}}, {-D2D1_DEFAULT_FLATTENING_TOLERANCE - 1.01f, 0.0f}, 0.0f, 2.0f,
FALSE,
FALSE},
13381 {{{{0.0f}}}, {-D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE},
13383 {{{{0.0f}}}, {-D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE - 1.01f},
13387 {{{{0.0f}}}, { 5.0f, 10.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13390 {{{{0.0f}}}, { 5.0f, 10.0f}, 0.0f, 100.0f,
FALSE,
TRUE},
13393 {{{{0.0f}}}, { 5.0f, 10.0f}, 50.0f, 10.0f,
FALSE,
TRUE},
13398 {{{{0.0f, 0.0f, 0.0f, 1.0f}}}, {0.1f, 10.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13399 {{{{0.0f, 0.0f, 0.0f, 1.0f}}}, {5.0f, 10.0f}, 5.0f, 1.0f,
TRUE,
FALSE},
13400 {{{{0.0f, 0.0f, 0.0f, 1.0f}}}, {4.9f, 10.0f}, 5.0f, 1.0f,
TRUE,
TRUE},
13401 {{{{0.0f, 0.0f, 0.0f, 1.0f}}}, {5.0f, 10.0f}, -5.0f, 1.0f,
TRUE,
FALSE},
13402 {{{{0.0f, 0.0f, 0.0f, 1.0f}}}, {4.9f, 10.0f}, -5.0f, 1.0f,
TRUE,
TRUE},
13405 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.0f, 10.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13406 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.1f, 10.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13407 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.5f, 10.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13408 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.0f, 10.0f}, 1.0f, 1.0f,
TRUE,
TRUE},
13409 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.59f, 10.0f}, 1.0f, 1.0f,
TRUE,
TRUE},
13410 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {-0.59f, 10.0f}, 1.0f, 1.0f,
TRUE,
TRUE},
13411 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {0.59f, 10.0f}, -1.0f, 1.0f,
TRUE,
TRUE},
13412 {{{{1.0f, 0.0f, 0.0f, 1.0f}}}, {-0.59f, 10.0f}, -1.0f, 1.0f,
TRUE,
TRUE},
13415 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 4.4f}, 0.0f, 1.0f,
TRUE,
FALSE},
13416 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 4.6f}, 0.0f, 1.0f,
TRUE,
TRUE},
13417 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 5.4f}, 0.0f, 1.0f,
TRUE,
TRUE},
13418 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 5.6f}, 0.0f, 1.0f,
TRUE,
FALSE},
13421 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 6.9f}, 1.0f, 1.0f,
TRUE,
TRUE},
13422 {{{{1.0f, 1.0f, 0.0f, 1.0f}}}, {5.0f, 7.0f}, 1.0f, 1.0f,
TRUE,
FALSE},
13425 {{{{1.0f, 0.0f, 0.0f, 1.0f, -11.0f, 0.0f}}}, { 5.0f, 20.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13426 {{{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 21.0f}}}, {10.0f, 10.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13427 {{{{1.0f, 0.0f, 0.0f, 1.0f, 11.0f, 0.0f}}}, { 5.0f, 0.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13428 {{{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -21.0f}}}, { 0.0f, 10.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13429 {{{{1.0f, 0.0f, 0.0f, 1.0f, -11.0f, 0.0f}}}, {-6.0f, 20.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13430 {{{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 21.0f}}}, {10.0f, 31.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13431 {{{{1.0f, 0.0f, 0.0f, 1.0f, 11.0f, 0.0f}}}, {16.0f, 0.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13432 {{{{1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -21.0f}}}, { 0.0f, -11.0f}, 0.0f, 1.0f,
TRUE,
TRUE},
13437 {{{{0.0f}}}, {160.0f, 600.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13438 {{{{0.0f}}}, {239.24f, 600.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13439 {{{{0.0f}}}, {239.26f, 600.0f}, 0.0f, 1.0f,
FALSE,
TRUE},
13440 {{{{0.0f}}}, {240.74f, 600.0f}, 0.0f, 1.0f,
FALSE,
TRUE},
13441 {{{{0.0f}}}, {240.76f, 600.0f}, 0.0f, 1.0f,
FALSE,
FALSE},
13444 {{{{0.0f}}}, {239.24f, 600.0f}, -1.0f, 1.0f,
FALSE,
FALSE},
13445 {{{{0.0f}}}, {239.26f, 600.0f}, -1.0f, 1.0f,
FALSE,
TRUE},
13446 {{{{0.0f}}}, {240.74f, 600.0f}, -1.0f, 1.0f,
FALSE,
TRUE},
13447 {{{{0.0f}}}, {240.76f, 600.0f}, -1.0f, 1.0f,
FALSE,
FALSE},
13450 {{{{0.0f}}}, {239.39f, 600.0f}, 0.1f, 1.0f,
FALSE,
FALSE},
13451 {{{{0.0f}}}, {239.41f, 600.0f}, 0.1f, 1.0f,
FALSE,
TRUE},
13452 {{{{0.0f}}}, {240.59f, 600.0f}, 0.1f, 1.0f,
FALSE,
TRUE},
13453 {{{{0.0f}}}, {240.61f, 600.0f}, 0.1f, 1.0f,
FALSE,
FALSE},
13456 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {170.0f, 418.6f}, 0.0f, 1.0f,
TRUE,
TRUE},
13457 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {170.0f, 420.1f}, 0.0f, 1.0f,
TRUE,
FALSE},
13458 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {170.0f, 417.7f}, 0.0f, 1.0f,
TRUE,
FALSE},
13459 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, { 89.5f, 485.3f}, 0.1f, 1.0f,
TRUE,
TRUE},
13460 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, { 90.5f, 485.3f}, 0.1f, 1.0f,
TRUE,
TRUE},
13461 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, { 91.5f, 485.3f}, 0.1f, 1.0f,
TRUE,
FALSE},
13462 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, { 89.0f, 485.3f}, 0.1f, 1.0f,
TRUE,
FALSE},
13463 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {167.0f, 729.8f}, 0.0f, 1.0f,
TRUE,
TRUE},
13464 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {167.0f, 728.6f}, 0.0f, 1.0f,
TRUE,
FALSE},
13465 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {167.0f, 731.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13466 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {173.0f, 729.8f}, 0.0f, 1.0f,
TRUE,
TRUE},
13467 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {173.0f, 728.6f}, 0.0f, 1.0f,
TRUE,
FALSE},
13468 {{{{1.0f, 0.0f, 0.0f, 1.0f, 10.0f, 10.0f}}}, {173.0f, 731.0f}, 0.0f, 1.0f,
TRUE,
FALSE},
13472 {{{{0.0f}}}, {306.97f, 791.67f}, 0.0f, 1.0f,
FALSE,
FALSE},
13473 {{{{0.0f}}}, {307.27f, 791.67f}, 0.0f, 1.0f,
FALSE,
TRUE},
13474 {{{{0.0f}}}, {308.47f, 791.67f}, 0.0f, 1.0f,
FALSE,
TRUE},
13475 {{{{0.0f}}}, {308.77f, 791.67f}, 0.0f, 1.0f,
FALSE,
FALSE},
13477 {{{{0.0f}}}, {350.00f, 824.10f}, 0.0f, 1.0f,
FALSE,
FALSE},
13478 {{{{0.0f}}}, {350.00f, 824.40f}, 0.0f, 1.0f,
FALSE,
TRUE},
13479 {{{{0.0f}}}, {350.00f, 825.60f}, 0.0f, 1.0f,
FALSE,
TRUE},
13480 {{{{0.0f}}}, {350.00f, 825.90f}, 0.0f, 1.0f,
FALSE,
FALSE},
13482 {{{{0.0f}}}, {391.23f, 791.67f}, 0.0f, 1.0f,
FALSE,
FALSE},
13483 {{{{0.0f}}}, {391.53f, 791.67f}, 0.0f, 1.0f,
FALSE,
TRUE},
13484 {{{{0.0f}}}, {392.73f, 791.67f}, 0.0f, 1.0f,
FALSE,
TRUE},
13485 {{{{0.0f}}}, {393.03f, 791.67f}, 0.0f, 1.0f,
FALSE,
FALSE},
13488 {{{{0.0f}}}, {570.23f, 799.77f}, 0.0f, 1.0f,
FALSE,
FALSE},
13489 {{{{0.0f}}}, {570.53f, 799.77f}, 0.0f, 1.0f,
FALSE,
TRUE},
13490 {{{{0.0f}}}, {571.73f, 799.77f}, 0.0f, 1.0f,
FALSE,
TRUE},
13491 {{{{0.0f}}}, {572.03f, 799.77f}, 0.0f, 1.0f,
FALSE,
FALSE},
13493 {{{{0.0f}}}, {600.00f, 824.10f}, 0.0f, 1.0f,
FALSE,
FALSE},
13494 {{{{0.0f}}}, {600.00f, 824.40f}, 0.0f, 1.0f,
FALSE,
TRUE},
13495 {{{{0.0f}}}, {600.00f, 825.60f}, 0.0f, 1.0f,
FALSE,
TRUE},
13496 {{{{0.0f}}}, {600.00f, 825.90f}, 0.0f, 1.0f,
FALSE,
FALSE},
13498 {{{{0.0f}}}, {627.97f, 799.77f}, 0.0f, 1.0f,
FALSE,
FALSE},
13499 {{{{0.0f}}}, {628.27f, 799.77f}, 0.0f, 1.0f,
FALSE,
TRUE},
13500 {{{{0.0f}}}, {629.47f, 799.77f}, 0.0f, 1.0f,
FALSE,
TRUE},
13501 {{{{0.0f}}}, {629.77f, 799.77f}, 0.0f, 1.0f,
FALSE,
FALSE},
13505 {{{{0.0f}}}, {825.00f, 800.00f}, 0.0f, 1.0f,
FALSE,
TRUE},
13506 {{{{0.0f}}}, {861.00f, 824.00f}, 0.0f, 1.0f,
FALSE,
TRUE},
13507 {{{{0.0f}}}, {861.00f, 826.00f}, 0.0f, 1.0f,
FALSE,
FALSE},
13508 {{{{0.0f}}}, {862.50f, 825.00f}, 0.0f, 1.0f,
FALSE,
TRUE},
13509 {{{{0.0f}}}, {864.00f, 824.00f}, 0.0f, 1.0f,
FALSE,
FALSE},
13510 {{{{0.0f}}}, {864.00f, 826.00f}, 0.0f, 1.0f,
FALSE,
FALSE},
13513 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, { 837.2f, 600.0f}, 0.1f, 5.0f,
TRUE,
FALSE},
13514 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, { 837.5f, 600.0f}, 0.1f, 5.0f,
TRUE,
TRUE},
13515 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1186.3f, 791.7f}, 0.1f, 5.0f,
TRUE,
TRUE},
13516 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1186.6f, 791.7f}, 0.1f, 5.0f,
TRUE,
FALSE},
13517 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1425.0f, 827.3f}, 0.1f, 5.0f,
TRUE,
TRUE},
13518 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1425.0f, 827.6f}, 0.1f, 5.0f,
TRUE,
FALSE},
13519 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1620.1f, 800.0f}, 0.1f, 5.0f,
TRUE,
FALSE},
13520 {{{{1.0f, 0.0f, 1.0f, 1.0f}}}, {1620.4f, 800.0f}, 0.1f, 5.0f,
TRUE,
TRUE},
13522 transformed_tests[] =
13525 {{{{0.0f}}}, {0.74f, 2.5f}, 0.0f, 1.0f,
FALSE,
TRUE},
13526 {{{{0.0f}}}, {0.75f, 2.5f}, 0.0f, 1.0f,
FALSE,
FALSE},
13529 {{{{0.0f}}}, {0.74f, 2.5f}, -1.0f, 1.0f,
FALSE,
TRUE},
13530 {{{{0.0f}}}, {0.75f, 2.5f}, -1.0f, 1.0f,
FALSE,
FALSE},
13533 {{{{0.0f}}}, {0.501f, 2.5f}, 0.001f, 1.0f,
FALSE,
TRUE},
13534 {{{{0.0f}}}, {0.502f, 2.5f}, 0.001f, 1.0f,
FALSE,
FALSE},
13537 {{{{0.0f}}}, {0.74f, 2.5f}, 0.25f, 1.0f,
FALSE,
TRUE},
13538 {{{{0.0f}}}, {0.75f, 2.5f}, 0.25f, 1.0f,
FALSE,
FALSE},
13545 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &rectangle);
13546 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13549 const struct contains_point_test *
test = &rectangle_tests[
i];
13553 contains = !
test->contains;
13554 hr = ID2D1RectangleGeometry_StrokeContainsPoint(rectangle,
test->point,
test->stroke_width,
13556 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13557 ok(contains ==
test->contains,
"Got unexpected result %#x.\n", contains);
13561 ID2D1RectangleGeometry_Release(rectangle);
13563 hr = ID2D1Factory_CreatePathGeometry(
ctx.factory, &
path);
13564 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13566 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13571 cubic_to(
sink, 119.0f, 720.0f, 83.0f, 600.0f, 80.0f, 474.0f);
13572 cubic_to(
sink, 78.0f, 349.0f, 108.0f, 245.0f, 135.0f, 240.0f);
13573 cubic_to(
sink, 163.0f, 235.0f, 180.0f, 318.0f, 176.0f, 370.0f);
13574 cubic_to(
sink, 171.0f, 422.0f, 149.0f, 422.0f, 144.0f, 370.0f);
13575 cubic_to(
sink, 140.0f, 318.0f, 157.0f, 235.0f, 185.0f, 240.0f);
13576 cubic_to(
sink, 212.0f, 245.0f, 242.0f, 349.0f, 240.0f, 474.0f);
13577 cubic_to(
sink, 238.0f, 600.0f, 201.0f, 720.0f, 160.0f, 720.0f);
13592 cubic_to(
sink, 250.0f, 850.0f, 450.0f, 850.0f, 375.0f, 750.0f);
13598 cubic_to(
sink, 500.0f, 850.0f, 700.0f, 850.0f, 600.0f, 750.0f);
13604 cubic_to(
sink, 900.0f, 850.0f, 900.0f, 850.0f, 750.0f, 750.0f);
13607 hr = ID2D1GeometrySink_Close(
sink);
13608 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13609 ID2D1GeometrySink_Release(
sink);
13613 const struct contains_point_test *
test = &path_tests[
i];
13617 contains = !
test->contains;
13618 hr = ID2D1PathGeometry_StrokeContainsPoint(
path,
test->point,
test->stroke_width,
13620 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13621 ok(contains ==
test->contains,
"Got unexpected result %#x.\n", contains);
13626 ID2D1PathGeometry_Release(
path);
13629 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &rectangle);
13630 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13634 &transformed_geometry);
13635 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13639 const struct contains_point_test *
test = &transformed_tests[
i];
13643 contains = !
test->contains;
13644 hr = ID2D1TransformedGeometry_StrokeContainsPoint(transformed_geometry,
test->point,
13647 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13648 ok(contains ==
test->contains,
"Got unexpected result %#x.\n", contains);
13652 ID2D1TransformedGeometry_Release(transformed_geometry);
13653 ID2D1RectangleGeometry_Release(rectangle);
13666 float dpi_x, dpi_y;
13672 const struct bitmap_bounds_test
13678 bitmap_bounds_tests[] =
13680 {96.0f, 96.0f, {100, 100}},
13681 {48.0f, 48.0f, {100, 100}},
13682 {192.0f, 192.0f, {100, 100}},
13683 {96.0f, 10.0f, {100, 100}},
13684 {50.0f, 100.0f, {100, 100}},
13685 {150.0f, 150.0f, {100, 100}},
13686 {48.0f, 48.0f, {1, 1}},
13687 {192.0f, 192.0f, {1, 1}},
13696 win_skip(
"ID2D1Factory1 is not supported.\n");
13705 const struct bitmap_bounds_test *
test = &bitmap_bounds_tests[
i];
13712 hr = ID2D1RenderTarget_CreateBitmap(
ctx.rt,
test->pixel_size,
NULL, 0, &bitmap_desc, &
bitmap);
13713 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13715 set_rect(&bounds, 0.0f, 0.0f, 0.0f, 0.0f);
13718 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13720 "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n",
13724 ID2D1DeviceContext_GetDpi(
context, &dpi_x, &dpi_y);
13725 ID2D1DeviceContext_SetDpi(
context, dpi_x * 2.0f, dpi_y * 2.0f);
13727 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13729 "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n",
13731 ID2D1DeviceContext_SetDpi(
context, dpi_x, dpi_y);
13734 unit_mode = ID2D1DeviceContext_GetUnitMode(
context);
13738 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13740 "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}, expected {%.8e, %.8e, %.8e, %.8e}.\n",
13742 (
float)
test->pixel_size.width, (
float)
test->pixel_size.height);
13743 ID2D1DeviceContext_SetUnitMode(
context, unit_mode);
13745 ID2D1Bitmap_Release(
bitmap);
13754 static const struct
13757 } invalid_map_options[] =
13764 static const struct
13767 } valid_map_options[] =
13771 static const struct
13773 unsigned int bind_flags;
13776 } options_tests[] =
13778 { D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE,
13790 D3D11_TEXTURE2D_DESC texture_desc;
13810 bitmap_desc.
dpiX = 96.0f;
13811 bitmap_desc.
dpiY = 96.0f;
13817 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13827 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13828 hr = IDXGISurface_QueryInterface(
surface, &IID_ID3D11Texture2D, (
void **)&
texture);
13829 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13830 ID3D11Texture2D_GetDesc(
texture, &texture_desc);
13831 ok(!texture_desc.CPUAccessFlags,
"Unexpected CPU access flags %#x.\n", texture_desc.CPUAccessFlags);
13832 ID3D11Texture2D_Release(
texture);
13833 IDXGISurface_Release(
surface);
13835 ID2D1Bitmap1_Release(
bitmap);
13845 bitmap_desc.
dpiX = 96.0f;
13846 bitmap_desc.
dpiY = 96.0f;
13852 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13858 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13866 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13880 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13881 hr = IDXGISurface_QueryInterface(
surface, &IID_ID3D11Texture2D, (
void **)&
texture);
13882 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13883 ID3D11Texture2D_GetDesc(
texture, &texture_desc);
13884 ok(texture_desc.Usage == D3D11_USAGE_STAGING,
"Unexpected usage %u.\n", texture_desc.Usage);
13885 ok(!texture_desc.BindFlags,
"Unexpected bind flags %#x.\n", texture_desc.BindFlags);
13886 ok(texture_desc.CPUAccessFlags == D3D11_CPU_ACCESS_READ,
"Unexpected CPU access flags %#x.\n",
13887 texture_desc.CPUAccessFlags);
13888 ok(!texture_desc.MiscFlags,
"Unexpected misc flags %#x.\n", texture_desc.MiscFlags);
13889 ID3D11Texture2D_Release(
texture);
13890 IDXGISurface_Release(
surface);
13892 ID2D1Bitmap1_Release(
bitmap);
13897 hr = IDXGIDevice_QueryInterface(
ctx.device, &IID_ID3D11Device, (
void **)&
d3d_device);
13898 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13900 texture_desc.Width = 4;
13901 texture_desc.Height = 4;
13902 texture_desc.MipLevels = 1;
13903 texture_desc.ArraySize = 1;
13905 texture_desc.SampleDesc.Count = 1;
13906 texture_desc.SampleDesc.Quality = 0;
13907 texture_desc.Usage = D3D11_USAGE_STAGING;
13908 texture_desc.BindFlags = 0;
13909 texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
13910 texture_desc.MiscFlags = 0;
13913 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13914 hr = ID3D11Texture2D_QueryInterface(
texture, &IID_IDXGISurface, (
void **)&
surface);
13915 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13918 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
13919 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13924 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13926 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13929 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13931 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13934 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13936 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13945 ID2D1Bitmap1_Release(
bitmap);
13950 bitmap_desc.
dpiX = bitmap_desc.
dpiY = 0.0f;
13951 hr = ID2D1DeviceContext_CreateSharedBitmap(
ctx.context, &IID_IDXGISurface,
surface,
13953 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13956 hr = ID2D1DeviceContext_CreateSharedBitmap(
ctx.context, &IID_ID2D1Bitmap,
bitmap2,
NULL, &bitmap3);
13957 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13959 ID2D1Bitmap_Release(bitmap3);
13961 ID2D1Bitmap_Release(
bitmap2);
13964 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13967 "Unexpected options %#x.\n",
options);
13968 ID2D1Bitmap1_Release(
bitmap);
13972 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
13975 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
13979 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
13984 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
13985 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
13988 ID2D1Bitmap1_Release(
bitmap);
13990 ID3D11Texture2D_Release(
texture);
13991 IDXGISurface_Release(
surface);
13997 texture_desc.Width = 4;
13998 texture_desc.Height = 4;
13999 texture_desc.MipLevels = 1;
14000 texture_desc.ArraySize = 1;
14002 texture_desc.SampleDesc.Count = 1;
14003 texture_desc.SampleDesc.Quality = 0;
14004 texture_desc.Usage = D3D11_USAGE_DEFAULT;
14005 texture_desc.BindFlags = options_tests[
i].bind_flags;
14006 texture_desc.CPUAccessFlags = 0;
14007 texture_desc.MiscFlags = 0;
14010 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14011 hr = ID3D11Texture2D_QueryInterface(
texture, &IID_IDXGISurface, (
void **)&
surface);
14012 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14016 hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(
ctx.context,
surface, &bitmap_desc, &
bitmap);
14017 ok(
hr == options_tests[
i].
hr,
"Got unexpected hr %#lx.\n",
hr);
14021 ID2D1Bitmap1_Release(
bitmap);
14024 ID3D11Texture2D_Release(
texture);
14025 IDXGISurface_Release(
surface);
14037 static const struct
14040 } invalid_options[] =
14046 static const struct
14049 } valid_options[] =
14073 bitmap_desc.
dpiX = 96.0f;
14074 bitmap_desc.
dpiY = 96.0f;
14090 bitmap_desc.
dpiX = 96.0f;
14091 bitmap_desc.
dpiY = 96.0f;
14097 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14098 ID2D1Bitmap1_Release(
bitmap);
14108 static const unsigned int target_types[] =
14114 static const unsigned int usages[] =
14160 ok(!!
window,
"Failed to create test window.\n");
14165 template_desc.
dpiX = 96.0f;
14166 template_desc.
dpiY = 96.0f;
14176 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &template_desc, &hwnd_rt_desc, &
rt);
14177 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14178 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &template_desc);
14179 ok(supported,
"Expected supported.\n");
14180 ID2D1HwndRenderTarget_Release(
rt);
14183 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &template_desc, &hwnd_rt_desc, &
rt);
14184 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14185 hr = ID2D1HwndRenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
14186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14188 test_desc = template_desc;
14190 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14191 ok(!supported,
"Expected unsupported.\n");
14193 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
14194 bitmap_desc.
pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
14198 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
14199 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14201 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14202 ok(!supported,
"Expected unsupported.\n");
14203 ID2D1Bitmap1_Release(
bitmap);
14206 test_desc = template_desc;
14209 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14210 ok(!supported,
"Expected unsupported.\n");
14212 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
14218 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
14219 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14221 pixel_format = ID2D1DeviceContext_GetPixelFormat(device_context);
14224 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14225 ok(supported,
"Expected supported.\n");
14226 ID2D1Bitmap1_Release(
bitmap);
14228 ID2D1DeviceContext_Release(device_context);
14229 ID2D1HwndRenderTarget_Release(
rt);
14235 desc = template_desc;
14236 desc.type = target_types[
i];
14237 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &
rt);
14240 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14242 test_desc = template_desc;
14244 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14245 ok(supported,
"Unexpected return value %d.\n", supported);
14256 test_desc = template_desc;
14257 test_desc.
type = target_types[
j];
14258 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14260 || target_types[
i] == target_types[
j];
14261 ok(supported ==
expected,
"Unexpected return value %d.\n", supported);
14267 ID2D1HwndRenderTarget_Release(
rt);
14273 desc = template_desc;
14275 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &
rt);
14276 ok(
hr ==
S_OK,
"%u: unexpected hr %#lx.\n",
i,
hr);
14281 if (
desc.pixelFormat.alphaMode == D2D1_ALPHA_MODE_UNKNOWN)
14282 desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
14290 test_desc = template_desc;
14292 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14296 alpha_mode_supported =
pixel_formats[
j].alphaMode == D2D1_ALPHA_MODE_UNKNOWN
14299 ok(supported ==
expected,
"Unexpected return value.\n");
14304 for (
j = 0;
j <
ARRAY_SIZE(unsupported_pixel_formats); ++
j)
14306 test_desc = template_desc;
14308 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &test_desc);
14309 ok(!supported,
"Unexpected return value.\n");
14312 ID2D1HwndRenderTarget_Release(
rt);
14318 desc = template_desc;
14320 hr = ID2D1Factory_CreateHwndRenderTarget(
ctx.factory, &
desc, &hwnd_rt_desc, &
rt);
14321 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14327 desc = template_desc;
14329 supported = ID2D1HwndRenderTarget_IsSupported(
rt, &
desc);
14331 ok(supported ==
expected,
"Unexpected result %d.\n", supported);
14336 ID2D1HwndRenderTarget_Release(
rt);
14346 static const unsigned int target_types[] =
14352 static const unsigned int usages[] =
14400 template_desc.
dpiX = 96.0f;
14401 template_desc.
dpiY = 96.0f;
14406 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &template_desc, &
rt);
14407 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14408 supported = ID2D1DCRenderTarget_IsSupported(
rt, &template_desc);
14409 ok(supported,
"Expected supported.\n");
14410 ID2D1DCRenderTarget_Release(
rt);
14413 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &template_desc, &
rt);
14414 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14415 hr = ID2D1DCRenderTarget_QueryInterface(
rt, &IID_ID2D1DeviceContext, (
void **)&device_context);
14416 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14418 test_desc = template_desc;
14420 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14421 ok(supported,
"Expected unsupported.\n");
14423 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
14424 bitmap_desc.
pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
14428 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
14429 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14431 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14432 ok(supported,
"Expected unsupported.\n");
14433 ID2D1Bitmap1_Release(
bitmap);
14436 test_desc = template_desc;
14439 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14440 ok(!supported,
"Expected unsupported.\n");
14442 memset(&bitmap_desc, 0,
sizeof(bitmap_desc));
14448 hr = ID2D1DeviceContext_CreateBitmap(device_context,
size,
NULL, 0, &bitmap_desc, &
bitmap);
14449 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14451 pixel_format = ID2D1DeviceContext_GetPixelFormat(device_context);
14454 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14455 ok(supported,
"Expected supported.\n");
14456 ID2D1Bitmap1_Release(
bitmap);
14458 ID2D1DeviceContext_Release(device_context);
14459 ID2D1DCRenderTarget_Release(
rt);
14465 desc = template_desc;
14466 desc.type = target_types[
i];
14467 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
14470 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14472 test_desc = template_desc;
14474 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14475 ok(supported,
"Unexpected return value %d.\n", supported);
14486 test_desc = template_desc;
14487 test_desc.
type = target_types[
j];
14488 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14490 || target_types[
i] == target_types[
j];
14491 ok(supported ==
expected,
"Unexpected return value %d.\n", supported);
14497 ID2D1DCRenderTarget_Release(
rt);
14503 desc = template_desc;
14505 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
14512 ok(
hr ==
S_OK,
"%u: unexpected hr %#lx.\n",
i,
hr);
14520 test_desc = template_desc;
14522 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14526 alpha_mode_supported =
pixel_formats[
j].alphaMode == D2D1_ALPHA_MODE_UNKNOWN
14529 ok(supported ==
expected,
"Unexpected return value.\n");
14534 for (
j = 0;
j <
ARRAY_SIZE(unsupported_pixel_formats); ++
j)
14538 test_desc = template_desc;
14540 supported = ID2D1DCRenderTarget_IsSupported(
rt, &test_desc);
14541 ok(!supported,
"Unexpected return value.\n");
14546 ID2D1DCRenderTarget_Release(
rt);
14552 desc = template_desc;
14554 hr = ID2D1Factory_CreateDCRenderTarget(
ctx.factory, &
desc, &
rt);
14555 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14561 desc = template_desc;
14563 supported = ID2D1DCRenderTarget_IsSupported(
rt, &
desc);
14565 ok(supported ==
expected,
"Unexpected result %d.\n", supported);
14570 ID2D1DCRenderTarget_Release(
rt);
14584 return ID2D1TransformGraph_SetSingleTransformNode(
graph,
14624 UINT32 input_rect_count)
14626 if (input_rect_count != 1)
14629 input_rects[0] = *output_rect;
14637 if (input_rect_count != 1)
14640 *output_rect = input_rects[0];
14641 memset(output_opaque_rect, 0,
sizeof(*output_opaque_rect));
14649 ok(0,
"Unexpected call.\n");
14677 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14684 ID2D1VertexBuffer_Release(
buffer);
14706 if (!(
object =
calloc(1,
sizeof(*
object))))
14711 object->refcount = 1;
14743 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14745 hr = ID2D1DeviceContext_CreateEffect(
context, &CLSID_AuxEffect, &effect);
14746 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14748 hr = ID2D1Effect_GetValueByName(effect,
L"Context",
14750 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14754 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14759 ID3D10Blob_GetBufferPointer(
blob), ID3D10Blob_GetBufferSize(
blob));
14760 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14763 ok(0,
"Unexpected target %s.\n",
target);
14765 ID3D10Blob_Release(
blob);
14767 ID2D1Effect_Release(effect);
14769 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_AuxEffect);
14770 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14776 L"<?xml version='1.0'?> \
14778 <Property name='DisplayName' type='string' value='PSEffect'/> \
14779 <Property name='Author' type='string' value='The Wine Project'/> \
14780 <Property name='Category' type='string' value='Test'/> \
14781 <Property name='Description' type='string' value='Test effect.'/> \
14783 <Input name='Source'/> \
14785 <Property name='Context' type='iunknown'> \
14786 <Property name='DisplayName' type='string' value='Context'/> \
14791 static const char ps_code[] =
14792 "float4 main() : sv_target\n"
14794 " return float4(0.1, 0.2, 0.3, 0.4);\n"
14818 win_skip(
"ID2D1Factory1 is not supported.\n");
14827 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
description, bindings,
14829 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14831 hr = ID2D1DeviceContext_CreateEffect(
context, &CLSID_TestEffect, &effect);
14832 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14835 pixel = 0xabcd00ff;
14838 bitmap_desc.
dpiX = 96.0f;
14839 bitmap_desc.
dpiY = 96.0f;
14842 hr = ID2D1DeviceContext_CreateBitmap(
context, input_size, &pixel,
sizeof(pixel),
14844 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14847 ID2D1Effect_GetOutput(effect, &output);
14849 ID2D1DeviceContext_BeginDraw(
context);
14850 ID2D1DeviceContext_Clear(
context, 0);
14853 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14857 expected_colour = 0x661a334c;
14859 "Got unexpected colour %#lx, expected %#lx.\n",
colour, expected_colour);
14862 ID2D1Image_Release(output);
14863 ID2D1Bitmap1_Release(
bitmap);
14865 ID2D1Effect_Release(effect);
14896 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14898 ok(refcount == 2,
"Unexpected refcount %lu.\n", refcount);
14900 hr = ID2D1Factory1_GetEffectProperties(
factory, &CLSID_D2D1Crop, &properties2);
14901 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14902 ok(
properties == properties2,
"Unexpected instance.\n");
14904 ok(refcount == 3,
"Unexpected refcount %lu.\n", refcount);
14905 ID2D1Properties_Release(properties2);
14909 ok(
count == 2,
"Unexpected property count %u.\n",
count);
14912 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14916 ok(
count == 4,
"Unexpected name length %u.\n",
count);
14937 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
14950 hr = ID2D1DeviceContext_CreateEffect(device_context,
id, effect);
14951 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14953 if (effect_context)
14955 *effect_context =
NULL;
14957 (
BYTE *)effect_context,
sizeof*(effect_context));
14958 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
14964 static const char custom_vs_code[] =
14967 " float4 clipSpaceOutput : SV_POSITION;"
14968 " float4 sceneSpaceOutput : SCENE_POSITION;"
14969 " float4 texelSpaceInput0 : TEXCOORD0;"
14971 "vs_out main(float2 position : CUSTOM_POSITION)"
14973 " vs_out output = (vs_out)0;"
15003 win_skip(
"ID2D1Factory1 is not supported.\n");
15008 binding.propertyName =
L"Context";
15011 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
15013 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15022 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc,
NULL,
NULL, &
buffer);
15023 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15024 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc,
NULL,
NULL, &buffer2);
15025 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15026 ok(
buffer != buffer2,
"Unexpected buffer instance.\n");
15027 ID2D1VertexBuffer_Release(buffer2);
15033 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15035 ok(!!
ptr,
"Unexpected pointer.\n");
15036 hr = ID2D1VertexBuffer_Unmap(
buffer);
15038 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15045 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15047 ok(!!
ptr,
"Unexpected pointer.\n");
15048 hr = ID2D1VertexBuffer_Unmap(
buffer);
15050 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15055 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15057 ok(!!
ptr,
"Unexpected pointer.\n");
15061 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15062 ok(
ptr == ptr2,
"Unexpected pointer.\n");
15063 hr = ID2D1VertexBuffer_Unmap(
buffer);
15065 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15067 ID2D1VertexBuffer_Release(
buffer);
15070 buffer = (
void *)0xdeadbeef;
15075 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc, &
GUID_NULL,
NULL, &
buffer);
15076 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15077 hr = ID2D1EffectContext_FindVertexBuffer(effect_context, &
GUID_NULL, &buffer2);
15078 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15079 ok(
buffer == buffer2,
"Unexpected buffer instance.\n");
15080 ID2D1VertexBuffer_Release(buffer2);
15083 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc, &
GUID_NULL,
NULL, &buffer2);
15084 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15085 ok(
buffer == buffer2,
"Unexpected buffer instance.\n");
15086 ID2D1VertexBuffer_Release(buffer2);
15089 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc, &
GUID_NULL,
NULL, &buffer2);
15090 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15091 ok(
buffer == buffer2,
"Unexpected buffer instance.\n");
15092 ID2D1VertexBuffer_Release(buffer2);
15094 ID2D1VertexBuffer_Release(
buffer);
15098 "main",
"vs_4_0", 0, 0, &
vs,
NULL);
15099 ok(
hr ==
S_OK,
"Unexpected hr %#lx.\n",
hr);
15107 hr = ID2D1EffectContext_CreateVertexBuffer(effect_context, &buffer_desc,
15108 &GUID_CustomVertexBuffer, &custom_buffer_desc, &
buffer);
15109 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15111 hr = ID2D1EffectContext_FindVertexBuffer(effect_context, &GUID_CustomVertexBuffer, &buffer2);
15112 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15113 ID2D1VertexBuffer_Release(buffer2);
15115 ID2D1VertexBuffer_Release(
buffer);
15117 ID3D10Blob_Release(
vs);
15121 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15124 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15126 create_effect(device_context, &CLSID_TestEffect, &effect_context, &effect2);
15128 hr = ID2D1EffectContext_FindVertexBuffer(effect_context, &GUID_CustomVertexBuffer, &
buffer);
15131 ID2D1Effect_Release(effect2);
15133 ID2D1DeviceContext_Release(device_context);
15134 ID2D1Device_Release(
device);
15137 ID2D1DeviceContext_GetDevice(
ctx.context, &
device);
15140 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15142 create_effect(device_context, &CLSID_TestEffect, &effect_context, &effect2);
15144 hr = ID2D1EffectContext_FindVertexBuffer(effect_context, &GUID_CustomVertexBuffer, &
buffer);
15147 ID2D1Effect_Release(effect2);
15149 ID2D1DeviceContext_Release(device_context);
15151 ID2D1Device_Release(
device);
15153 ID2D1Effect_Release(effect);
15154 hr = ID2D1Factory1_UnregisterEffect(
factory, &CLSID_TestEffect);
15155 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15175 hr = ID2D1Factory_CreateEllipseGeometry(
ctx.factory, &ellipse, &ellipse_geometry);
15176 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15178 hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry,
NULL, 0.01f, &
area);
15180 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15184 hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry,
NULL, 200.0f, &
area);
15186 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15192 hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry, &
matrix, 0.01f, &
area);
15194 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15198 hr = ID2D1EllipseGeometry_ComputeArea(ellipse_geometry, &
matrix, 200.0f, &
area);
15200 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15204 ID2D1EllipseGeometry_Release(ellipse_geometry);
15208 hr = ID2D1Factory_CreateRectangleGeometry(
ctx.factory, &
rect, &rectangle_geometry);
15209 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15211 hr = ID2D1RectangleGeometry_ComputeArea(rectangle_geometry,
NULL, 0.01f, &
area);
15213 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15217 hr = ID2D1RectangleGeometry_ComputeArea(rectangle_geometry,
NULL, 200.0f, &
area);
15219 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15225 hr = ID2D1RectangleGeometry_ComputeArea(rectangle_geometry, &
matrix, 0.01f, &
area);
15227 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15232 hr = ID2D1RectangleGeometry_ComputeArea(rectangle_geometry, &
matrix, 200.0f, &
area);
15234 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15239 hr = ID2D1RectangleGeometry_ComputeArea(rectangle_geometry, &
matrix, 200.0f, &
area);
15241 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15245 ID2D1RectangleGeometry_Release(rectangle_geometry);
15252 static const struct
15258 wic_target_formats[] =
15261 &GUID_WICPixelFormat32bppPBGRA },
15263 &GUID_WICPixelFormat32bppBGR },
15265 &GUID_WICPixelFormat32bppPBGRA },
15267 &GUID_WICPixelFormat32bppBGR },
15270 &GUID_WICPixelFormat32bppPBGRA },
15272 &GUID_WICPixelFormat32bppBGR },
15274 &GUID_WICPixelFormat32bppPBGRA },
15276 &GUID_WICPixelFormat32bppBGR },
15279 &GUID_WICPixelFormat32bppPRGBA },
15281 &GUID_WICPixelFormat32bppRGB },
15283 &GUID_WICPixelFormat32bppPRGBA },
15285 &GUID_WICPixelFormat32bppRGB },
15288 &GUID_WICPixelFormat32bppPRGBA },
15290 &GUID_WICPixelFormat32bppRGB },
15292 &GUID_WICPixelFormat32bppPRGBA },
15294 &GUID_WICPixelFormat32bppRGB },
15323 &IID_IWICImagingFactory, (
void **)&wic_factory);
15324 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15330 hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
15332 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15335 rt_desc.
pixelFormat = wic_target_formats[
i].pixel_format;
15336 rt_desc.
dpiX = 96.0f;
15337 rt_desc.
dpiY = 96.0f;
15340 hr = ID2D1Factory_CreateWicBitmapRenderTarget(
ctx.factory, wic_bitmap, &rt_desc, &
rt);
15342 ok(
hr == wic_target_formats[
i].
hr,
"Got unexpected hr %#lx.\n",
hr);
15344 IWICBitmap_Release(wic_bitmap);
15347 ID2D1RenderTarget_Release(
rt);
15351 IWICImagingFactory_Release(wic_factory);
15376 win_skip(
"ID2D1Factory1 is not supported.\n");
15381 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect,
15383 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15385 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect, &effect);
15386 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15388 index = ID2D1Effect_GetPropertyIndex(effect,
L"BlobProp");
15389 ok(
index != D2D1_INVALID_PROPERTY_INDEX,
"Invalid property index.\n");
15391 size = ID2D1Effect_GetValueSize(effect,
index);
15392 ok(!
size,
"Unexpected property size %u.\n",
size);
15395 (
const BYTE *)
"blob-value", 11);
15396 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15398 size = ID2D1Effect_GetValueSize(effect,
index);
15399 ok(
size == 11,
"Unexpected property size %u.\n",
size);
15401 ID2D1Effect_Release(effect);
15404 hr = ID2D1Factory1_RegisterEffectFromString(
factory, &CLSID_TestEffect2,
15406 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15408 hr = ID2D1DeviceContext_CreateEffect(
ctx.context, &CLSID_TestEffect2, &effect);
15409 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15411 index = ID2D1Effect_GetPropertyIndex(effect,
L"BlobProp");
15412 ok(
index != D2D1_INVALID_PROPERTY_INDEX,
"Invalid property index.\n");
15414 size = ID2D1Effect_GetValueSize(effect,
index);
15415 ok(!
size,
"Unexpected property size %u.\n",
size);
15418 (
const BYTE *)
"blob-value", 11);
15421 size = ID2D1Effect_GetValueSize(effect,
index);
15422 ok(!
size,
"Unexpected property size %u.\n",
size);
15426 ok(
hr ==
S_OK,
"Got unexpected hr %#lx.\n",
hr);
15427 ok(!*
buffer,
"Unexpected buffer contents.\n");
15428 ok(!*(
buffer+1),
"Unexpected buffer contents.\n");
15429 ok(!*(
buffer+2),
"Unexpected buffer contents.\n");
15430 ok(!*(
buffer+3),
"Unexpected buffer contents.\n");
15431 ok(*(
buffer+4) == 0xa,
"Unexpected buffer contents.\n");
15434 (
const BYTE *)
"new-value", 0);
15438 (
const BYTE *)
"new-value", 1);
15441 size = ID2D1Effect_GetValueSize(effect,
index);
15442 ok(!
size,
"Unexpected property size %u.\n",
size);
15444 ID2D1Effect_Release(effect);
15452 unsigned int argc,
i;
15455 pD2D1CreateDevice = (
void *)
GetProcAddress(d2d1_dll,
"D2D1CreateDevice");
15458 pD2D1Vec3Length = (
void *)
GetProcAddress(d2d1_dll,
"D2D1Vec3Length");
15459 pD2D1ConvertColorSpace = (
void *)
GetProcAddress(d2d1_dll,
"D2D1ConvertColorSpace");
_STLP_MOVE_TO_STD_NAMESPACE void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last)
#define InterlockedIncrement
#define InterlockedDecrement
#define STDMETHODCALLTYPE
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
static void test_effect_properties(BOOL d3d11)
static void geometry_sink_init(struct geometry_sink *sink)
static void test_device_context(BOOL d3d11)
static void test_draw_geometry(BOOL d3d11)
static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL has_surface, DWORD expected_options)
static HRESULT STDMETHODCALLTYPE effect_impl_get_graph(const IUnknown *iface, BYTE *data, UINT32 data_size, UINT32 *actual_size)
static void test_compute_geometry_area(BOOL d3d11)
static void test_unit_mode(BOOL d3d11)
static void test_wic_gdi_interop(BOOL d3d11)
static void create_effect(ID2D1DeviceContext *device_context, const GUID *id, ID2D1EffectContext **effect_context, ID2D1Effect **effect)
static void test_stroke_contains_point(BOOL d3d11)
static HRESULT STDMETHODCALLTYPE effect_impl_Initialize(ID2D1EffectImpl *iface, ID2D1EffectContext *context, ID2D1TransformGraph *graph)
static HRESULT STDMETHODCALLTYPE ps_effect_impl_Initialize(ID2D1EffectImpl *iface, ID2D1EffectContext *context, ID2D1TransformGraph *graph)
static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
static void test_color_brush(BOOL d3d11)
static void test_alpha_mode(BOOL d3d11)
static DWORD WINAPI mt_factory_test_thread_func(void *param)
static HRESULT STDMETHODCALLTYPE effect_impl_get_blob(const IUnknown *iface, BYTE *data, UINT32 data_size, UINT32 *actual_size)
static DWORD WINAPI thread_func(void *ctx)
static void geometry_sink_cleanup(struct geometry_sink *sink)
static void set_rounded_rect(D2D1_ROUNDED_RECT *rect, float left, float top, float right, float bottom, float radius_x, float radius_y)
static HRESULT STDMETHODCALLTYPE effect_impl_set_integer(IUnknown *iface, const BYTE *data, UINT32 data_size)
static const char test_ps_code[]
static const ID2D1EffectImplVtbl custom_effect_impl_vtbl
static const WCHAR * effect_xml_without_author
static void test_wic_bitmap_format(BOOL d3d11)
static void release_resource_readback(struct resource_readback *rb)
static void check_enum_property(ID2D1Effect *effect, UINT32 property, const UINT32 *values, UINT32 count)
static void get_surface_readback(struct d2d1_test_context *ctx, struct resource_readback *rb)
static ULONG STDMETHODCALLTYPE effect_impl_draw_transform_AddRef(ID2D1DrawTransform *iface)
static ID2D1RenderTarget * create_render_target(IDXGISurface *surface, BOOL d3d11, D2D1_FACTORY_TYPE factory_type)
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapOutputRectToInputRects(ID2D1DrawTransform *iface, const D2D1_RECT_L *output_rect, D2D1_RECT_L *input_rects, UINT32 input_rect_count)
static float clamp_float(float f, float lower, float upper)
static ULONG STDMETHODCALLTYPE geometry_sink_Release(ID2D1SimplifiedGeometrySink *iface)
static void test_rectangle_geometry(BOOL d3d11)
static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_readback *rb)
static void test_blend_transform(BOOL d3d11)
static ID3D11Device * create_d3d11_device(void)
static void test_hwnd_target_is_supported(BOOL d3d11)
static HRESULT create_custom_shader_effect(IUnknown **effect_impl, const GUID *pixel_shader, const GUID *vertex_shader, const GUID *vertex_buffer)
static D2D1_COLOR_SPACE const D2D1_COLOR_F * colour
static HRESULT STDMETHODCALLTYPE custom_effect_impl_create(IUnknown **effect_impl)
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
static void set_size_f(D2D1_SIZE_F *size, float w, float h)
static void quadratic_to(ID2D1GeometrySink *sink, float x1, float y1, float x2, float y2)
static void set_color(D2D1_COLOR_F *color, float r, float g, float b, float a)
static IDXGISurface * create_surface(IDXGIDevice *dxgi_device, unsigned int width, unsigned int height, unsigned int bind_flags, unsigned int misc_flags, DXGI_FORMAT format)
static HRESULT STDMETHODCALLTYPE effect_impl_create(IUnknown **effect_impl)
static void check_blend_desc_(unsigned int line, const D2D1_BLEND_DESCRIPTION *blend_desc, const D2D1_BLEND_DESCRIPTION *expected)
static const WCHAR * effect_xml_a
static void fill_geometry_sink_bezier(ID2D1GeometrySink *sink, unsigned int hollow_count)
static ULONG STDMETHODCALLTYPE effect_impl_AddRef(ID2D1EffectImpl *iface)
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_QueryInterface(ID2D1DrawTransform *iface, REFIID iid, void **out)
static void test_hwnd_target(BOOL d3d11)
#define check_blend_desc(blend_desc, expected)
static void rotate_matrix(D2D1_MATRIX_3X2_F *matrix, float theta)
static void figure_add_span(struct figure *figure, unsigned int span)
static void test_bitmap_formats(BOOL d3d11)
static void test_state_block(BOOL d3d11)
static struct effect_impl * impl_from_ID2D1EffectImpl(ID2D1EffectImpl *iface)
static void test_colour_space(BOOL d3d11)
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapInputRectsToOutputRect(ID2D1DrawTransform *iface, const D2D1_RECT_L *input_rects, const D2D1_RECT_L *input_opaque_rects, UINT32 input_rect_count, D2D1_RECT_L *output_rect, D2D1_RECT_L *output_opaque_rect)
static void test_layer(BOOL d3d11)
static UINT32 STDMETHODCALLTYPE effect_impl_draw_transform_GetInputCount(ID2D1DrawTransform *iface)
static BOOL compare_point(const D2D1_POINT_2F *point, float x, float y, unsigned int ulps)
#define check_bitmap_options(b, o)
static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *rt)
#define init_test_multithreaded_context(ctx, d3d11)
static void preload_shader(const char *target, const char *code, const GUID *id, struct d2d1_test_context *ctx)
static void test_opacity_brush(BOOL d3d11)
static ULONG get_refcount(void *iface)
static const WCHAR * effect_xml_without_inputs
static void release_test_context_(unsigned int line, struct d2d1_test_context *ctx)
static void fill_geometry_sink(ID2D1GeometrySink *sink, unsigned int hollow_count)
static void test_max_bitmap_size(BOOL d3d11)
static void test_effect_vertex_buffer(BOOL d3d11)
static void set_rect_l(D2D1_RECT_L *rect, LONG left, LONG top, LONG right, LONG bottom)
#define check_zero_buffer(a, b)
static DWORD get_readback_colour(struct resource_readback *rb, unsigned int x, unsigned int y)
static BOOL compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
#define geometry_sink_check(a, b, c, d, e)
static void STDMETHODCALLTYPE geometry_sink_AddBeziers(ID2D1SimplifiedGeometrySink *iface, const D2D1_BEZIER_SEGMENT *beziers, UINT32 count)
static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx, BOOL d3d11, D2D1_FACTORY_TYPE factory_type)
static void cubic_to(ID2D1GeometrySink *sink, float x1, float y1, float x2, float y2, float x3, float y3)
static HRESULT STDMETHODCALLTYPE effect_impl_QueryInterface(ID2D1EffectImpl *iface, REFIID iid, void **out)
static void queue_d3d10_test(void(*test)(BOOL d3d11))
static HRESULT STDMETHODCALLTYPE geometry_sink_Close(ID2D1SimplifiedGeometrySink *iface)
static BOOL compare_surface(struct d2d1_test_context *ctx, const char *ref_sha1)
static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp, unsigned int w, unsigned int h, const char *ref_sha1)
static void run_queued_tests(void)
static void set_rect(D2D1_RECT_F *rect, float left, float top, float right, float bottom)
static const WCHAR * effect_xml_without_description
static void test_bounds_adjustment_transform(BOOL d3d11)
static const ID2D1EffectImplVtbl effect_impl_vtbl
static void test_bitmap_create(BOOL d3d11)
static void STDMETHODCALLTYPE geometry_sink_BeginFigure(ID2D1SimplifiedGeometrySink *iface, D2D1_POINT_2F start_point, D2D1_FIGURE_BEGIN figure_begin)
static struct geometry_segment * geometry_figure_add_segment(struct geometry_figure *figure)
#define release_test_context(ctx)
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapInvalidRect(ID2D1DrawTransform *iface, UINT32 index, D2D1_RECT_L input_rect, D2D1_RECT_L *output_rect)
static const WCHAR * effect_xml_c
static void test_invert_matrix(BOOL d3d11)
static void set_ellipse(D2D1_ELLIPSE *ellipse, float x, float y, float rx, float ry)
static void skew_matrix(D2D1_MATRIX_3X2_F *matrix, float x, float y)
static BOOL compare_bezier_segment(const D2D1_BEZIER_SEGMENT *b, float x1, float y1, float x2, float y2, float x3, float y3, unsigned int ulps)
static void translate_matrix(D2D1_MATRIX_3X2_F *matrix, float x, float y)
static void set_point(D2D1_POINT_2F *point, float x, float y)
static ULONG STDMETHODCALLTYPE effect_impl_draw_transform_Release(ID2D1DrawTransform *iface)
static const D2D1_CREATION_PROPERTIES * properties
static ULONG STDMETHODCALLTYPE geometry_sink_AddRef(ID2D1SimplifiedGeometrySink *iface)
static void test_rounded_rectangle_geometry(BOOL d3d11)
static HRESULT STDMETHODCALLTYPE geometry_sink_QueryInterface(ID2D1SimplifiedGeometrySink *iface, REFIID iid, void **out)
static IDXGISwapChain * create_d3d10_swapchain(ID3D10Device1 *device, HWND window, BOOL windowed)
static void check_zero_buffer_(const void *buffer, size_t size, unsigned int line)
static void test_effect_blob_property(BOOL d3d11)
static void STDMETHODCALLTYPE geometry_sink_SetSegmentFlags(ID2D1SimplifiedGeometrySink *iface, D2D1_PATH_SEGMENT flags)
#define test_compatible_target_size(r)
static void test_dc_target_is_supported(BOOL d3d11)
static const WCHAR * effect_xml_without_category
static void test_effect_grayscale(BOOL d3d11)
static void set_vec4(D2D_VECTOR_4F *vec, float x, float y, float z, float w)
static void check_bitmap_options_(unsigned int line, ID2D1Bitmap *bitmap, DWORD expected_options)
static const struct ID2D1SimplifiedGeometrySinkVtbl geometry_sink_vtbl
static void test_dpi(BOOL d3d11)
static void test_create_target(BOOL d3d11)
static void deserialize_figure(struct figure *figure, const BYTE *s)
static void queue_d3d1x_test(void(*test)(BOOL d3d11), BOOL d3d11)
static void serialize_figure(struct figure *figure)
static void release_d3d10_resource_readback(struct resource_readback *rb)
static const char test_vs_code[]
static void test_image_brush(BOOL d3d11)
static void test_image_bounds(BOOL d3d11)
static const D2D1_CREATION_PROPERTIES ID2D1Device ** device
static void test_stroke_style(BOOL d3d11)
static void test_bitmap_map(BOOL d3d11)
#define check_bitmap_surface(b, s, o)
static void test_builtin_effect(BOOL d3d11)
static struct effect_impl * impl_from_ID2D1DrawTransform(ID2D1DrawTransform *iface)
static void test_get_effect_properties(BOOL d3d11)
static void test_transform_graph(BOOL d3d11)
static void test_radial_brush(BOOL d3d11)
static void deserialize_span(struct figure *figure, unsigned int *current, unsigned int *shift, unsigned int c)
static void test_effect_context(BOOL d3d11)
static HRESULT STDMETHODCALLTYPE effect_impl_get_integer(const IUnknown *iface, BYTE *data, UINT32 data_size, UINT32 *actual_size)
static void check_system_properties_(unsigned int line, ID2D1Effect *effect)
static void test_fill_geometry(BOOL d3d11)
static BOOL compare_colour_f(const D2D1_COLOR_F *colour, float r, float g, float b, float a, unsigned int ulps)
static void test_effect_register(BOOL d3d11)
static void test_geometry_group(BOOL d3d11)
static void read_figure(struct figure *figure, BYTE *data, unsigned int pitch, unsigned int x, unsigned int y, unsigned int w, unsigned int h, DWORD prev)
static void test_registered_effects(BOOL d3d11)
static float(WINAPI *pD2D1Tan)(float angle)
static D2D1_COLOR_SPACE dst_colour_space
static void test_mt_factory(BOOL d3d11)
static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, BOOL has_surface, DWORD options)
static void test_bezier_intersect(BOOL d3d11)
static void line_to(ID2D1GeometrySink *sink, float x, float y)
static void queue_test(void(*test)(BOOL d3d11))
static void test_gradient(BOOL d3d11)
static void scale_matrix(D2D1_MATRIX_3X2_F *matrix, float x, float y)
static void test_hwnd_target_gdi_interop(BOOL d3d11)
static const ID2D1DrawTransformVtbl custom_shader_effect_draw_transform_vtbl
static void test_path_geometry(BOOL d3d11)
static const WCHAR * effect_xml_without_version
static void geometry_sink_check_(unsigned int line, const struct geometry_sink *sink, D2D1_FILL_MODE fill_mode, unsigned int figure_count, const struct expected_geometry_figure *expected_figures, unsigned int ulps)
static struct geometry_sink * impl_from_ID2D1SimplifiedGeometrySink(ID2D1SimplifiedGeometrySink *iface)
static void test_desktop_dpi(BOOL d3d11)
static const WCHAR * effect_xml_without_type
#define check_interface(a, b, c)
static ID2D1DeviceContext * create_device_context(ID2D1Factory1 *factory, IDXGIDevice *dxgi_device, BOOL d3d11)
static void STDMETHODCALLTYPE geometry_sink_EndFigure(ID2D1SimplifiedGeometrySink *iface, D2D1_FIGURE_END figure_end)
static ID2D1RenderTarget * create_render_target_desc(IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc, BOOL d3d11, D2D1_FACTORY_TYPE factory_type)
#define check_rt_bitmap_surface(r, s, o)
static void STDMETHODCALLTYPE geometry_sink_AddLines(ID2D1SimplifiedGeometrySink *iface, const D2D1_POINT_2F *points, UINT32 count)
static void test_bitmap_updates(BOOL d3d11)
#define init_test_context(ctx, d3d11)
static void test_dc_target(BOOL d3d11)
static void STDMETHODCALLTYPE geometry_sink_SetFillMode(ID2D1SimplifiedGeometrySink *iface, D2D1_FILL_MODE mode)
static void test_bitmap_surface(BOOL d3d11)
static void test_skew_matrix(BOOL d3d11)
static void test_command_list(BOOL d3d11)
static void test_offset_transform(BOOL d3d11)
static void create_target_dibsection(HDC hdc, UINT32 width, UINT32 height)
static void test_dc_target_gdi_interop(BOOL d3d11)
static void test_bitmap_target(BOOL d3d11)
static ID3D10Device1 * create_d3d10_device(void)
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_SetDrawInfo(ID2D1DrawTransform *iface, ID2D1DrawInfo *info)
static HRESULT STDMETHODCALLTYPE effect_impl_PrepareForRender(ID2D1EffectImpl *iface, D2D1_CHANGE_TYPE type)
static DWORD WINAPI mt_factory_test_thread_draw_func(void *param)
static void test_linear_brush(BOOL d3d11)
static void test_border_transform(BOOL d3d11)
static const WCHAR * effect_variable_input_count
static const WCHAR * effect_xml_minimum
static void test_bitmap_brush(BOOL d3d11)
#define check_system_properties(effect)
static void set_size_u(D2D1_SIZE_U *size, unsigned int w, unsigned int h)
static void test_effect_2d_affine(BOOL d3d11)
static BOOL compare_figure(struct d2d1_test_context *ctx, unsigned int x, unsigned int y, unsigned int w, unsigned int h, DWORD prev, unsigned int max_diff, const char *ref)
static void set_matrix_identity(D2D1_MATRIX_3X2_F *matrix)
static void set_quadratic(D2D1_QUADRATIC_BEZIER_SEGMENT *quadratic, float x1, float y1, float x2, float y2)
static void test_create_device(BOOL d3d11)
static void set_rect_u(D2D1_RECT_U *rect, UINT32 left, UINT32 top, UINT32 right, UINT32 bottom)
static HRESULT STDMETHODCALLTYPE effect_impl_get_context(const IUnknown *iface, BYTE *data, UINT32 data_size, UINT32 *actual_size)
static void test_shared_bitmap(BOOL d3d11)
static const WCHAR * effect_xml_b
static IDXGISwapChain * create_swapchain(IDXGIDevice *device, HWND window, BOOL windowed)
static void test_effect_custom_pixel_shader(BOOL d3d11)
static const WCHAR * effect_xml_without_name
static BOOL compare_wic_bitmap(IWICBitmap *bitmap, const char *ref_sha1)
static HWND create_window(void)
static void test_dxgi_surface_target_gdi_interop(BOOL d3d11)
static void test_draw_text_layout(BOOL d3d11)
static BOOL compare_colour(DWORD c1, DWORD c2, BYTE max_diff)
static BOOL compare_rect(const D2D1_RECT_F *rect, float left, float top, float right, float bottom, unsigned int ulps)
static HRESULT STDMETHODCALLTYPE effect_impl_SetGraph(ID2D1EffectImpl *iface, ID2D1TransformGraph *graph)
static void test_wic_target_format(BOOL d3d11)
static void test_effect_crop(BOOL d3d11)
static struct test_entry * mt_tests
static void test_clip(BOOL d3d11)
static void release_d3d11_resource_readback(struct resource_readback *rb)
static ULONG STDMETHODCALLTYPE effect_impl_Release(ID2D1EffectImpl *iface)
static HRESULT STDMETHODCALLTYPE effect_impl_set_blob(IUnknown *iface, const BYTE *data, UINT32 data_size)
D2D1_BITMAP_INTERPOLATION_MODE
@ D2D1_BITMAP_INTERPOLATION_MODE_LINEAR
@ D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR
@ D2D1_CAP_STYLE_TRIANGLE
@ D2D1_FILL_MODE_ALTERNATE
@ D2D1_FACTORY_TYPE_SINGLE_THREADED
@ D2D1_FACTORY_TYPE_MULTI_THREADED
@ D2D1_FEATURE_LEVEL_DEFAULT
@ D2D1_FIGURE_BEGIN_HOLLOW
@ D2D1_FIGURE_BEGIN_FILLED
@ D2D1_PRESENT_OPTIONS_NONE
@ D2D1_EXTEND_MODE_MIRROR
@ D2D1_DRAW_TEXT_OPTIONS_NONE
@ D2D1_RENDER_TARGET_TYPE_DEFAULT
@ D2D1_RENDER_TARGET_TYPE_SOFTWARE
@ D2D1_RENDER_TARGET_TYPE_HARDWARE
@ D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
@ D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
@ D2D1_TEXT_ANTIALIAS_MODE_ALIASED
@ D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
@ D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE
@ D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE
@ D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING
@ D2D1_RENDER_TARGET_USAGE_NONE
@ D2D1_ANTIALIAS_MODE_PER_PRIMITIVE
@ D2D1_ANTIALIAS_MODE_ALIASED
@ D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES
@ D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES
@ D2D1_DC_INITIALIZE_MODE_COPY
@ D2D1_DASH_STYLE_DASH_DOT
@ D2D1_DASH_STYLE_DASH_DOT_DOT
@ D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN
@ D2D1_PROPERTY_MAX_INPUTS
@ D2D1_PROPERTY_PRECISION
@ D2D1_PROPERTY_MIN_INPUTS
@ D2D1_PROPERTY_DISPLAYNAME
@ D2D1_PROPERTY_DESCRIPTION
@ D2D1_INTERPOLATION_MODE_CUBIC
@ D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR
@ D2D1_INTERPOLATION_MODE_LINEAR
@ D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE
@ D2D1_BITMAP_OPTIONS_CANNOT_DRAW
@ D2D1_BITMAP_OPTIONS_CPU_READ
@ D2D1_BITMAP_OPTIONS_NONE
@ D2D1_BITMAP_OPTIONS_TARGET
@ D2D1_PROPERTY_TYPE_BLOB
@ D2D1_PROPERTY_TYPE_CLSID
@ D2D1_PROPERTY_TYPE_MATRIX_5X4
@ D2D1_PROPERTY_TYPE_ENUM
@ D2D1_PROPERTY_TYPE_BOOL
@ D2D1_PROPERTY_TYPE_MATRIX_3X2
@ D2D1_PROPERTY_TYPE_MATRIX_4X4
@ D2D1_PROPERTY_TYPE_UINT32
@ D2D1_PROPERTY_TYPE_UNKNOWN
@ D2D1_PROPERTY_TYPE_MATRIX_4X3
@ D2D1_PROPERTY_TYPE_STRING
@ D2D1_PROPERTY_TYPE_VECTOR2
@ D2D1_PROPERTY_TYPE_VECTOR3
@ D2D1_PROPERTY_TYPE_IUNKNOWN
@ D2D1_PROPERTY_TYPE_ARRAY
@ D2D1_PROPERTY_TYPE_INT32
@ D2D1_PROPERTY_TYPE_VECTOR4
@ D2D1_SUBPROPERTY_FIELDS
@ D2D1_SUBPROPERTY_ISREADONLY
@ D2D1_COLOR_SPACE_CUSTOM
@ D2D1_DEVICE_CONTEXT_OPTIONS_NONE
@ D2D1_PRIMITIVE_BLEND_SOURCE_OVER
@ D2D1_PRIMITIVE_BLEND_COPY
@ D2D1_COMPOSITE_MODE_SOURCE_OVER
@ D2D1_MAP_OPTIONS_DISCARD
@ D2D1_BUFFER_PRECISION_UNKNOWN
@ D2D1_BLEND_OPERATION_ADD
@ D2D1_CHANNEL_DEPTH_DEFAULT
@ D2D1_VERTEX_USAGE_STATIC
@ D2D1_VERTEX_USAGE_DYNAMIC
@ D2D1_2DAFFINETRANSFORM_PROP_BORDER_MODE
@ D2D1_2DAFFINETRANSFORM_PROP_INTERPOLATION_MODE
@ D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_CUBIC
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_NEAREST_NEIGHBOR
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_LINEAR
@ D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_ANISOTROPIC
#define D2DERR_INSUFFICIENT_BUFFER
#define D2DERR_UNSUPPORTED_PIXEL_FORMAT
const unsigned int D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION
@ D3D10_CREATE_DEVICE_BGRA_SUPPORT
@ D3D10_RESOURCE_MISC_GDI_COMPATIBLE
@ D3D10_BIND_SHADER_RESOURCE
@ D3D10_BIND_RENDER_TARGET
const UINT D3D10_1_SDK_VERSION
@ D3D10_FEATURE_LEVEL_10_0
HRESULT WINAPI D3D10CreateDevice1(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, D3D10_FEATURE_LEVEL1 hw_level, UINT sdk_version, ID3D10Device1 **device)
@ D3D10_DRIVER_TYPE_REFERENCE
@ D3D10_DRIVER_TYPE_HARDWARE
HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context)
@ D3D_DRIVER_TYPE_HARDWARE
@ D3D_DRIVER_TYPE_REFERENCE
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename, const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages)
void WINAPI D2D1MakeRotateMatrix(float angle, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix)
void WINAPI D2D1MakeSkewMatrix(float angle_x, float angle_y, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix)
BOOL WINAPI D2D1IsMatrixInvertible(const D2D1_MATRIX_3X2_F *matrix)
BOOL WINAPI D2D1InvertMatrix(D2D1_MATRIX_3X2_F *matrix)
HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid, const D2D1_FACTORY_OPTIONS *factory_options, void **factory)
static BOOL format_supported(const D2D1_PIXEL_FORMAT *format)
HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE type, REFIID riid, IUnknown **ret)
BOOL WINAPI CryptCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, DWORD dwFlags, HCRYPTHASH *phHash)
BOOL WINAPI CryptGetHashParam(HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD *pdwDataLen, DWORD dwFlags)
BOOL WINAPI CryptDestroyHash(HCRYPTHASH hHash)
BOOL WINAPI CryptReleaseContext(HCRYPTPROV hProv, DWORD dwFlags)
BOOL WINAPI CryptHashData(HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCWSTR pszContainer, LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
static const struct @510 pixel_formats[]
const WICPixelFormatGUID * wic_format
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
char *CDECL getenv(const char *name)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP float __cdecl cosf(float)
_ACRTIMP float __cdecl sinf(float)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
@ DWRITE_PIXEL_GEOMETRY_FLAT
@ DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
@ DWRITE_RENDERING_MODE_OUTLINE
@ DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
@ DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL
@ DWRITE_RENDERING_MODE_DEFAULT
@ DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC
@ DWRITE_RENDERING_MODE_ALIASED
@ DWRITE_FONT_WEIGHT_NORMAL
@ DWRITE_FONT_STYLE_NORMAL
@ DWRITE_FACTORY_TYPE_SHARED
@ DWRITE_FONT_STRETCH_NORMAL
@ DXGI_SWAP_EFFECT_DISCARD
const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT
@ DXGI_MODE_SCALING_UNSPECIFIED
@ DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLuint GLenum GLenum transform
GLenum GLenum GLenum GLenum GLenum scale
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLvoid GLvoid GLvoid * span
GLboolean GLboolean GLboolean b
GLboolean GLenum GLenum GLvoid * values
GLsizei GLenum GLboolean sink
GLenum GLint GLint * precision
GLenum GLuint GLint GLint layer
GLboolean GLboolean GLboolean GLboolean a
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * points
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static ID3D11Device * create_device(void)
static void test_math(void)
#define InterlockedCompareExchange
#define skip_(test, file, line,...)
const char * winetest_platform
#define todo_wine_if(is_todo)
#define win_skip_(file, line)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
#define memcpy(s1, s2, n)
struct task_struct * current
static struct test_info tests[]
D3D11_SHADER_VARIABLE_DESC desc
#define compare_float(got, exp)
static const mhtml_binding_test_t binding_tests[]
static HANDLE ULONG_PTR DWORD threads
static IHTMLWindow2 * window
static const struct @1952 hash_data[]
static float int float int float int x3
static RPC_BINDING_HANDLE binding
static float int float int float int float y3
static PCCRYPT_OID_INFO ** usages
@ COINIT_APARTMENTTHREADED
#define WS_OVERLAPPEDWINDOW
static uint32_t thread_count(IN pnfs_layout_state *state, IN enum pnfs_iomode iomode, IN uint64_t offset, IN uint64_t length)
static Real area(Real A[2], Real B[2], Real C[2])
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
int winetest_get_mainargs(char ***pargv)
wchar_t const *const size_t const buffer_size
D2D1_PIXEL_FORMAT pixelFormat
ID2D1ColorContext * colorContext
D2D1_BITMAP_OPTIONS bitmapOptions
D2D1_PIXEL_FORMAT pixelFormat
D2D1_BLEND sourceBlendAlpha
D2D1_BLEND_OPERATION blendOperation
D2D1_BLEND destinationBlend
D2D1_BLEND destinationBlendAlpha
D2D1_BLEND_OPERATION blendOperationAlpha
D2D1_MATRIX_3X2_F transform
const D2D1_INPUT_ELEMENT_DESC * inputElements
const BYTE * shaderBufferWithInputSignature
D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode
D2D1_ANTIALIAS_MODE antialiasMode
D2D1_MATRIX_3X2_F transform
D2D1_PRIMITIVE_BLEND primitiveBlend
D2D1_ANTIALIAS_MODE antialiasMode
D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode
D2D1_MATRIX_3X2_F transform
D2D1_PRESENT_OPTIONS presentOptions
D2D1_INTERPOLATION_MODE interpolationMode
D2D1_EXTEND_MODE extendModeX
D2D1_EXTEND_MODE extendModeY
D2D1_RECT_F sourceRectangle
PD2D1_PROPERTY_GET_FUNCTION getFunction
const WCHAR * propertyName
D2D1_POINT_2F gradientOriginOffset
D2D1_RENDER_TARGET_TYPE type
D2D1_PIXEL_FORMAT pixelFormat
D2D1_RENDER_TARGET_USAGE usage
D2D1_FEATURE_LEVEL minLevel
D2D1_DASH_STYLE dashStyle
DXGI_SAMPLE_DESC SampleDesc
DXGI_SAMPLE_DESC SampleDesc
DWORD dwNumberOfProcessors
ID2D1DeviceContext * context
IDXGISwapChain * swapchain
ID2D1DrawInfo * draw_info
ID2D1TransformGraph * transform_graph
ID2D1EffectImpl ID2D1EffectImpl_iface
const GUID * vertex_shader
struct effect_impl::@1913 blob
const GUID * vertex_buffer
ID2D1DrawTransform ID2D1DrawTransform_iface
const GUID * pixel_shader
ID2D1EffectContext * effect_context
unsigned int figures_size
unsigned int figure_count
ID2D1SimplifiedGeometrySink ID2D1SimplifiedGeometrySink_iface
struct geometry_sink::geometry_figure * figures
ID3D10Resource * d3d10_resource
union resource_readback::@1910 u
ID3D11Resource * d3d11_resource
BITMAPINFOHEADER bmiHeader
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
#define CRYPT_VERIFYCONTEXT
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
#define D2DERR_EFFECT_IS_NOT_REGISTERED
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define D2DERR_WRONG_STATE
#define WINCODEC_ERR_ALREADYLOCKED
#define D2DERR_WRONG_FACTORY
#define D2DERR_INVALID_CALL
#define D2DERR_TARGET_NOT_GDI_COMPATIBLE
#define D2DERR_INVALID_PROPERTY
#define D2DERR_INVALID_TARGET
#define D2DERR_UNSUPPORTED_OPERATION
#define D2DERR_INCOMPATIBLE_BRUSH_TYPES
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
HDC WINAPI CreateMetaFileA(_In_opt_ LPCSTR)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HMETAFILE WINAPI CloseMetaFile(_In_ HDC hdc)
HDC WINAPI CreateEnhMetaFileA(_In_opt_ HDC, _In_opt_ LPCSTR, _In_opt_ LPCRECT, _In_opt_ LPCSTR)
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DeleteDC(_In_ HDC)