<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
There is a very good tutorial on building GTK widgets with cairo here: <a
href="http://gnomejournal.org/article/34/writing-a-widget-using-cairo-and-gtk28">Writing
a Widget Using Cairo and GTK+2.8</a><br>
(<a class="moz-txt-link-freetext"
href="http://gnomejournal.org/article/34/writing-a-widget-using-cairo-and-gtk28">http://gnomejournal.org/article/34/writing-a-widget-using-cairo-and-gtk28</a>).
Because of its simplicity is an excellent example.<br>
<br>
Ken Resander wrote:
<blockquote cite="mid:594070.32687.qm@web51012.mail.re2.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;"
valign="top">I am in the process of moving away from Windows to Ubuntu
8.10 for personal and programming use. I have read the GDK
documentation, but have no programming experience on GDK yet other than
compiling and running tiny programs from tutorials. Also, I have never
used Cairo, but have read overviews and tutorials. It looks nice. <br>
<br>
I intend to port about ten programs, most having simple GUIs and
graphics that should map without much difficulty to GDK/GTK and Cairo
as far as I can see. <br>
<br>
However, two applications need to scroll bitmaps in dialog
controls/windows and also print them. The bitmaps are derived from
images (jpeg, bmp etc) or rendering buffers generated by AGG 2.4.
Windows with Win32 API does not support scrolling of bitmaps, so I had
to do it myself by using bitblt and ScrollWindow functions on events. A
bit fiddly, but in the end it worked reasonably well.<br>
<br>
How does Cairo + GDK help me scrolling and printing bitmaps? Hope it is
more straightforward.<br>
<br>
</td>
</tr>
</tbody>
</table>
</blockquote>
Glib has <a
href="http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add">timer
functions</a>
(<a class="moz-txt-link-freetext" href="http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add">http://library.gnome.org/devel/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add</a>),
you
could use those. Personally, I'm using <a
href="http://www.gnu.org/software/libtool/manual/libc/Setting-an-Alarm.html">Alarms</a>
(<a class="moz-txt-link-freetext"
href="http://www.gnu.org/software/libtool/manual/libc/Setting-an-Alarm.html">http://www.gnu.org/software/libtool/manual/libc/Setting-an-Alarm.html</a>)<br>
<blockquote cite="mid:594070.32687.qm@web51012.mail.re2.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;"
valign="top">P.S. Would also be nice to have a print preview function.
Tried coding this on Windows too, but could not get the zoom to work.<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<hr size="1"> <a moz-do-not-send="true"
href="http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/">Get
your preferred Email name! </a> <br>
Now you can @ymail.com and @rocketmail.com.
<pre wrap=""><hr size="4" width="90%">
_______________________________________________
cairo mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:cairo@cairographics.org">cairo@cairographics.org</a>
<a class="moz-txt-link-freetext"
href="http://lists.cairographics.org/mailman/listinfo/cairo">http://lists.cairographics.org/mailman/listinfo/cairo</a></pre>
</blockquote>
<br>
</body>
</html>