Jelajahi Sumber

LibGfx: Add a Path::arc_to() helper

...That just uses elliptical_arc_to().
AnotherTest 4 tahun lalu
induk
melakukan
6c05d6d370
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      Userland/Libraries/LibGfx/Path.h

+ 4 - 0
Userland/Libraries/LibGfx/Path.h

@@ -155,6 +155,10 @@ public:
     }
 
     void elliptical_arc_to(const FloatPoint& point, const FloatPoint& radii, double x_axis_rotation, bool large_arc, bool sweep);
+    void arc_to(const FloatPoint& point, float radius, bool large_arc, bool sweep)
+    {
+        elliptical_arc_to(point, { radius, radius }, 0, large_arc, sweep);
+    }
 
     void close();
     void close_all_subpaths();