Author: ianmacarthur
Date: 2009-02-15 14:20:50 -0800 (Sun, 15 Feb 2009)
New Revision: 6662
Log:
Attempt to add doygen comments to the description of fl_text_extents to clarify
its usage, as suggested by Greg
Modified:
branches/branch-1.3/FL/fl_draw.H
Modified: branches/branch-1.3/FL/fl_draw.H
===================================================================
--- branches/branch-1.3/FL/fl_draw.H 2009-02-15 21:52:49 UTC (rev 6661)
+++ branches/branch-1.3/FL/fl_draw.H 2009-02-15 22:20:50 UTC (rev 6662)
@@ -158,7 +158,7 @@
FL_EXPORT void fl_transformed_vertex(double x, double y);
/** @} */
-/** \addtogroup fl_attributes
+/** \addtogroup fl_attributes
@{ */
/* NOTE: doxygen comments here to avoid triplication in os-specific sources */
/**
@@ -211,13 +211,22 @@
FL_EXPORT double fl_width(const char* txt);
/** Return the typographical width of a sequence of \a n characters */
FL_EXPORT double fl_width(const char* txt, int n);
-/** Return the typographical width of a single character :
- \note if a valid fl_gc is NOT found then it uses the first window gc,
+/** Return the typographical width of a single character :
+ \note if a valid fl_gc is NOT found then it uses the first window gc,
or the screen gc if no fltk window is available when called. */
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 */
+/** Determine the minimum pixel dimensions of a nul-terminated string.
+
+Usage: given a string "txt" drawn using fl_draw(txt, x, y) you would determine
+its pixel extents on the display using fl_text_extents(txt, dx, dy, wo, ho)
+such that a bounding box that exactly fits around the text could be drawn with
+fl_rect(x+dx, y+dy, wo, ho). Note the dx, dy values hold the offset of the
first
+"colored in" pixel of the string, from the draw origin.
+*/
+FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h);
// NO fltk symbol expansion will be performed
+/** Determine the minimum pixel dimensions of a sequence of \a n characters.
+\see fl_text_extents(const char*, int& dx, int& dy, int& w, int& h)
+*/
FL_EXPORT void fl_text_extents(const char*, int n, int& dx, int& dy, int& w,
int& h);
// font encoding:
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit