mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibWeb: Use the AA painter for drawing dotted lines
The AA painter will actually draw the dots as circles, which is how other browsers handle this.
This commit is contained in:
parent
6139fc5c87
commit
e4cca7886e
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/e4cca7886e Pull-request: https://github.com/SerenityOS/serenity/pull/14319 Reviewed-by: https://github.com/linusg
1 changed files with 5 additions and 0 deletions
|
@ -133,6 +133,11 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& re
|
|||
p2.translate_by(int_width / 2, -int_width / 2);
|
||||
break;
|
||||
}
|
||||
if (border_style == CSS::LineStyle::Dotted) {
|
||||
Gfx::AntiAliasingPainter aa_painter { context.painter() };
|
||||
aa_painter.draw_line(p1.to_type<float>(), p2.to_type<float>(), color, int_width, gfx_line_style);
|
||||
return;
|
||||
}
|
||||
context.painter().draw_line(p1, p2, color, int_width, gfx_line_style);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue