Sunday, April 08, 2007

Folding

One of the more frequent questions that I see is how to do interesting transition effects for applications. So here's how, first of all prototype your algorithm. Here we're going to use a page folding to visualize transitions as turning of pages. So that it looks like this:

Then we figure out how to adopt it to application. The trick is how to get contents of an application without extra repaints. In Qt the contents of top-level's is buffered and there is a private but exported way of fetching that contents (not fully platform independent at the moment). The example #2 shows how to grab the contents of the window without extra repaints and copies and use it to implement the effect, so it looks like this:

The forms were taken from Kate config dialogs so they're real config pages (hence also why they're, well, not too pretty). The effect is fully animated so to get a better idea of how it looks you'll have to look at the ogg file provided here. It's also worth noting that this effect is very efficient and works smoothly with virtually 0 cpu usage.

As mentioned in the last blog, to see more examples and code for this one visit Graphics Dojo. The above mentioned examples are at the examples 2 page.

Tuesday, April 03, 2007

Graphics Dojo

I have been traveling and working a lot lately. I was attending Bossa Conference, which was the best organized Open Source conference I had the pleasure of attending. I got to hang out with people I normally spend very little time with like Rasterman. Raster and I had some time to sit down and talk about graphics, Qt, Evas, chickens (don't ask), him being a crab killer (again, don't ask) and just have a lot of fun. Chris explained a few things about LLVM to me. It's always fun to hang out with Marcelo as well. All around it was a great time.

I went to spend a little time with my "family" in England last week which was also just amazing.

The most important news though is that thanks to amazing work that Marius did on labs.trolltech.com I've got a Qt focused graphics corner. Being a Graphics Ninja, I've decided to call it the Graphics Dojo. The first action point was the release of some of the examples that I wrote in my spare time. You can take a look at an overview here or go directly to page 1 or page 2. There's a few ones I've never shown before, like Mario Klingemann influenced Ring of Fire.



I hope that the "Graphics Dojo" and the articles which I'll be posting on it will help everyone write better looking interfaces.