Area operations in GraphicsBuilder - No Fluff Just Stuff

Area operations in GraphicsBuilder

Posted by: Andres Almiray on August 27, 2007

Similar to JavaFX, GraphicsBuilder now allows for the following area operations: add, subtract, intersect and xor. But it has a new twist as these operations allow more than two shapes, each shape will be subsequently applied to the previous compound. Here are some screenshots and sample code (just switch xor for any of the other operations, is that simple!)

add


subtract


intersect


xor


The builder has undergone other changes besides the addition of those operations:
  • path() now accepts hline, vline and shape.
  • the codebase has been split into maven2 modules: core, swingx and jdk6.
  • Most of the operations are now written in Groovy as well as the builder.
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 »