mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:47:34 +00:00
LibGfx: Support AA rounded rectangles with elliptical borders
This commit is contained in:
parent
125a71d36d
commit
2366a73474
2 changed files with 56 additions and 55 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue