Re: [gtk-list] Gdk (and Xlib) text drawing
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Gdk (and Xlib) text drawing
- Date: 02 Mar 2000 20:25:15 -0500
Derek Simkowiak <dereks@kd-dev.com> writes:
> gdk_draw_text(), on the other hand, takes the "gint text_length"
> argument. With that length, I assume I don't have to have a
> NULL-terminated string. I.e., if I pass it a gchar *buffer that has 3
> megs of character data, but text_length is set to 5, I will only be
> sending those 5 character's worth of data to the server--correct? I won't
Yes, that's right.
> { 'a', 'b', '\0', 'c', 'd', 'e', 'f', ... }
>
> Will it only draw "ab", or will it draw up to the 'd'? If it will
> actually draw all five characters, how will it try to render the '\0'?
>
In my experience it draws abcd. I don't know if the behavior is
well-defined though. I would say avoid this situation.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]