/* Copyright (C) 2001-2007 Peter Selinger and nitoyon. Original code(Potrace v1.8) by Peter Selinger. Ported to ActionScript 3.0 by nitoyon. This file is part of PotrAs. It is free software and it is covered by the GNU General Public License. See the file COPYING for details. */ package com.nitoyon.potras { import flash.display.Graphics; import flash.display.BitmapData; public class ClosedPathList { /** * ClosePath array. */ public var $a:Array; /** * Constructor. */ public function ClosedPathList():void { $a = []; } /** * trace bitmap */ public static function trace(bmpdata:BitmapData):ClosedPathList { var pathList:Array = PathList.create(bmpdata); return ProcessPath.processPath(pathList); } /** * draw. */ public function draw(g:Graphics):void { for each(var path:* in $a) { if(path is ClosedPath) { path.draw(g); } } } } }