mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibWeb: Add CanvasRenderingContext2D.bezierCurveTo()
This commit is contained in:
parent
34f6c88ffd
commit
90a8744823
3 changed files with 9 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -189,6 +189,11 @@ void CanvasRenderingContext2D::quadratic_curve_to(float cx, float cy, float x, f
|
|||
m_path.quadratic_bezier_curve_to({ cx, cy }, { x, y });
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::bezier_curve_to(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
|
||||
{
|
||||
m_path.cubic_bezier_curve_to(Gfx::FloatPoint(cp1x, cp1y), Gfx::FloatPoint(cp2x, cp2y), Gfx::FloatPoint(x, y));
|
||||
}
|
||||
|
||||
DOM::ExceptionOr<void> CanvasRenderingContext2D::arc(float x, float y, float radius, float start_angle, float end_angle, bool counter_clockwise)
|
||||
{
|
||||
if (radius < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue