[Gtk-sharp-list] Best way to build a zoom effect?

Crucius, Wesley WCrucius at sandc.com
Thu Mar 16 23:00:35 EST 2006


I'd suggest using Inkscape to draw the text and save it as an SVG document and then use Gdk.Pixbuf to load and render to a bitmap.  If the text is static you can just use the ".svg file load with scaling version" of the constructor, otherwise, load the svg into an XML DOM doc, manipulate the width & height attributes of the SVG within the DOM (to scale it), save it as an XMLStream, and then use the stream version of the Pixbuf constructor.

I've done it both ways, so I know either one will work, however it is a bit CPU intensive.

Wes


-----Original Message-----
From: gtk-sharp-list-bounces at lists.ximian.com on behalf of Julien Sobrier
Sent: Thu 3/16/2006 9:21 PM
To: gtk-sharp-list at lists.ximian.com
Subject: [Gtk-sharp-list] Best way to build a zoom effect?
 
Hello,
I can't figure out a good way to have a zoom effect on a text: a text
gets from size N to size P, smoothly, as a movie. The only way I can
think of involve using Cairo to draw the text, and then calling the
method Cairo.Context.Scale(double, double) every x milliseconds. Is
there a better way to do that?

Thank you
Julien
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20060316/770b64ae/attachment-0001.html


More information about the Gtk-sharp-list mailing list