mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-30 05:05:10 +00:00
LibGfx/AntialiasingPainter: Allow passing through a cap style
This commit is contained in:
parent
67bf00c6b0
commit
7f528a4fa6
|
@ -200,12 +200,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, float opacity)
|
||||
void AntiAliasingPainter::stroke_path(Path const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Path::CapStyle cap_style)
|
||||
{
|
||||
if (thickness <= 0)
|
||||
return;
|
||||
// FIXME: Cache this? Probably at a higher level such as in LibWeb?
|
||||
fill_path(path.stroke_to_fill(thickness), paint_style, opacity);
|
||||
fill_path(path.stroke_to_fill(thickness, cap_style), paint_style, opacity);
|
||||
}
|
||||
|
||||
void AntiAliasingPainter::fill_rect(FloatRect const& float_rect, Color color)
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
void fill_path(Path const&, PaintStyle const& paint_style, float opacity = 1.0f, 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, float opacity = 1.0f);
|
||||
void stroke_path(Path const&, PaintStyle const& paint_style, float thickness, float opacity = 1.0f, Path::CapStyle cap_style = Path::CapStyle::Round);
|
||||
|
||||
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