From 199b32d9213584e232aee11d2a4d16a26f1d508d Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 18 Feb 2011 13:39:48 +0000 Subject: 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 --- src/Fl_Device.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Fl_Device.cxx') 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$". // -- cgit v1.2.3