mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibGfx+LibWeb: Move out the EllipticArcTo() logic into Path
At its previous state, the interface allowed invalid "ellipses" to be specified, instead of doing that, simply use the parameters that SVG uses :^)
This commit is contained in:
parent
cb04a441cf
commit
1ea466661f
Notes:
sideshowbarker
2024-07-18 20:18:27 +09:00
Author: https://github.com/alimpfard
Commit: 1ea466661f
Pull-request: https://github.com/SerenityOS/serenity/pull/6347
4 changed files with 90 additions and 74 deletions
|
@ -1492,7 +1492,7 @@ void Painter::for_each_line_segment_on_bezier_curve(const FloatPoint& control_po
|
|||
|
||||
static bool can_approximate_elliptical_arc(const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& center, const FloatPoint radii, float x_axis_rotation, float theta_1, float theta_delta)
|
||||
{
|
||||
constexpr static float tolerance = 1;
|
||||
constexpr static float tolerance = 0.5f;
|
||||
|
||||
auto half_theta_delta = theta_delta / 2.0f;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue