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

LibWeb+LibGfx: Allow filling with a paint style and opacity

This commit is contained in:
MacDue 2023-06-11 13:40:42 +01:00 committed by Andreas Kling
parent 8bd68198d6
commit eb4a58528e
8 changed files with 32 additions and 12 deletions

View file

@ -272,7 +272,7 @@ void CanvasRenderingContext2D::fill_internal(Gfx::Path& path, StringView fill_ru
if (auto color = drawing_state.fill_style.as_color(); color.has_value()) {
painter.fill_path(path, *color, fill_rule);
} else {
painter.fill_path(path, drawing_state.fill_style.to_gfx_paint_style(), fill_rule);
painter.fill_path(path, drawing_state.fill_style.to_gfx_paint_style(), 1.0f, fill_rule);
}
return path.bounding_box();
});