d2d1: Improve figure bounds updating for quadratic beziers.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-09-18 10:40:46 +03:00 committed by Alexandre Julliard
parent 3014fb1617
commit e6c18792f1
1 changed files with 7 additions and 0 deletions

View File

@ -2956,6 +2956,11 @@ static void STDMETHODCALLTYPE d2d_geometry_sink_AddQuadraticBeziers(ID2D1Geometr
for (i = 0; i < bezier_count; ++i)
{
D2D1_RECT_F bezier_bounds;
d2d_rect_get_bezier_bounds(&bezier_bounds, &figure->vertices[figure->vertex_count - 1],
&beziers[i].point1, &beziers[i].point2);
figure->vertex_types[figure->vertex_count - 1] = D2D_VERTEX_TYPE_BEZIER;
if (!d2d_figure_add_bezier_control(figure, &beziers[i].point1))
{
@ -2970,6 +2975,8 @@ static void STDMETHODCALLTYPE d2d_geometry_sink_AddQuadraticBeziers(ID2D1Geometr
geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR;
return;
}
d2d_rect_union(&figure->bounds, &bezier_bounds);
}
geometry->u.path.segment_count += bezier_count;