All:
I cant think of a good way to word this, so allow me to provide an
example of my problem.
Displaying string: " The quick brown fox jumped over the lazy brown dog"
Break string up into lines using GetStringBreak()...
Rendering to the screen gives....
+-------------------------+
| The quick brown |
| fox jumped over |
| the lazy brown |
| do |
~ ~
+-------------------------+
I noticed that the length of the sub string return on the last call to
GetStringBreak() was always 1 less than number of characters, so I
modified GetStringBreak() to correct this problem.
--- git/src/media/idirectfbfont.c~org 2007-04-18 12:46:00.000000000 -0400
+++ git/src/media/idirectfbfont.c 2007-04-18 12:46:18.000000000 -0400
@@ -497,7 +497,7 @@
if (width<max_width && string >= end) {
*ret_next_line = NULL;
- *ret_str_length = length-1;
+ *ret_str_length = length;
*ret_width = width;
return DFB_OK;
Unless I am missing something, I didnt see the need for the - 1. I
have tested this code and it works fine. I would appreciate any
input.
--
Rich
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users