Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Draws a shape which geometry is constructed from two other shapes: a start shape and an end shape. The morph property of a morphing shape defines the amount of transformation applied to the start shape to turn it into the end shape. Both shapes must have the same winding rule.

Requires graphicsbuilder-ext-swingx and swingx in classpath.

Properties

Properties

DefaultValue

Notes

start

 

may be a java.awt.Shape or any shape operation

end

 

may be a java.awt.Shape or any shape operation

morph

0

float value in the range (0..1)

Example

Code Block
def rect = rect( x: 20, y: 50, width: 100, height: 100, arcWidth: 20, arcHeight: 20, asShape: true)
def star = star( cx: 100, cy: 100, ir: 50, or: 80, count: 5, asShape: true )
morph( start: rect, end: star, morph: 0.1, borderWidth: 3, borderColor: 'orange', fill: 'yellow' )
morph( start: rect, end: star, morph: 0.8, borderWidth: 3, borderColor: 'blue', fill: 'cyan' ){
   transformations { translate(x: 140, y: 0) }
}