|
|
On Apr 26, 2006, at 6:00 PM, magik wrote:
here is code, it is strange, if text is text without spaces it
returns good
w value, but if there are spaces "sadfsdfasdf adsfasdf" it gives w
some
about "sadfsdfasdf" but not all... h value is alvays good...
int w, h;
...
fl_measure(text, w, h);
The manual to fl_measure says: "Measure how wide and tall the string
will be when printed by the fl_draw(...align) function. If the
incoming w is non-zero it will wrap to that width.".
So in you case, you must set w and h to zero before calling the
function, or it will do text wrapping at the space character
(depending on what random value is in w).
----
http://robowerk.com/
[ Direct Link to Message ] | |
|
| |