Source
GraphicsCommandDecode decodePath(String path, [PathEncoding pathEncoding = PathEncoding.SVG]) { GraphicsCommandDecode command; if (pathEncoding == PathEncoding.EaselJS) { command = new GraphicsCommandDecodeEaselJS(path); } else if (pathEncoding == PathEncoding.SVG) { command = new GraphicsCommandDecodeSVG(path); } else { throw new ArgumentError("Unknown path encoding."); } this.addCommand(command); return command; }