1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:17:34 +00:00

LibGfx: Support AA rounded rectangles with elliptical borders

This commit is contained in:
MacDue 2022-06-12 14:44:29 +01:00 committed by Linus Groh
parent 125a71d36d
commit 2366a73474
2 changed files with 56 additions and 55 deletions

View file

@ -41,6 +41,18 @@ public:
void fill_rect_with_rounded_corners(IntRect const&, Color, int radius);
void fill_rect_with_rounded_corners(IntRect const&, Color, int top_left_radius, int top_right_radius, int bottom_right_radius, int bottom_left_radius);
struct CornerRadius {
int horizontal_radius;
int vertical_radius;
inline operator bool() const
{
return horizontal_radius > 0 && vertical_radius > 0;
}
};
void fill_rect_with_rounded_corners(IntRect const&, Color, CornerRadius top_left, CornerRadius top_right, CornerRadius bottom_right, CornerRadius bottom_left);
private:
struct Range {
int min;