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

Skyler Brandt brandtsa at live.com
Tue Jun 2 15:22:09 UTC 2015


I pulled a rookie mistake and the forum editor took my <span> code as actual html code. The makeup line should look like this:
l.SetMarkup ("<span gravity=\"east\" color=\"black\">" + text + "</span>");

Skyler

> From: gtk-sharp-list-request at lists.ximian.com
> Subject: Gtk-sharp-list Digest, Vol 121, Issue 1
> To: gtk-sharp-list at lists.ximian.com
> Date: Tue, 2 Jun 2015 12:00:03 +0000
> 
> Send Gtk-sharp-list mailing list submissions to
> 	gtk-sharp-list at lists.ximian.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> or, via email, send a message with subject or body 'help' to
> 	gtk-sharp-list-request at lists.ximian.com
> 
> You can reach the person managing the list at
> 	gtk-sharp-list-owner at lists.ximian.com
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gtk-sharp-list digest..."
> 
> 
> Today's Topics:
> 
>    1. Can't get Pango-sharp gravity attibute to work. (Skyler Brandt)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 1 Jun 2015 09:34:43 -0700 (PDT)
> From: Skyler Brandt <brandtsa at live.com>
> To: gtk-sharp-list at lists.ximian.com
> Subject: [Gtk-sharp-list] Can't get Pango-sharp gravity attibute to
> 	work.
> Message-ID: <1433176483659-4666099.post at n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 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 ();
> 
> Thanks
> 
> 
> 
> 
> --
> 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.
> 
> 
> ------------------------------
> 
> _______________________________________________
> Gtk-sharp-list mailing list
> Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 
> End of Gtk-sharp-list Digest, Vol 121, Issue 1
> **********************************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20150602/20e63f5a/attachment.html>


More information about the Gtk-sharp-list mailing list