summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2008-11-19 20:34:27 +0000
committerIan MacArthur <imacarthur@gmail.com>2008-11-19 20:34:27 +0000
commit865f3d8e61f5fe7a582f1233b90bd2ef8260c827 (patch)
tree09421807f61cff4476a26387880c9bcef15e0e27 /FL
parent9c7af9b2cf586dd9aaf0b11793514f458d09afed (diff)
STR 2076: experimental fl_text_extents patch applied. Please feedback comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/fl_draw.H10
1 files changed, 7 insertions, 3 deletions
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 4511ccc4f..4a17bdec1 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -194,12 +194,16 @@ inline int fl_height(int, int size) {return size;}
draw the text at so it looks centered vertically in that box.
*/
FL_EXPORT int fl_descent();
-/** Return the pixel width of a nul-terminated string */
+/** Return the typographical width of a nul-terminated string */
FL_EXPORT double fl_width(const char* txt);
-/** Return the pixel width of a sequence of \a n characters */
+/** Return the typographical width of a sequence of \a n characters */
FL_EXPORT double fl_width(const char* txt, int n);
-/** Return the pixed width of a single character */
+/** Return the typographical width of a single character */
FL_EXPORT double fl_width(Fl_Unichar);
+/** Determine the minimum pixel dimensions of a nul-terminated string */
+FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h); // NO fltk symbol expansion
+/** Determine the minimum pixel dimensions of a sequence of \a n characters */
+FL_EXPORT void fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h);
/**
Draw a nul-terminated string starting at the given location.