Re: [fltk.development] [RFE] STR #2941: RFE: fl_text_extents(): supportmultiple lines
On 03/27/13 11:41, chris wrote: > Hm, doesn't fl_measure() do all this already? No, fl_measure() measures typographical area, whereas fl_text_extents() measures the 'inking area'. These are very different. See the test/unittests program, "text rendering" test for a comparison of the two functions (red vs green boxes) In particular how the two functions calculate differently the bounding region for the characters ('), (-), and (_); fl_measure() returns the x,y and height for those characters, whereas fl_text_extents() does not. ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev
Re: [fltk.development] [RFE] STR #2941: RFE: fl_text_extents(): supportmultiple lines
Hm, doesn't fl_measure() do all this already? - chris > >Would be nice if an alternate version of fl_text_extents() were available >that could handle crlfs in the string. > >Probably wouldn't be too hard; just need to break the one string >into separate lines, then run the existing fl_text_extents() on each line. > >The tricky part would be to take into account FL_ALIGN_* flags.. > > >Link: http://www.fltk.org/str.php?L2941 >Version: 1.3-feature > ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev