Archive for January, 2007

Going to FOSDEM 2007

Tuesday, January 23rd, 2007

It appears to be most possible for me to attend FOSDEM 2007 in about four weeks. Yeah! I will stick around both days, and I am looking forward to the Gnome-, Xorg-, desktop-, development, profiling- and OLPC-related talks. Aside from that I promised to stick heads together with Philip Van Hoof and Sven Herzberg regarding… ehm… graphics. If I’m not listening to a certain talk I’ll hang out in either the Xorg- or Gnome-devroom. I am looking forward to seeing all the shakers and movers of OpenSource again!

New GL-trick, git repositories

Sunday, January 7th, 2007

I’m always after good and clever tricks to improve the visual quality of rendered graphics (without hogging the CPU/GPU if possible). One of those tricks I demonstrate in gl-cairo-aatrick. It’s only for a limited number of use-cases I admit, but still of value for some bits in e.g. the newer cairo-clock, some CoverFlow-like plugin for rhythmbox or banshee and things like that.

The main idea behind it is to leverage the texture-filtering hardware of OpenGL-cards and “abuse” it for edge anti-aliasing of single quads or rectangles. Slightly trim the texture-image via cairo before uploading it to the OpenGL-card as a texture-object. You can easily cut out a fine thin line around the edges of a texture-image and at the same time - since using cairo - add some nicely rounded corners to it. How much to cut out can be controlled via a few parameters (see the use of cairo_draw_round_rect() in cairo_trim_image()). The names for those custom functions are not the wisest, as they imply to be part of the cairo-API, which they are not. But for the purpose of demonstration the chosen names are good enough.

To emphasize the visual impact of the trick here’s a close look at the edges of an image trimmed in gimp and applied as a texture, an image trimmed via cairo and applied as texture and finally an unaltered image applied as texture.


(click for full-size image)

The benefit of the improved quality is very obvious. Here’s a quick screencast too…


(click to play back, ogg/theora, ~1.4 MBytes)

(click to play back, ogg/theora, ~3.9 MBytes)

Sorry for the dropped frames in the screencast. I was in a hurry and didn’t pay much attention to the recording.

You can grab and read (again) about the new examples here. Since I’m able to host my git repositories now at freedesktop you can check them via gitweb there. Over time all my stuff will show up there, also cairo-clock and lowfat.

New video at banGang

Saturday, January 6th, 2007

Follow this link, and have fun watching!

It is my new hobby ;)

Thursday, January 4th, 2007

This time in farsi…


(click to play back, ogg/theora, ~1.6 MBytes)

(click to play back, avi/h.264, ~3.3 MBytes)


If you wonder what it means, it’s “Funky cairo twirling around!”. Thanks to Behdad Esfahbod for helping me do the translation, in case you wonder.

Look what just dropped out of my compiler…

Monday, January 1st, 2007

This could become my new hobby, doing stupid things to text with cairo. I remember an old remark form Owen Taylor (I believe it was on his blog), where he mentioned to be once impressed by seeing rotated text on a Windows box. Ok, this was long ago, and we have cairo and pango on the free desktop for some time now (also thanks to work from Owen). But sofar I have not yet seen something like this… not on Linux, Windows or MacOS X. Not only is the text rotated, it is twirly, wavy and animated moving along a path:


(click to play back, ogg/theora, ~4.5 MBytes)

(click to play back, avi/h.264, ~7.0 MBytes)

It’s heavy on the CPU (without the screencast-recording it runs at 30 fps however), but that is not the point at the moment. What I enjoy is being able to show what’s possible with cairo and expanding the collection of interesting demos to be eye-catchers for FOSS-technology. If I saw demos like those right from the start I would have jumped on cairo much earlier and with far more enthusiasm. BTW, this is shown running on the image-backend with latest cairo on a laptop with i915-graphics.