summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-07-30 17:41:22 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-07-30 17:41:35 +0200
commit889acc7d74a8d5c79d4016900294246a9b04b9c2 (patch)
treec261b240934887ba2f720c8c3fe08b9dab301f16 /src/drivers/Quartz
parentf9bdb5a4db18a6641ba9d78d348fb521750a0fde (diff)
Fix use of an SVG image in Fl_Tiled_Image when display is rescaled.
Diffstat (limited to 'src/drivers/Quartz')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H1
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H
index 6f511c6e4..67265c304 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.H
@@ -59,6 +59,7 @@ protected:
CGLineJoin quartz_line_join_;
CGFloat *quartz_line_pattern;
int quartz_line_pattern_size;
+ virtual void cache_size(int &width, int &height);
public:
Fl_Quartz_Graphics_Driver();
virtual ~Fl_Quartz_Graphics_Driver() { if (p) free(p); }
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
index 4ea518c9a..f8fab114e 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver.cxx
@@ -153,3 +153,8 @@ void Fl_Quartz_Graphics_Driver::XDestroyRegion(Fl_Region r) {
free(r);
}
}
+
+void Fl_Quartz_Graphics_Driver::cache_size(int &width, int &height) {
+ width *= 2 * scale();
+ height *= 2 * scale();
+}