GraphicsBuilder: clips and textures - No Fluff Just Stuff

GraphicsBuilder: clips and textures

Posted by: Andres Almiray on December 25, 2007

Setting an arbitrary shape as the current clip is back, and what's more now any shape/outline operation can be used as the basis for texturePaint, not just images. The following pictures show a texturePaint using a blue-based gradient painted rectangle rotated 45 degrees (oh yes, rotate now works with degrees, not radians), applied on a rectangle that is drawn over a red-based gradient painted circle. The second image uses the same circle as the current clip



As always, the code follows :-D

You may notice that the tiled blue rectangles do not start at the corner of the textured rectangle, but at the corner of the "world origin", this is something I have to figure out how to fix. The code is already on svn (0.4.3-SNAPSHOT) for anyone who wants to play with it.

Groovy Holidays!
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 »