Java Reference
In-Depth Information
Figure 8-6. Animated Stops phase 2
Figure 8-5 shows a LinearGradient with three Stops . The middle Stop is mostly to the left, and in
Figure 8-6 it is mostly to the right. The middle Stop cycles back and forth, creating a sort of “Cylon eye”
effect, but in this case rendered in yellow and blue. The code in Listing 8-12 shows how this is
implemented.
Listing 8-12. animatedStopLinear
function animatedStopLinear():Void{
delete group.content;
var stop = 0.0;
var rect = Rectangle{
translateX: 640/2-350/2;
Search WWH ::




Custom Search