Commit Graph

82 Commits

Author SHA1 Message Date
Giovanni Mascellani 873e3d0691 d2d1: Implement ellipse and rounded rectangle stroking with arcs.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 18:53:40 +01:00
Giovanni Mascellani a6bf2c429e d2d1: Implement ellipse and rounded rectangle filling with arcs.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 18:53:37 +01:00
Giovanni Mascellani 722469254d d2d1: Ensure that hollow figures do not impact geometry bounds.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:30 +01:00
Giovanni Mascellani b728b2ff5f d2d1: Do not fill hollow figures.
Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 15:58:26 +01:00
Henri Verbeet 763da3f7cc d2d1: Rename d2d_ellipse_geometry_GetRoundedRect() to d2d_ellipse_geometry_GetEllipse().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 22:44:54 +01:00
Henri Verbeet 1fe3f60f68 d2d1: Pass previous and next vectors to d2d_geometry_outline_add_join().
Instead of the points.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 19:34:03 +01:00
Giovanni Mascellani aec8701399 d2d1: Implement ellipse drawing.
Currently the ellipse is approximated with quadratic Bézier curves.

Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:24:12 +01:00
Giovanni Mascellani f04bcb2d1b d2d1: Implement rounded rectangle drawing.
Currently rounded parts are approximated with quadratic Bézier curves.

Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:24:09 +01:00
Giovanni Mascellani 502c9c7603 d2d1: Fix miter drawing for degenerated rectangles.
When a rectangle side has zero length, the miter join generator is
confused because it cannot recover the join angle. This patch avoids
that by using artificially non-degenerate previous and next vertices.

Signed-off-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-21 21:54:59 +01:00
Alexandre Julliard 3feed5a23f d2d1: Make qsort() callback functions cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 09:56:00 +02:00
Alexandre Julliard 239499a56d d2d1: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 15:04:06 +02:00
Nikolay Sivov a777fd85cb d2d1: Add ID2D1GeometryGroup stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 23:02:28 +01:00
Henri Verbeet ced1590255 d2d1: Introduce a debug helper for D2D1_POINT_2F.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-25 12:29:00 +02:00
Giovanni Mascellani abbffd2ee2 d2d1: Fix outline join drawing.
Calling d2d_outline_vertex_set(x, y, 0, 0, 0, 0) causes a normalize() to
be invoked with a zero vector in the vertex shader
vs_code_bezier_outline. This gives rise to an undefinite result, that in
some cases causes the join triangles to be dropped.

Tested on Debian unstable.

Signed-off-by: Giovanni Mascellani <g.mascellani@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-09 09:52:36 +02:00
Henri Verbeet fa4d5b6151 d2d1: Replace d2d_calloc() with a global heap_calloc() helper.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:49 +01:00
Henri Verbeet d9f4390488 d2d1: Use d2d_array_reserve() in d2d_clip_stack_push().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 17:54:55 +01:00
Henri Verbeet fdaa6d8e2a d2d1: Introduce a helper function to allocate arrays.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 17:54:55 +01:00
Henri Verbeet 6d8ebf1d1a d2d1: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:06 +01:00
Henri Verbeet 24dc5c7409 d2d1: Implement radial gradient brushes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:53:51 +02:00
Nikolay Sivov e6c18792f1 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>
2017-09-18 14:15:58 +02:00
Nikolay Sivov 00fea0298b d2d1: Implement GetBounds() for path geometries.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Nikolay Sivov dcccaaf7f3 d2d1: Use better bezier segment bounds approximation when updating figure bounds.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-15 17:00:53 +02:00
Henri Verbeet 2187a1edb3 d2d1: Split overlapping bezier control triangles.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:04 +09:00
Henri Verbeet 3895f07c4b d2d1: Use segment indices in d2d_geometry_resolve_beziers().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:07:02 +09:00
Henri Verbeet 00fafb27e3 d2d1: Implement bezier/bezier intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:59 +09:00
Henri Verbeet a4f23ea148 d2d1: Implement bezier/line intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:57 +09:00
Henri Verbeet a5f02132d3 d2d1: Introduce a separate function for calculating line/line intersections.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:55 +09:00
Henri Verbeet 0ede13e1df d2d1: Return S_OK on success in d2d_geometry_resolve_beziers().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-18 08:06:50 +09:00
Henri Verbeet 4dcdc80ad5 d2d1: Fix the segment count for open figures.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:05 +02:00
Henri Verbeet 09ff685aa0 d2d1: Implement d2d_path_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:02 +02:00
Henri Verbeet 208eb09e3c d2d1: Implement d2d_transformed_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:54:59 +02:00
Henri Verbeet e5733e7cd4 d2d1: Implement d2d_rectangle_geometry_Simplify().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:20 +02:00
Henri Verbeet 828e62c8e2 d2d1: Implement d2d_transformed_geometry_GetBounds().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:19 +02:00
Henri Verbeet 2485305b55 d2d1: Implement d2d_rectangle_geometry_GetBounds().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-02 18:41:17 +02:00
Henri Verbeet bd2141e521 d2d1: Implement initial support for quadratic bezier outlines.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Henri Verbeet a525b69781 d2d1: Properly invert join directions when needed.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 18:50:10 +01:00
Henri Verbeet d10dfd4102 d2d1: Take the source transformation into account when creating a transformed geometry.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet 7ed032a014 d2d1: Implement rectangle geometry outlines.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet 39406039c0 d2d1: Implement initial support for line joins.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet f3563f4e62 d2d1: Add an initial d2d_d3d_render_target_DrawGeometry() implementation.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet ac3824fe63 d2d1: Avoid degenerate line segments.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-03 19:05:11 +01:00
Henri Verbeet df63a7f890 d2d1: Update "p0" after inserting a vertex in d2d_geometry_resolve_beziers().
This fixes a failure in the d2d1 tests when run with warn+heap.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:27 +01:00
Henri Verbeet 74735f327c d2d1: Use d2d_point_set() in d2d_rectangle_geometry_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-08 16:07:05 +01:00
Henri Verbeet 91baf67e4a d2d1: Store separate bezier vertices.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-08 16:07:03 +01:00
Henri Verbeet ad40557103 d2d1: Introduce a separate structure for fill specific geometry fields.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-08 16:07:01 +01:00
Henri Verbeet e9fc8c7c52 d2d1: Properly test which side of a bezier curve is the inside.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Henri Verbeet e37ba63d2f d2d1: Properly set an error state when adding the vertex fails in d2d_geometry_sink_BeginFigure().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-05 16:11:04 +01:00
Nikolay Sivov 97e52ab673 d2d1: Implement FillContainsPoint() for rectangle geometry.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-03 17:13:40 +01:00
Nikolay Sivov 306d062f46 d2d1: For transformed geometry forward StrokeContainsPoint() to its source geometry.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-01 14:38:24 +01:00
Andrew Eikum 2e08bc0ffc d2d1: Implement d2d_path_geometry_FillContainsPoint().
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-26 15:35:58 +02:00