Re: [Mono-list] How to draw a text string to existing photo (gtk#)
On Sat, 2006-03-25 at 16:42 -0500, Miguel de Icaza wrote: Hello, I'm looking for an approach to put some text string to existing jpeg image. Now I can load a photo into Gdk.Pixbuf and I can create Pango.Layout for a text string. So I have my image in a Gdk.Pixbuf and my text string in a Pango.Layout, how can I put those things together to obtain an image with text drawn on it? Any suggestions and sample codes are welcome. You could use the System.Drawing API as it has this functionality already. If you want to stick to gtk# and Pixbufs, you need to render the pixbuf into a pixmap which is the only object that you can use to render text with Pango. This reminds me, gtk-sharp needs to wrap the pango_cairo_* functions from pango 1.10 as soon as possible so that people don't need to p/invoke when using pango with cairo surfaces (which has big advantages over the pixmap method). --Larry ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] How to draw a text string to existing photo (gtk#)
Hi all, I'm looking for an approach to put some text string to existing jpeg image. Now I can load a photo into Gdk.Pixbuf and I can create Pango.Layout for a text string. So I have my image in a Gdk.Pixbuf and my text string in a Pango.Layout, how can I put those things together to obtain an image with text drawn on it? Any suggestions and sample codes are welcome. Slava. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] How to draw a text string to existing photo (gtk#)
Hello, I'm looking for an approach to put some text string to existing jpeg image. Now I can load a photo into Gdk.Pixbuf and I can create Pango.Layout for a text string. So I have my image in a Gdk.Pixbuf and my text string in a Pango.Layout, how can I put those things together to obtain an image with text drawn on it? Any suggestions and sample codes are welcome. You could use the System.Drawing API as it has this functionality already. If you want to stick to gtk# and Pixbufs, you need to render the pixbuf into a pixmap which is the only object that you can use to render text with Pango. Then you transform the pixmap back into a pixbuf and save that. Miguel. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list