Author: manolo
Date: 2010-06-21 08:49:45 -0700 (Mon, 21 Jun 2010)
New Revision: 7652
Log:
Fix STR 2339 by defining new member function rtl_draw of class 
Fl_Graphics_Driver

Modified:
   branches/branch-1.3/FL/Fl_Device.H
   branches/branch-1.3/FL/fl_draw.H
   branches/branch-1.3/src/fl_font_mac.cxx
   branches/branch-1.3/src/fl_font_win32.cxx
   branches/branch-1.3/src/fl_font_x.cxx
   branches/branch-1.3/src/fl_font_xft.cxx

Modified: branches/branch-1.3/FL/Fl_Device.H
===================================================================
--- branches/branch-1.3/FL/Fl_Device.H  2010-06-19 15:19:13 UTC (rev 7651)
+++ branches/branch-1.3/FL/Fl_Device.H  2010-06-21 15:49:45 UTC (rev 7652)
@@ -129,6 +129,7 @@
   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);
   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);
   friend void fl_color(Fl_Color c);
   friend void fl_color(uchar r, uchar g, uchar b);
@@ -193,6 +194,8 @@
   virtual void draw(const char *str, int n, int x, int y);
   /** \brief see fl_draw(int angle, const char *str, int n, int x, int y). */
   virtual void draw(int angle, const char *str, int n, int x, int y);
+  /** \brief see fl_rtl_draw(const char *str, int n, int x, int y). */
+  virtual void rtl_draw(const char *str, int n, int x, int y);
   /** \brief see fl_font(Fl_Font face, Fl_Fontsize size). */
   virtual void font(Fl_Font face, Fl_Fontsize size);
   /** \brief see fl_color(Fl_Color c). */

Modified: branches/branch-1.3/FL/fl_draw.H
===================================================================
--- branches/branch-1.3/FL/fl_draw.H    2010-06-19 15:19:13 UTC (rev 7651)
+++ branches/branch-1.3/FL/fl_draw.H    2010-06-21 15:49:45 UTC (rev 7652)
@@ -563,7 +563,7 @@
 /**
   Draws an array of \p n characters right to left starting at given location.
 */
-FL_EXPORT void fl_rtl_draw(const char*, int n, int x, int y);
+inline void fl_rtl_draw(const char* str, int n, int x, int y) 
{fl_device->rtl_draw(str,n,x,y); };
 FL_EXPORT void fl_measure(const char* str, int& x, int& y,
                           int draw_symbols = 1);
 FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,

Modified: branches/branch-1.3/src/fl_font_mac.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_mac.cxx     2010-06-19 15:19:13 UTC (rev 
7651)
+++ branches/branch-1.3/src/fl_font_mac.cxx     2010-06-21 15:49:45 UTC (rev 
7652)
@@ -488,8 +488,8 @@
   CGContextRestoreGState(fl_gc);
 }
 
-void fl_rtl_draw(const char* c, int n, int x, int y) {
-  fl_draw(c, n, x - fl_width(c, n), y); //to check;
+void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
+  draw(c, n, x - fl_width(c, n), y);
 }
 
 //

Modified: branches/branch-1.3/src/fl_font_win32.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_win32.cxx   2010-06-19 15:19:13 UTC (rev 
7651)
+++ branches/branch-1.3/src/fl_font_win32.cxx   2010-06-21 15:49:45 UTC (rev 
7652)
@@ -386,7 +386,7 @@
   fl_font(fl_font_, fl_size_);
 }
 
-void fl_rtl_draw(const char* c, int n, int x, int y) {
+void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
   int wn;
   int i = 0;
   int lx = 0;

Modified: branches/branch-1.3/src/fl_font_x.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_x.cxx       2010-06-19 15:19:13 UTC (rev 
7651)
+++ branches/branch-1.3/src/fl_font_x.cxx       2010-06-21 15:49:45 UTC (rev 
7652)
@@ -335,7 +335,7 @@
 //  fl_draw(str, n, (int)x, (int)y);
 //}
 
-void fl_rtl_draw(const char* c, int n, int x, int y) {
+void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
   if (font_gc != fl_gc) {
     if (!current_font) fl_font(FL_HELVETICA, 12);
     font_gc = fl_gc;

Modified: branches/branch-1.3/src/fl_font_xft.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_xft.cxx     2010-06-19 15:19:13 UTC (rev 
7651)
+++ branches/branch-1.3/src/fl_font_xft.cxx     2010-06-21 15:49:45 UTC (rev 
7652)
@@ -584,7 +584,7 @@
 }
 
 
-void fl_rtl_draw(const char* c, int n, int x, int y) {
+void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
 
 #if defined(__GNUC__)
 #warning Need to improve this XFT right to left draw function

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

Reply via email to