mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
![]() Unlike all other primitives elliptical arcs are non-trivial to manipulate, it's tricky to correctly apply a Gfx::AffineTransform to them. Prior to this change, Path::copy_transformed() was still incorrectly applying transforms such as flips and skews to arcs. This patch very closely approximates arcs with cubic beziers (I can not visually spot any differences), which can then be easily and correctly transformed in all cases. Most of the maths here was taken from: https://mortoray.com/rendering-an-svg-elliptical-arc-as-bezier-curves/ (which came from https://www.joecridge.me/content/pdf/bezier-arcs.pdf, now a dead link). |
||
---|---|---|
.. | ||
expected | ||
input |