summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-11-19 16:23:36 +0000
committerManolo Gouy <Manolo>2014-11-19 16:23:36 +0000
commitf52b457cc24c4c66d5d370d1529c5438ec4416df (patch)
tree7b9cc573abde7b8ee6ce458575ade1aab3a2fa55 /FL
parent659480f28beb44a7a805682563183698a279cd96 (diff)
Added full support of retina displays on the mac platform.
On such displays, one drawing unit equals two pixels. The fl_xyline() and fl_yxline() functions are modified to perform extra operations when drawing to a window on a retina display. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10463 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Device.H7
-rw-r--r--FL/mac.H1
2 files changed, 8 insertions, 0 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 619e41b16..5fc731d69 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -546,6 +546,10 @@ public:
*/
class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device {
static Fl_Display_Device *_display; // the platform display device
+#ifdef __APPLE__
+ friend class Fl_X;
+ static bool high_res_window_; // true when drawing to a window of a retina display
+#endif
public:
static const char *class_id;
const char *class_name() {return class_id;};
@@ -553,6 +557,9 @@ public:
Fl_Display_Device(Fl_Graphics_Driver *graphics_driver);
/** Returns the platform display device. */
static inline Fl_Display_Device *display_device() {return _display;};
+#ifdef __APPLE__
+ static bool high_resolution() {return high_res_window_;}
+#endif
};
/**
diff --git a/FL/mac.H b/FL/mac.H
index cb57c4e14..3bb282905 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -162,6 +162,7 @@ public:
static int insertion_point_location(int *px, int *py, int *pheight); // computes window coordinates & height of insertion point
static const int CoreText_threshold; // Mac OS version from which the Core Text API is used to display text
static Fl_Fontdesc* calc_fl_fonts(void); // computes the fl_fonts global variable
+ static void set_high_resolution(bool);
};
extern Window fl_window;