 {	
 	import flash.display.BitmapData;
 	import flash.display.Graphics;
+	import flash.display.Shape;
 	import flash.geom.Matrix;
 	import flash.geom.Point;
 	import flash.geom.Rectangle;

			graphics.lineTo(p2.x, p2.y);
			
			graphics.endFill();
			
			function anchorCompareFunctionByPolarAngle(a1:AnchorPoint, a2:AnchorPoint):Number
			{

			graphics.drawCircle(barycenter.x, barycenter.y, barycenterRadius.value);
			
			graphics.endFill();
			destination.draw(static_tempShape);
		}
		
		public function drawConvexHull(recordKeys:Array, dataBounds:IBounds2D, screenBounds:IBounds2D, destination:BitmapData):void
		{
			static_drawConvexHull(anchors, circleLineStyle, recordKeys, dataBounds, screenBounds, destination);
		}
		
		private static const static_tempShape:Shape = new Shape();
		public static function static_drawConvexHull(anchors:LinkableHashMap, lineStyle:ILineStyle, recordKeys:Array, dataBounds:IBounds2D, screenBounds:IBounds2D, destination:BitmapData):void
		{
			var graphics:Graphics = static_tempShape.graphics;
			var anchor1:AnchorPoint;
			var anchor2:AnchorPoint;
			var anchor:AnchorPoint;
			var _anchors:Array = [];
			var index:int;
			var p1:Point = new Point();
			var p2:Point = new Point();
			
			graphics.clear();
			if (recordKeys)
			{
				
				// convert the array of record keys into array of anchors
				for(index = 0; index < recordKeys.length; index++)
				{
					anchor = anchors.getObject(recordKeys[index].localName) as AnchorPoint;
					
					if (recordKeys[index].keyType != ANCHOR_KEYTYPE || !anchor)
						continue;
					
					_anchors.push(anchor);
				}
			}
			else
				_anchors = anchors.getObjects();
			
			// don't draw anything if no anchors
			if (_anchors.length == 0)
				return;
			
			// sort by polar angle
			_anchors.sort(anchorCompareFunctionByPolarAngle);
