Re: Question about pango_layout_set_spacing().
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Tom Liu <tom liu flextrade com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Question about pango_layout_set_spacing().
- Date: Sat, 03 Jan 2004 12:18:38 +0200
Tom Liu wrote:
HI,
I have labe has 2 lines. I want to set the space between the lines, The
following code don't work.
GtkWidget *lbl= gtk_label_new("line1\nline2")
PangoLayout *ly=gtk_label_get_layout(GTK_LABEL(lbl));
pango_layout_set_spacing(ly,20);
Can some one give a look?
Hello,
Try this:
pango_layout_set_spacing(ly, 20*PANGO_SCALE);
Pango uses internal units to represent distances:
http://developer.gnome.org/doc/API/2.0/pango/pango-Glyph-Storage.html#PANGO-SCALE-CAPS
http://developer.gnome.org/doc/API/2.0/pango/pango-Glyph-Storage.html#PANGO-PIXELS-CAPS
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]