summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Graphics_Driver.cxx2
-rw-r--r--src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx6
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index 78678de55..4f69967d6 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -1199,7 +1199,6 @@ void Fl_Scalable_Graphics_Driver::draw_image_mono_unscaled(Fl_Draw_Image_Cb cb,
float Fl_Scalable_Graphics_Driver::override_scale() {
float s = scale();
if (s != 1.f) {
- push_no_clip();
scale(1.f);
}
return s;
@@ -1208,7 +1207,6 @@ float Fl_Scalable_Graphics_Driver::override_scale() {
void Fl_Scalable_Graphics_Driver::restore_scale(float s) {
if (s != 1.f) {
scale(s);
- pop_clip();
}
}
diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
index cf334b2ad..236a677b1 100644
--- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
+++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
@@ -1493,7 +1493,8 @@ 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()) {
- scale(1);
+ cairo_scale(cairo_, 1./s, 1./s);
+ Fl_Graphics_Driver::scale(1);
}
return s;
}
@@ -1501,7 +1502,8 @@ 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()) {
- scale(s);
+ cairo_scale(cairo_, s, s);
+ Fl_Graphics_Driver::scale(s);
}
}
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
index a9ca6cc88..7ee610d24 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
@@ -159,13 +159,15 @@ 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()) {
- scale(1);
+ CGContextScaleCTM(gc_, 1./s, 1./s);
+ Fl_Graphics_Driver::scale(1);
}
return s;
}
void Fl_Quartz_Graphics_Driver::restore_scale(float s) {
if (s != 1.f && Fl_Display_Device::display_device()->is_current()) {
- scale(s);
+ CGContextScaleCTM(gc_, s, s);
+ Fl_Graphics_Driver::scale(s);
}
}