Author: manolo
Date: 2010-06-24 14:55:20 -0700 (Thu, 24 Jun 2010)
New Revision: 7654
Log:
Mac OS X: fixed bug where fl_draw(const char*, int, float, float) would not 
work on non-Quartz device

Modified:
   branches/branch-1.3/FL/Fl_Device.H
   branches/branch-1.3/src/fl_font_mac.cxx

Modified: branches/branch-1.3/FL/Fl_Device.H
===================================================================
--- branches/branch-1.3/FL/Fl_Device.H  2010-06-24 08:55:04 UTC (rev 7653)
+++ branches/branch-1.3/FL/Fl_Device.H  2010-06-24 21:55:20 UTC (rev 7654)
@@ -128,6 +128,9 @@
   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);

Modified: branches/branch-1.3/src/fl_font_mac.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_mac.cxx     2010-06-24 08:55:04 UTC (rev 
7653)
+++ branches/branch-1.3/src/fl_font_mac.cxx     2010-06-24 21:55:20 UTC (rev 
7654)
@@ -425,6 +425,10 @@
 
 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

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to