diff options
| -rw-r--r-- | FL/Fl_Device.H | 3 | ||||
| -rw-r--r-- | src/fl_font_mac.cxx | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index b1eaea341..6b52ae674 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -128,6 +128,9 @@ protected: friend void fl_line(int x, int y, int x1, int y1); friend void fl_line(int x, int y, int x1, int y1, int x2, int y2); friend void fl_draw(const char *str, int n, int x, int y); +#ifdef __APPLE__ + friend void fl_draw(const char *str, int n, float x, float y); +#endif friend void fl_draw(int angle, const char *str, int n, int x, int y); friend void fl_rtl_draw(const char *str, int n, int x, int y); friend void fl_font(Fl_Font face, Fl_Fontsize size); diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 1a67bf558..d7ac2dfcb 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -425,6 +425,10 @@ static CGColorRef flcolortocgcolor(Fl_Color i) void fl_draw(const char *str, int n, float x, float y) { + if(fl_device->type() != Fl_Quartz_Graphics_Driver::device_type) { + fl_device->draw(str, n, (int)x, (int)y ); + return; + } // avoid a crash if no font has been selected by user yet ! check_default_font(); // convert to UTF-16 first |
