mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
LibGfx: Make it possible to stroke a path with a paint style
This commit is contained in:
parent
1367809142
commit
8993a710f8
Notes:
sideshowbarker
2024-07-17 02:59:43 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/8993a710f8 Pull-request: https://github.com/SerenityOS/serenity/pull/19287 Reviewed-by: https://github.com/MacDue ✅
2 changed files with 7 additions and 0 deletions
|
@ -198,6 +198,12 @@ void AntiAliasingPainter::stroke_path(Path const& path, Color color, float thick
|
|||
fill_path(path.stroke_to_fill(thickness), color);
|
||||
}
|
||||
|
||||
void AntiAliasingPainter::stroke_path(Path const& path, Gfx::PaintStyle const& paint_style, float thickness)
|
||||
{
|
||||
// FIXME: Cache this? Probably at a higher level such as in LibWeb?
|
||||
fill_path(path.stroke_to_fill(thickness), paint_style);
|
||||
}
|
||||
|
||||
void AntiAliasingPainter::fill_rect(FloatRect const& float_rect, Color color)
|
||||
{
|
||||
// Draw the integer part of the rectangle:
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
void fill_path(Path const&, PaintStyle const& paint_style, Painter::WindingRule rule = Painter::WindingRule::Nonzero);
|
||||
|
||||
void stroke_path(Path const&, Color, float thickness);
|
||||
void stroke_path(Path const&, PaintStyle const& paint_style, float thickness);
|
||||
|
||||
void translate(float dx, float dy) { m_transform.translate(dx, dy); }
|
||||
void translate(FloatPoint delta) { m_transform.translate(delta); }
|
||||
|
|
Loading…
Reference in a new issue