1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibWeb: Add CanvasRenderingContext2D.rotate()

This is pretty limited since we don't have wholesale mapping through
the context transform, but we have to start somewhere. :^)
This commit is contained in:
Andreas Kling 2020-06-26 18:26:18 +02:00
parent dc22e59a1a
commit 9d8565cf9a
5 changed files with 21 additions and 0 deletions

View file

@ -123,6 +123,12 @@ void CanvasRenderingContext2D::translate(float tx, float ty)
m_transform.translate(tx, ty);
}
void CanvasRenderingContext2D::rotate(float radians)
{
dbg() << "CanvasRenderingContext2D::rotate(): " << radians;
m_transform.rotate_radians(radians);
}
void CanvasRenderingContext2D::did_draw(const Gfx::FloatRect&)
{
// FIXME: Make use of the rect to reduce the invalidated area when possible.