diff options
| author | Manolo Gouy <Manolo> | 2011-02-18 13:39:48 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-18 13:39:48 +0000 |
| commit | 199b32d9213584e232aee11d2a4d16a26f1d508d (patch) | |
| tree | ff04fbca414c4ab7a497283f082bcf5f12b9a6de /src/Fl_Device.cxx | |
| parent | 2c129b4833f45157fde8f90451240d4c00bbc96d (diff) | |
Added virtual width(), height(), descent() and text_extents() functions to the Fl_Graphics_Driver
class to prepare for the future definition of graphics drivers that fully deal with text measurement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Device.cxx')
| -rw-r--r-- | src/Fl_Device.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index acc94ca65..2b98bdf39 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -64,6 +64,14 @@ Fl_Graphics_Driver::Fl_Graphics_Driver() { font_descriptor_ = NULL; }; +void Fl_Graphics_Driver::text_extents(const char*t, int n, int& dx, int& dy, int& w, int& h) +{ + w = (int)width(t, n); + h = - height(); + dx = dy = 0; +} + + // // End of "$Id$". // |
