A groovier Tux - No Fluff Just Stuff

A groovier Tux

Posted by: Andres Almiray on December 20, 2007

If you are a Linux user you surely know Tux, for those who don't know him he is a cute little penguin that serves as the Linux mascot. Some years ago the KDE team added SVG support, a little bit later an amazing desktop theme appeared (I think Everaldo was the main author, correct me if I'm wrong), and with it came a redesigned Tux. Nowadays you may find similar themes for Windows including a plethora of customized Tuxes to be used as icons and/or avatars.

The following is my attempt to emulate (note the emphasis) the redesigned Tux with GraphicsBuilder, here goes



Not bad eh? something tells me I should stick with programming and skip drawing...

The code to is a little bit verbose but here are the meat & bones, once the basic shapes & paths have been defined the following code will assemble my version of Tux

You may download the full script from this link, please not that it will only work with graphicsbuilder-0.4.2-SNAPSHOT (currently on svn head at http://svn.codehaus.org/groovy-contrib/graphicsbuilder). I fixed some minor bugs along the way but noticed that even though graphicsPad is a good tool to start your own drawings, it lacks some features that would make life easier, like an optional drawing grid, rulers and a cheatsheet/help guide on available operations. I also noticed that skew will not always work as you expect, specially when combined with other transformations at the same time (I'm thinking a freeze option may come in handy) and sometimes when you resize the panel your drawing can go ballistic (something related to AffineTransform applied to the panel). When creating the flippers I kind of wished for flip (rotate+freeze) and reflect (scale+freeze) operations, they would have made the job easier.

As I mentioned on the previous post images are back, you can see an example of a local image being drawn (btw the original image is located at http://tux.crystalxp.net/en.id.3563-jerm-tiny-toux.html).

Seems that will all the minor fixes and new features graphicsbuilder-0.4.2 should be released soon, feedback is always welcome!

Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »