https://bugs.winehq.org/show_bug.cgi?id=57435
Bug ID: 57435 Summary: D2D1GeometrySinc::AddArc() doesn't properly mark end of the figure segment Product: Wine Version: 9.21 Hardware: x86-64 OS: Linux Status: NEW Keywords: source, testcase Severity: normal Priority: P2 Component: d2d Assignee: wine-bugs@winehq.org Reporter: dmitry@baikal.ru Distribution: ---
Created attachment 77431 --> https://bugs.winehq.org/attachment.cgi?id=77431 Rounded rect under Wine
If an application creates a rounded rect geometry manually using a sequence of calls ::AddLine() and ::AddArc() instead of ::CreateRoundedRectangleGeometry() then the created rectangle is distorted under Wine.
While D2D1GeometrySinc::AddArc() is currently a stub, it tries to be smart and calls d2d_figure_add_vertex() to add a terminating arc point to the figure, however this doesn't work, and next call to ::AddLine() draws the line from the point where previous line was terminated instead of an added vertex, and this leads to drawing a distorted rectangle.
A simple implementation of ::AddArc() that calculates points of two arc quadrants and calls d2d_geometry_outline_add_arc_quadrant() helper also suffers from the same problem: added arc quadrants don't seem to properly mark end of the figure segment. This seems to be caused by difference between how ::AddLines() and d2d_geometry_outline_add_line_segment() (used by d2d_rounded_rectangle_geometry_init() helper called from ::CreateRoundedRectangleGeometry()) create line segments.
Attached test applications (source + binary) use both described above approaches: ::CreateRoundedRectangleGeometry() and ::AddLine() + ::AddArc().
See screenshots for the Windows vs. Wine comparison.
https://bugs.winehq.org/show_bug.cgi?id=57435
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 77432 --> https://bugs.winehq.org/attachment.cgi?id=77432 Rounded rect under Windows
https://bugs.winehq.org/show_bug.cgi?id=57435
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 77433 --> https://bugs.winehq.org/attachment.cgi?id=77433 Tests (source + binary)