diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-02-27 08:18:01 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-02-27 08:18:01 +0100 |
| commit | 88a3f7b7be1110e0d4a8587e48f4ad24fe527646 (patch) | |
| tree | 2814389cecda21d4ecb85b70acda18e4f46370f4 /src | |
| parent | 5c1b69cd4fb35e55f78befa40af15391bfe067ea (diff) | |
Rename fl_remove_scale() to fl_override_scale() as discussed in fltk.general
Re: Can custom box type functions handle their own high-DPI screen scaling?
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx | 2 | ||||
| -rw-r--r-- | src/fl_draw.cxx | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 00eaf5a15..43e754130 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -626,7 +626,7 @@ void Fl_Graphics_Driver::overlay_rect(int x, int y, int w , int h) { loop(x, y, x+w-1, y, x+w-1, y+h-1, x, y+h-1); } -float Fl_Graphics_Driver::remove_scale() { return 1.f;} +float Fl_Graphics_Driver::override_scale() { return scale();} void Fl_Graphics_Driver::restore_scale(float) { } @@ -979,7 +979,7 @@ void Fl_Scalable_Graphics_Driver::draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void Fl_Scalable_Graphics_Driver::transformed_vertex0(float x, float y) {} -float Fl_Scalable_Graphics_Driver::remove_scale() { +float Fl_Scalable_Graphics_Driver::override_scale() { float s = scale(); if (s != 1.f) { push_no_clip(); diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H index 7e4aab962..d9051ecbd 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H @@ -188,7 +188,7 @@ protected: void descriptor_init(const char* name, Fl_Fontsize Size, Fl_Quartz_Font_Descriptor *d); #endif virtual void overlay_rect(int x, int y, int w , int h); - virtual float remove_scale(); + virtual float override_scale(); virtual void restore_scale(float); }; diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx index acabf6e73..ab95ce510 100644 --- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx @@ -160,7 +160,7 @@ void Fl_Quartz_Graphics_Driver::cache_size(Fl_Image *img, int &width, int &heigh height *= 2 * scale(); } -float Fl_Quartz_Graphics_Driver::remove_scale() { +float Fl_Quartz_Graphics_Driver::override_scale() { float s = scale(); if (s != 1.f && Fl_Display_Device::display_device()->is_current()) { Fl::screen_driver()->scale(0, 1.f); diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 538e63f2a..16906366d 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -464,14 +464,14 @@ int fl_height(int font, int size) { 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. + \return The GUI scaling factor value that was in place when the function started. */ -float fl_remove_scale() { - return fl_graphics_driver->remove_scale(); +float fl_override_scale() { + return fl_graphics_driver->override_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(). */ + \param s Value returned by a previous call to fl_override_scale(). */ void fl_restore_scale(float s) { fl_graphics_driver->restore_scale(s); } |
