Signed-off-by: Giovanni Mascellani gio@debian.org --- dlls/d2d1/geometry.c | 10 +++++++--- dlls/d2d1/tests/d2d1.c | 8 ++++---- 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c index a61ce692b9..afdfa9190f 100644 --- a/dlls/d2d1/geometry.c +++ b/dlls/d2d1/geometry.c @@ -1548,6 +1548,9 @@ static BOOL d2d_cdt_insert_segments(struct d2d_cdt *cdt, struct d2d_geometry *ge { figure = &geometry->u.path.figures[i];
+ if (figure->flags & D2D_FIGURE_FLAG_HOLLOW) + continue; + /* Degenerate figure. */ if (figure->vertex_count < 2) continue; @@ -2011,6 +2014,8 @@ static HRESULT d2d_path_geometry_triangulate(struct d2d_geometry *geometry)
for (i = 0, vertex_count = 0; i < geometry->u.path.figure_count; ++i) { + if (geometry->u.path.figures[i].flags & D2D_FIGURE_FLAG_HOLLOW) + continue; vertex_count += geometry->u.path.figures[i].vertex_count; }
@@ -2025,6 +2030,8 @@ static HRESULT d2d_path_geometry_triangulate(struct d2d_geometry *geometry)
for (i = 0, j = 0; i < geometry->u.path.figure_count; ++i) { + if (geometry->u.path.figures[i].flags & D2D_FIGURE_FLAG_HOLLOW) + continue; memcpy(&vertices[j], geometry->u.path.figures[i].vertices, geometry->u.path.figures[i].vertex_count * sizeof(*vertices)); j += geometry->u.path.figures[i].vertex_count; @@ -2455,9 +2462,6 @@ static void STDMETHODCALLTYPE d2d_geometry_sink_BeginFigure(ID2D1GeometrySink *i return; }
- if (figure_begin != D2D1_FIGURE_BEGIN_FILLED) - FIXME("Ignoring figure_begin %#x.\n", figure_begin); - if (!d2d_path_geometry_add_figure(geometry)) { ERR("Failed to add figure.\n"); diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index f89de2e874..54835a2908 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -7480,13 +7480,13 @@ static void test_fill_geometry(void) ID2D1TransformedGeometry_Release(transformed_geometry[0]);
match = compare_figure(surface, 0, 0, 160, 160, 0xff652e89, 0, "gMgB"); - todo_wine ok(match, "Figure does not match.\n"); + ok(match, "Figure does not match.\n"); match = compare_figure(surface, 160, 0, 320, 160, 0xff652e89, 0, "gJAD"); - todo_wine ok(match, "Figure does not match.\n"); + ok(match, "Figure does not match.\n"); match = compare_figure(surface, 0, 160, 160, 320, 0xff652e89, 0, "gJAD"); - todo_wine ok(match, "Figure does not match.\n"); + ok(match, "Figure does not match.\n"); match = compare_figure(surface, 160, 160, 320, 320, 0xff652e89, 0, "gKAG"); - todo_wine ok(match, "Figure does not match.\n"); + ok(match, "Figure does not match.\n");
ID2D1SolidColorBrush_Release(brush); ID2D1RenderTarget_Release(rt);