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
commit eb4a58528e
Notes: sideshowbarker 2024-07-16 18:35:33 +09:00
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();
});