summaryrefslogtreecommitdiff
path: root/src/fl_gtk.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-02-06 15:22:24 +0100
committerGitHub <noreply@github.com>2022-02-06 15:22:24 +0100
commitdb0a1f4baeb928b54d328d5dfbd0ec37b0b58bd3 (patch)
treeed53495f5dd435d7c23cd4267fb785e5ebca679c /src/fl_gtk.cxx
parentaf4954aee3483f03ff69e990e80f4e4a18e8b7f6 (diff)
OpenGL implementation of all `fl_` "Drawing Fast Shapes" graphics calls (#385)
* Fix build system for unites, * Updated unittest to check OpenGL drawing. Making sure that OpenGL drawing is exactly the same as native drawing to make FLTK widget rendering look the same in GL windows. * Make OpenGL optional. * Implemented clipping in OpenGL * unites drawing fast shapes * Fixed CMake * Updating unittest. Added tests for fl_pi and fl_arc (int) Renamed tab to render complex shapes. * Improved OpenGL FLTK drawing emulation. * Fixed GTK ROUND DOWN BOX * Fixing Makefile for unittest * Correctly aligning OpenGL text. * Fixed text alignment in GL windows. Explained the "FLTK over GL " example in Cube. * Overlapping test. * Better GL graphics alignment. * Drawing the focus rect. * Adding Alpha Channel support for GL. * Added FLTK-on-GL documentation.
Diffstat (limited to 'src/fl_gtk.cxx')
-rw-r--r--src/fl_gtk.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fl_gtk.cxx b/src/fl_gtk.cxx
index bceae8ebb..eb47c6c2a 100644
--- a/src/fl_gtk.cxx
+++ b/src/fl_gtk.cxx
@@ -234,6 +234,16 @@ static void gtk_round_down_box(int x, int y, int w, int h, Fl_Color c) {
gtk_color(c);
draw(FILL, x, y, w, h, 2);
+ gtk_color(fl_color_average(FL_WHITE, c, 0.1f));
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 2);
+ draw(LOWER_RIGHT, x, y, w, h, 3);
+ gtk_color(fl_color_average(FL_WHITE, c, 0.2f));
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 1);
+ draw(LOWER_RIGHT, x, y, w, h, 2);
+ gtk_color(fl_color_average(FL_WHITE, c, 0.5f));
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 0);
+ draw(LOWER_RIGHT, x, y, w, h, 1);
+
gtk_color(fl_color_average(FL_BLACK, c, 0.05f));
draw(UPPER_LEFT, x, y, w, h, 2);
draw(UPPER_LEFT, x+1, y, w-2, h, 1);