diff options
Diffstat (limited to 'body/fltk.adb')
-rw-r--r-- | body/fltk.adb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/body/fltk.adb b/body/fltk.adb index d729364..0e391e3 100644 --- a/body/fltk.adb +++ b/body/fltk.adb @@ -23,6 +23,12 @@ package body FLTK is pragma Import (C, fl_enum_rgb_color, "fl_enum_rgb_color"); pragma Inline (fl_enum_rgb_color); + function fl_enum_contrast + (F, B : in Interfaces.C.unsigned) + return Interfaces.C.unsigned; + pragma Import (C, fl_enum_contrast, "fl_enum_contrast"); + pragma Inline (fl_enum_contrast); + @@ -120,6 +126,16 @@ package body FLTK is end RGB_Color; + function Contrast + (Fore, Back : in Color) + return Color is + begin + return Color (fl_enum_contrast + (Interfaces.C.unsigned (Fore), + Interfaces.C.unsigned (Back))); + end Contrast; + + function "+" |