Groovy Coffe Cup - take two - No Fluff Just Stuff

Groovy Coffe Cup - take two

Posted by: Andres Almiray on July 4, 2009

It's been quite a while since this blog featured information on GraphicsBuilder, I'm pleased to announce that the builder is not dead, it actually has been rebooted with a new name, GfxBuilder, its sources can now be found under the Griffon umbrella project. The last example shown on this blog was GraphicsBuilder's take on a JavaFX based example: a Coffee Cup with Groovy. As stated on that previous entry there were some kinks to be found on the Groovy version, radial gradients not being able to warp according to its containing shape just to name one. I'm happy to say that no longer is true! here is the updated code with pictures, the first pic corresponds to the older version, the second pic is the newer version.

OLD
NEW
Notice the slight differences in shadows and colors?
The code is a bit shorter this time, note that there is no need for a global translate transform on the top level group, though scaling and translating the cup is a bit tricky, maybe if the cup was drawn initially at the world origin (like the plate is) but the intent was to follow the JavaFX example as closely as possible. A fine addition to groups is the opacity: property, it is applied to all members of the group, in this case it is used to apply a sense of 3D to the plate without actually looking harsh, kind of like a soft shadow so to speak. More news to follow soon, they're bound to make you feel animated about Groovy ;-)

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 »