mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
LibWeb: Add CanvasRenderingContext2D scale() and translate() stubs
These don't do anything for now.
This commit is contained in:
parent
2db8716a6f
commit
9d099835f9
4 changed files with 48 additions and 0 deletions
|
@ -35,6 +35,22 @@ void CanvasRenderingContext2D::fill_rect(int x, int y, int width, int height)
|
|||
did_draw(rect);
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::scale(double sx, double sy)
|
||||
{
|
||||
// FIXME: Actually do something with the scale factor!
|
||||
dbg() << "CanvasRenderingContext2D::scale(): " << String::format("%f", sx) << ", " << String::format("%f", sy);
|
||||
m_scale_x = sx;
|
||||
m_scale_y = sy;
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::translate(double x, double y)
|
||||
{
|
||||
// FIXME: Actually do something with the translation!
|
||||
dbg() << "CanvasRenderingContext2D::translate(): " << String::format("%f", x) << ", " << String::format("%f", y);
|
||||
m_translate_x = x;
|
||||
m_translate_y = y;
|
||||
}
|
||||
|
||||
void CanvasRenderingContext2D::did_draw(const Gfx::Rect&)
|
||||
{
|
||||
// FIXME: Make use of the rect to reduce the invalidated area when possible.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue