summaryrefslogtreecommitdiff
path: root/FL/Fl_Graphics_Driver.H
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-25 11:06:54 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-25 11:07:07 +0100
commit5bd467fa17be55397f433dddc065b57cbb7a0615 (patch)
tree6698febfde050bf76f84873ea749b031467d7cbb /FL/Fl_Graphics_Driver.H
parentbef46b5cb82464713a117b9bdb920735d1b7de37 (diff)
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?
Diffstat (limited to 'FL/Fl_Graphics_Driver.H')
-rw-r--r--FL/Fl_Graphics_Driver.H4
1 files changed, 4 insertions, 0 deletions
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