mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +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
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