LibWeb: Plumb svg stroking state to DisplayListPlayerSkia

The state is still ignored there, so no behavior change, but this
should make it fairly easy to actually implement complete stroking
support for SVGs.
This commit is contained in:
Nico Weber 2024-11-21 15:09:31 -05:00 committed by Jelle Raaijmakers
commit f4b0d17e4b
Notes: github-actions[bot] 2024-11-22 11:22:20 +00:00
7 changed files with 96 additions and 3 deletions

View file

@ -234,7 +234,16 @@ void MediaPaintable::paint_control_bar_speaker(PaintContext& context, HTML::HTML
path.quadratic_bezier_curve_to(device_point(16, 7.5), device_point(13, 12));
path.move_to(device_point(14, 0));
path.quadratic_bezier_curve_to(device_point(20, 7.5), device_point(14, 15));
context.display_list_recorder().stroke_path({ .path = path, .color = speaker_button_color, .thickness = 1 });
context.display_list_recorder().stroke_path({
.cap_style = Gfx::Path::CapStyle::Round,
.join_style = Gfx::Path::JoinStyle::Round,
.miter_limit = 4,
.dash_array = {},
.dash_offset = 0,
.path = path,
.color = speaker_button_color,
.thickness = 1,
});
if (media_element.muted()) {
context.display_list_recorder().draw_line(device_point(0, 0).to_type<int>(), device_point(20, 15).to_type<int>(), Color::Red, 2);