summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-20 15:36:49 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-20 15:36:49 +0100
commit4258aca717e30ccb0b07820dd0a471ad7e168198 (patch)
treed5c28926dc47a1c8f3963dc738895a3bff3523ba /src/drivers
parent0952d594f8f62d04880d7c0d743e6aab3c77e59b (diff)
Fix: Can't control scale of Fl_Copy_Surface dimensions on Linux (#1135)
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx6
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
index 3d8774fe1..cf334b2ad 100644
--- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
+++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
@@ -1493,8 +1493,7 @@ char Fl_Cairo_Graphics_Driver::can_do_alpha_blending() {
float Fl_Cairo_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);
- cairo_scale(cairo_, 1/s, 1/s);
+ scale(1);
}
return s;
}
@@ -1502,8 +1501,7 @@ float Fl_Cairo_Graphics_Driver::override_scale() {
void Fl_Cairo_Graphics_Driver::restore_scale(float s) {
if (s != 1.f && Fl_Display_Device::display_device()->is_current()) {
- Fl::screen_driver()->scale(0, s);
- cairo_scale(cairo_, s, s);
+ scale(s);
}
}
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
index fcd9e89c7..a9ca6cc88 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
@@ -159,15 +159,13 @@ void Fl_Quartz_Graphics_Driver::cache_size(Fl_Image *img, int &width, int &heigh
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);
- CGContextScaleCTM(gc_, 1/s, 1/s);
+ scale(1);
}
return s;
}
void Fl_Quartz_Graphics_Driver::restore_scale(float s) {
if (s != 1.f && Fl_Display_Device::display_device()->is_current()) {
- Fl::screen_driver()->scale(0, s);
- CGContextScaleCTM(gc_, s, s);
+ scale(s);
}
}