summaryrefslogtreecommitdiff
path: root/src/fl_color.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-04-17 15:01:20 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-04-17 15:01:20 +0000
commitc9d3eabf4e201384a930707fbe1b8a01771f5e3d (patch)
treefc9c2a47341ad484ebe787a8cf6524ac8b62ceaf /src/fl_color.cxx
parent9ae4a99081237f94d47a480d41313dc65737bd98 (diff)
virtualized Fl::set_color and free_color.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_color.cxx')
-rw-r--r--src/fl_color.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fl_color.cxx b/src/fl_color.cxx
index c3021e7ea..3c7dece44 100644
--- a/src/fl_color.cxx
+++ b/src/fl_color.cxx
@@ -25,6 +25,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Device.H>
+#include <FL/Fl_Graphics_Driver.H>
#include <FL/Fl.H>
// fl_cmap needs to be defined globally (here) and is used in the device
@@ -65,6 +66,19 @@ void Fl::set_color(Fl_Color i, uchar red, uchar green, uchar blue) {
((unsigned)red<<24)+((unsigned)green<<16)+((unsigned)blue<<8));
}
+
+void Fl::set_color(Fl_Color i, unsigned int c)
+{
+ fl_graphics_driver->set_color(i, c);
+}
+
+
+void Fl::free_color(Fl_Color i, int overlay)
+{
+ fl_graphics_driver->free_color(i, overlay);
+}
+
+
/**
Returns the RGB value(s) for the given FLTK color index.