Nikolay Sivov : d2d1: Improve figure bounds updating for quadratic beziers.
Alexandre Julliard
julliard at winehq.org
Mon Sep 18 14:43:48 CDT 2017
Module: wine
Branch: master
Commit: e6c18792f19bd417e8c8f85762a2fd2fa5b739b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e6c18792f19bd417e8c8f85762a2fd2fa5b739b3
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Sep 18 10:40:46 2017 +0300
d2d1: Improve figure bounds updating for quadratic beziers.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d2d1/geometry.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
index 637078e..a958898 100644
--- a/dlls/d2d1/geometry.c
+++ b/dlls/d2d1/geometry.c
@@ -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;
More information about the wine-cvs
mailing list