diff options
Diffstat (limited to 'src/fl_draw.cxx')
| -rw-r--r-- | src/fl_draw.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 72a117df0..538e63f2a 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -458,3 +458,20 @@ int fl_height(int font, int size) { fl_font(tf,ts); // restore return(height); } + +/** Removes any GUI scaling factor in subsequent drawing operations. + This must be matched by a later call to fl_restore_scale(). + This function can be used to transiently perform drawing operations + that are not rescaled by the current value of the GUI scaling factor. + The resulting drawing context has no clipping region. + \return The GUI scaling factor value that was applied when the function started. + */ +float fl_remove_scale() { + return fl_graphics_driver->remove_scale(); +} + +/** Restores the GUI scaling factor and the clipping region in subsequent drawing operations. + \param s Value returned by a previous call to fl_remove_scale(). */ +void fl_restore_scale(float s) { + fl_graphics_driver->restore_scale(s); +} |
