Gdk (and Xlib) text drawing
- From: Derek Simkowiak <dereks kd-dev com>
- To: gtk-list redhat com
- Subject: Gdk (and Xlib) text drawing
- Date: Thu, 2 Mar 2000 15:34:35 -0800 (PST)
I take it that gdk_draw_string() draws up to the first '\0' it
encounters (ala strlen).
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
actually be passing 3 megs of text acrossed the network, will I?
Also, what happens if I call
gdk_draw_text(mywindow, myfont, mygc, x, y, some_text, 5);
...where some_text points to:
{ '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'?
Thank You,
Derek Simkowiak
dereks@kd-dev.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]