html/scripts/RGraph/RGraph.common.effects.js
function iterator ()
        {
            // Begin by clearing the canvas
            RG.clear(obj.canvas, color);

            obj.context.save();
                // First draw the circle and clip to it
                obj.context.beginPath();
                obj.context.arc(centerx, centery, currentRadius, 0, RG.TWOPI, false);
                obj.context.clip();
                
                // Clear the canvas to a white color
                if (opt.background) {
                    RG.clear(obj.canvas, opt.background);
                }
                
                // Now draw the chart
                obj.Draw();
            obj.context.restore();


            // Increment the radius
            if (currentRadius < targetRadius) {
                currentRadius += step;
                RG.Effects.updateCanvas(iterator);

            } else {
                callback(obj);
            }
        }
function iterator ()
        {
            // Begin by clearing the canvas
            RG.clear(obj.canvas, color);

            obj.context.save();
                // First draw the circle and clip to it
                obj.context.beginPath();
                obj.context.arc(centerx, centery, currentRadius, 0, RG.TWOPI, false);
                obj.context.clip();
                
                // Clear the canvas to a white color
                if (opt.background) {
                    RG.clear(obj.canvas, opt.background);
                }
                
                // Now draw the chart
                obj.Draw();
            obj.context.restore();


            // Increment the radius
            if (currentRadius < targetRadius) {
                currentRadius += step;
                RG.Effects.updateCanvas(iterator);

            } else {
                callback(obj);
            }
        }
function iterator ( ) { // Begin by clearing the canvas RG . clear ( obj . canvas , color ) ; obj . context . save ( ) ; // First draw the circle and clip to it obj . context . beginPath ( ) ; obj . context . arc ( centerx , centery , currentRadius , 0 , RG . TWOPI , false ) ; obj . context . clip ( ) ; // Clear the canvas to a white color if ( opt . background ) { RG . clear ( obj . canvas , opt . background ) ; } // Now draw the chart obj . Draw ( ) ; obj . context . restore ( ) ; // Increment the radius if ( currentRadius < targetRadius ) { currentRadius += step ; RG . Effects . updateCanvas ( iterator ) ; } else { callback ( obj ) ; } }
This is the iterator function which gradually increases the radius of the clip circle
This is the iterator function which gradually increases the radius of the clip circle