From b16309f13e732e566c1beb4a02a2165ebb3ab4ab Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 24 Nov 2022 12:47:49 +0100 Subject: Refactor code to make rounded rectangles accessible (#553) This adds fl_rounded_rect and fl_rounded_rectf so the user can draw rounded rectangles. This uses existing and optimised code that is rearranged. --- FL/Fl_Graphics_Driver.H | 3 +++ 1 file changed, 3 insertions(+) (limited to 'FL/Fl_Graphics_Driver.H') diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 5de983554..0f25756d6 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -264,6 +264,9 @@ public: virtual void rect(int x, int y, int w, int h); virtual void focus_rect(int x, int y, int w, int h); virtual void rectf(int x, int y, int w, int h); + virtual void _rbox(int fill, int x, int y, int w, int h, int r); + virtual void rounded_rect(int x, int y, int w, int h, int r); + virtual void rounded_rectf(int x, int y, int w, int h, int r); // the default implementation is most likely enough virtual void colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); virtual void line(int x, int y, int x1, int y1); -- cgit v1.2.3