summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-05-28 13:29:05 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-05-28 13:30:59 +0200
commitd95dd7acc4af3a4bd521d151ba3576b91d8ace53 (patch)
treecda2a4e0b87730f5357cb01bc7e3a8e035d739dc /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
parent47ba6632b1be5ab7f28726735fc7789916191ca7 (diff)
New virtual member function Fl_Graphics_Driver::colored_rectf().
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index 9b2fc6970..3b431e7dc 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -602,14 +602,14 @@ void Fl_Xlib_Graphics_Driver::draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void
innards(0,x+floor(offset_x_),y+floor(offset_y_),w,h,d,0,1,cb,data,0,gc_);
}
-void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
+void Fl_Xlib_Graphics_Driver::colored_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
if (fl_visual->depth > 16) {
- fl_color(r,g,b);
- fl_rectf(x,y,w,h);
+ Fl_Graphics_Driver::colored_rectf(x, y, w, h, r, g, b);
} else {
uchar c[3];
c[0] = r; c[1] = g; c[2] = b;
- innards(c,x,y,w,h,0,0,0,0,0,0,(GC)fl_graphics_driver->gc());
+ innards(c, floor(x), floor(y), floor(x + w) - floor(x), floor(y + h) - floor(y),
+ 0,0,0,0,0,0, (GC)gc());
}
}