
Flex 4 introduces something slightly different - declarative graphics. With these, you define graphics as an object and their properties can be bound. Here's a super simple, five minute demonstration. At the top of the page, I create a CubicBezierSegment (another new feature of Flex 4).
The interesting thing about the Bezier segment is that all its properties - the positions of the start, control points and terminus and the weight and color of the stroke - are bound to a set of numeric steppers in the right hand panel. This means that when you change one of those steppers, there's no additional ActionScript - the Bezier curve redraws itself through the joy of binding.
This ain't no Raven - but if you're working with vector graphics, Flex 4 is the way to go.
The demo application is here and the source code is here.
View comments