From 4903186cc512b884df44718a2e50586632f76197 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 4 Jun 2021 07:38:30 -0400 Subject: LibGfx: Add helper for painting a rounded rect with equal corner radii --- Userland/Libraries/LibGfx/Painter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Userland/Libraries/LibGfx/Painter.cpp') diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 685d94af07..a481570022 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -247,6 +247,11 @@ void Painter::fill_rect_with_gradient(const IntRect& a_rect, Color gradient_star return fill_rect_with_gradient(Orientation::Horizontal, a_rect, gradient_start, gradient_end); } +void Painter::fill_rect_with_rounded_corners(const IntRect& a_rect, Color color, int radius) +{ + return fill_rect_with_rounded_corners(a_rect, color, radius, radius, radius, radius); +} + void Painter::fill_rect_with_rounded_corners(const IntRect& a_rect, Color color, int top_left_radius, int top_right_radius, int bottom_right_radius, int bottom_left_radius) { // Fasttrack for rects without any border radii -- cgit v1.2.3