[Gtk-sharp-list] Can't get Pango-sharp gravity attibute to work.

Skyler Brandt brandtsa at live.com
Mon Jun 1 16:34:43 UTC 2015

I am unable to get the gravity attribute to work with a pango layout. I've
tried both using markup and I'm not getting any errors or warnings from the
markup parser:
l.SetMarkup ("" + text + "");
and with inserting and changing the attribute into the layout AttrList:
l.Attributes.Insert (new Pango.AttrGravity (Pango.Gravity.East));
but neither draws the text vertically. AttrList.Change occasionally crashes
the program as well. I'm not really sure what I'm doing wrong or if gravity
works at all with Gtk#?

Here is the snippet of the all the code:
Pango.Layout l = new Pango.Layout (PangoContext);
l.FontDescription = Pango.FontDescription.FromString ("Courier New 11");
l.SetMarkup ("" + text + "");
GdkWindow.DrawLayout (Style.TextGC (StateType.Normal), x, y, l);
l.Dispose ();


View this message in context: http://mono.1490590.n4.nabble.com/Can-t-get-Pango-sharp-gravity-attibute-to-work-tp4666099.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list