1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:18:12 +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

@ -40,7 +40,7 @@ ErrorOr<void> CanvasPathClipper::apply_clip(Gfx::Painter& painter)
painter.blit(actual_save_rect.location(), *m_saved_clip_region, m_saved_clip_region->rect(), 1.0f, false);
Gfx::AntiAliasingPainter aa_painter { painter };
auto fill_offset = m_bounding_box.location() - actual_save_rect.location();
aa_painter.fill_path(m_canvas_clip.path, TRY(Gfx::BitmapPaintStyle::create(clip_area, fill_offset)), m_canvas_clip.winding_rule);
aa_painter.fill_path(m_canvas_clip.path, TRY(Gfx::BitmapPaintStyle::create(clip_area, fill_offset)), 1.0f, m_canvas_clip.winding_rule);
return {};
}
}