From 5bd467fa17be55397f433dddc065b57cbb7a0615 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 25 Feb 2021 11:06:54 +0100 Subject: Add fl_remove_scale()/fl_restore_scale() to transiently draw without scaling factor. This new API is a response to this message in fltk.general : Can custom box type functions handle their own high-DPI screen scaling? --- FL/Fl_Graphics_Driver.H | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FL/Fl_Graphics_Driver.H') diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 8a7a93b6f..fdebd1d50 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -364,6 +364,8 @@ public: virtual void font_name(int num, const char *name); // Defaut implementation may be enough virtual void overlay_rect(int x, int y, int w , int h); + virtual float remove_scale(); + virtual void restore_scale(float); }; #ifndef FL_DOXYGEN @@ -486,6 +488,8 @@ protected: void transformed_vertex(double xf, double yf); virtual void transformed_vertex0(float x, float y); void vertex(double x, double y); + virtual float remove_scale(); + virtual void restore_scale(float); }; #endif // FL_DOXYGEN -- cgit v1.2.3