1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

LibWeb: Implicitly close all subpaths when canvas.fill() is called

This commit is contained in:
AnotherTest 2020-05-10 01:47:43 +04:30 committed by Andreas Kling
parent 6f15f23a40
commit ce36071447

View file

@ -185,7 +185,9 @@ void CanvasRenderingContext2D::fill(Gfx::Painter::WindingRule winding)
if (!painter)
return;
painter->fill_path(m_path, m_fill_style, winding);
auto path = m_path;
path.close_all_subpaths();
painter->fill_path(path, m_fill_style, winding);
}
RefPtr<ImageData> CanvasRenderingContext2D::create_image_data(JS::GlobalObject& global_object, int width, int height) const