Printing

Visualizer supports printing methods. It consists in drawing the visualizer graph into a bitmap data. it is possible to specify a number of parameters in the printing operation, namely, printing width, printing height, zoom information , ratio information, vertical and horizontal white margins in the bitmap data and the print policy specifying if the draw will concern all visualizer layers, or only graph layers. the printing method is as follows:

function getBitmapData(printWidth:Number=-1, printHeight:Number=-1, 
									  useActualZoom:Boolean = false, keepAspectRatio:Boolean=true,
									  marginX:Number=3, marginY:Number=3, 
									  printPolicy:String="printGraphLayers"):BitmapData

This is an example of visualizer printing:

var bitmapData:BitmapData = visualizer.getBitmapData(-1,-1,false,true,3,3,PrintPolicyConstants.printAllLayers);
var ba:ByteArray = new PNGEncoder().encode(bitmapData);
new FileReference().save(ba, "snapshot.png");

The image snapshot.png appears as it follows: