diff options
| author | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-05-27 17:20:18 +0000 |
| commit | 26049351e09d75bdf8b35273a76cf65202583fa7 (patch) | |
| tree | 010685555b9f83d071a14262e8ce346c7388f254 /src/fl_font_win32.cxx | |
| parent | 0a280ce591046f6834f1233087a72fa6bdd97bad (diff) | |
Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_font_win32.cxx')
| -rw-r--r-- | src/fl_font_win32.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index fd0e3fdbf..7220eb3b9 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -24,6 +24,9 @@ // // http://www.fltk.org/str.php // + +#include <FL/Fl_Printer.H> + static int fl_angle_ = 0; #ifndef FL_DOXYGEN @@ -143,7 +146,7 @@ void fl_font(Fl_Font fnum, Fl_Fontsize size, int angle) { fl_fontsize = find(fnum, size, angle); } -void Fl_Device::font(Fl_Font fnum, Fl_Fontsize size) { +void Fl_Graphics_Driver::font(Fl_Font fnum, Fl_Fontsize size) { fl_font(fnum, size, 0); } @@ -247,7 +250,7 @@ static void on_printer_extents_update(int &dx, int &dy, int &w, int &h) // if printer context, extents shd be converted to logical coords #define EXTENTS_UPDATE(x,y,w,h) \ - if (Fl_Device::current()->type() == Fl_Device::gdi_printer) { on_printer_extents_update(x,y,w,h); } + if (Fl_Surface_Device::surface()->type() == Fl_Printer::device_type) { on_printer_extents_update(x,y,w,h); } static unsigned short *ext_buff = NULL; // UTF-16 converted version of input UTF-8 string static unsigned wc_len = 0; // current string buffer dimension @@ -331,7 +334,7 @@ exit_error: return; } // fl_text_extents -void Fl_Device::draw(const char* str, int n, int x, int y) { +void Fl_Graphics_Driver::draw(const char* str, int n, int x, int y) { int i = 0; int lx = 0; char *end = (char *)&str[n]; @@ -359,7 +362,7 @@ void Fl_Device::draw(const char* str, int n, int x, int y) { SetTextColor(fl_gc, oldColor); } -void Fl_Device::draw(int angle, const char* str, int n, int x, int y) { +void Fl_Graphics_Driver::draw(int angle, const char* str, int n, int x, int y) { fl_font(fl_font_, fl_size_, angle); // fl_draw(str, n, (int)x, (int)y); int i = 0, i2=0; |
