LibWeb: Add canvas.quadraticCurveTo()

Also adds a test, and removes debug spam ™️
This commit is contained in:
AnotherTest 2020-05-05 06:54:26 +04:30 committed by Andreas Kling
commit 0a55679de4
Notes: sideshowbarker 2024-07-19 06:58:33 +09:00
7 changed files with 70 additions and 2 deletions

View file

@ -165,10 +165,13 @@ void CanvasRenderingContext2D::line_to(float x, float y)
m_path.line_to({ x, y });
}
void CanvasRenderingContext2D::quadratic_curve_to(float cx, float cy, float x, float y)
{
m_path.quadratic_bezier_curve_to({ cx, cy }, { x, y });
}
void CanvasRenderingContext2D::stroke()
{
dbg() << "stroke path " << m_path;
auto painter = this->painter();
if (!painter)
return;