diff options
author | Camil Staps | 2015-08-07 11:44:48 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-07 11:44:48 +0200 |
commit | 6ebf74a468ea6c4c667a0592aa59683f745bfdfe (patch) | |
tree | cf4ccc91197ffbdf655fe9f80700b48413c2ad65 /Linux_C_12/cpicture_121.c | |
parent | Debugging; word sizes (Int -> pointer); fix CleanStrings (diff) |
Fixed some issues with strings
Diffstat (limited to 'Linux_C_12/cpicture_121.c')
-rw-r--r-- | Linux_C_12/cpicture_121.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Linux_C_12/cpicture_121.c b/Linux_C_12/cpicture_121.c index c036587..542bf24 100644 --- a/Linux_C_12/cpicture_121.c +++ b/Linux_C_12/cpicture_121.c @@ -1362,9 +1362,12 @@ void WinGetStringWidth (CLEAN_STRING string, CLEAN_STRING fontName, gint style, GtkWidget *widget;
gchar* fName;
gboolean inDrawIsWidget;
+ gchar* cstr;
printf("WinGetStringWidth\n");
fName = cstring(fontName);
+ cstr = cstring(string);
+
inDrawIsWidget = GTK_IS_WIDGET(drawable);
if (! inDrawIsWidget)
@@ -1389,7 +1392,7 @@ void WinGetStringWidth (CLEAN_STRING string, CLEAN_STRING fontName, gint style, pango_context_set_font_description(pc, fontDesc);
pl = pango_layout_new(pc);
- pango_layout_set_text(pl, string->characters, string->length);
+ pango_layout_set_text(pl, cstr, strlen(cstr));
pango_layout_get_pixel_size(pl, width, NULL);
g_object_unref(G_OBJECT(pl));
|