From ce71c4b679b7afdb07de1133d0c600051e2601f6 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 22 May 2018 17:00:27 +0000 Subject: Add Fl::screen_scale(int) function to get the scaling factor value of a screen. This allows to keep class Fl_Screen_Driver away from the public API. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Fl.cxx') diff --git a/src/Fl.cxx b/src/Fl.cxx index 6e60e524c..81aecdb25 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -2110,6 +2110,12 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) { return Fl_Graphics_Driver::default_driver().get_font_sizes(fnum, sizep); } +/** Current value of the GUI scaling factor for screen number \p n */ +float Fl::screen_scale(int n) { + return Fl::screen_driver()->scale(n); +} + + // Pointers you can use to change FLTK to another language. // Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx FL_EXPORT const char* fl_local_shift = Fl::system_driver()->shift_name(); -- cgit v1.2.3