My blog has been moved to ariya.ofilabs.com.
Showing posts with label redwood city. Show all posts
Showing posts with label redwood city. Show all posts

Tuesday, November 04, 2008

visual google

Remember the tradition that I started in Redwood City? Well, the parallax sliding demo was for the graphics talk. For my QtWebKit presentation, the challenge was different. Basically it boils down to a visual version of Google Search. Instead only getting the hits and some text snippet, you should also get the web snapshot of the hits. There are apparently browser extensions out there which implement this kind of functionality.

Before going further, let us see first how we can get a preview of any web page. With QtWebKit, it is as easy as creating a QWebPage and using it to render the content to a painter that operates on an image. Check out websnap example, if you think this is not easy enough. Running websnap to several popular web sites gives the following:

Coming back to visual search. So while rehearsing my talk in the night before, I created the search and snap demo. What is presented as the next dojo example is however a slightly better version (afterall, I have more than just one night to polish it), as I added some text snippet to make it more attractive. The result is as follows, the code can be checkout from the usual graphics corner. As you can see, a third of the code is just reusing the WebSnap class.

A screencast is worth a thousand screenshots. Thus, for your pleasure, check the following 1-minute video, too. Or view it on blip.tv (high quality), YouTube (low quality, more bandwidth-friendly), or download the Ogg Theora file (3.3 MB).

So who is going to turn it into a plasmoid?

Monday, November 03, 2008

Android-like parallax sliding

At Redwood City Qt Developer Days (also where, BTW, a bunch of KDE geeks made a funny group photo), I started a tradition: throw an idea for a demo and I will implement it for the talk. The challenge for my graphics talk was the subtle effect in the Android's home screen. We saw T-Mobile G1 the night before and recalled again the good old games in the eighties. So the next morning I waked up earlier both to rehearse my talk (again) and to implement this parallax sliding. It turned out to be almost trivial to implement (200 lines of code) so just check it out!

For the lazy, do enjoy the screen capture below, or see also the screencast on YouTube or blip.tv or just grab the Ogg Theora video (4.2 MB).

Happy parallaxing!