1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27:35 +00:00

LibGfx: Add Painter::draw_quadratic_bezier_curve()

Also adds a QuadraticBezierCurveTo mode to Gfx::Path
This commit is contained in:
AnotherTest 2020-05-05 05:45:17 +04:30 committed by Andreas Kling
parent 73a7a589c2
commit 9f3f98d4c0
5 changed files with 75 additions and 2 deletions

View file

@ -38,7 +38,7 @@ class Rect;
class Point {
public:
Point() {}
Point() { }
Point(int x, int y)
: m_x(x)
, m_y(y)
@ -107,6 +107,22 @@ public:
}
Point operator+(const Point& other) const { return { m_x + other.m_x, m_y + other.m_y }; }
Point& operator*=(int factor)
{
m_x *= factor;
m_y *= factor;
return *this;
}
Point operator*(int factor) const { return { m_x * factor, m_y * factor }; }
Point& operator/=(int factor)
{
m_x /= factor;
m_y /= factor;
return *this;
}
Point operator/(int factor) const { return { m_x / factor, m_y / factor }; }
String to_string() const;
bool is_null() const { return !m_x && !m_y; }