aboutsummaryrefslogtreecommitdiff
path: root/Linux_C_12/cpicture_121.c
diff options
context:
space:
mode:
authorCamil Staps2015-08-07 11:44:48 +0200
committerCamil Staps2015-08-07 11:44:48 +0200
commit6ebf74a468ea6c4c667a0592aa59683f745bfdfe (patch)
treecf4ccc91197ffbdf655fe9f80700b48413c2ad65 /Linux_C_12/cpicture_121.c
parentDebugging; 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.c5
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));