summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Graphics_Driver.H3
-rw-r--r--FL/fl_draw.H17
2 files changed, 20 insertions, 0 deletions
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);
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 359405b7d..fc3e401ca 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -291,6 +291,15 @@ inline void fl_rect(int x, int y, int w, int h) {
}
/**
+ Draw a 1-pixel rounded border \e inside the given bounding box.
+ The radius code is optimized for speed and works best for values between
+ 5 and 15 units.
+ */
+inline void fl_rounded_rect(int x, int y, int w, int h, int r) {
+ fl_graphics_driver->rounded_rect(x, y, w, h, r);
+}
+
+/**
Draw a 1-pixel border \e inside the given bounding box.
This is the same as fl_rect(int x, int y, int w, int h) but with
Fl_Rect \p r as input argument.
@@ -320,6 +329,14 @@ inline void fl_rectf(int x, int y, int w, int h) {
fl_graphics_driver->rectf(x, y, w, h);
}
+/** Color with current color a rounded rectangle that exactly fills the given bounding box.
+ The radius code is optimized for speed and works best for values between
+ 5 and 15 units.
+*/
+inline void fl_rounded_rectf(int x, int y, int w, int h, int r) {
+ fl_graphics_driver->rounded_rectf(x, y, w, h, r);
+}
+
/** Color with passed color a rectangle that exactly fills the given bounding box. */
inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);