From d95dd7acc4af3a4bd521d151ba3576b91d8ace53 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 28 May 2021 13:29:05 +0200 Subject: New virtual member function Fl_Graphics_Driver::colored_rectf(). --- FL/Fl_Graphics_Driver.H | 2 ++ FL/fl_draw.H | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 58ea0062a..67b7a31bd 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -257,6 +257,8 @@ 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); + // 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); /** see fl_line(int, int, int, int, int, int) */ virtual void line(int x, int y, int x1, int y1, int x2, int y2); diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 30f5cfe1a..a84f310f8 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -264,8 +264,7 @@ inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_re solid-colored block using fl_draw_image() so that the correct color shade is produced. */ -/* note: doxygen comment here to avoid triplication in os-speciic files */ -FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); +inline void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) { fl_graphics_driver->colored_rectf(x,y,w,h,r,g,b); } // line segments: /** -- cgit v1.2.3